-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into frontend-refactor
* main: Added missing network-intercepts migration Schema checker improvements (#395) Bump fastapi from 0.103.0 to 0.103.1 (#448) Bump pytest from 7.4.0 to 7.4.1 (#449) Added python and system packages listing (#430) added workflow for building and pushing containers from docker/auxili… (#394)
- Loading branch information
Showing
15 changed files
with
273 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Build and Push Containers | ||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
paths: | ||
- 'docker/auxiliary-containers/**/Dockerfile' | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-push-containers: | ||
if: github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: read | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
## This is needed for multi-architecture builds | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to Docker Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build and Push Containers | ||
run: bash ./docker/auxiliary-containers/build-containers.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# The names of the folders within "auxiliary-containers" must match the repository name in dockerhub! | ||
|
||
# Get the list of subdirectories within "auxiliary-containers" directory containing a Dockerfile | ||
subdirs=($(find ./docker/auxiliary-containers -type f -name 'Dockerfile' -exec dirname {} \;)) | ||
|
||
# Loop through each subdirectory, build and push the Docker image | ||
for subdir in "${subdirs[@]}"; do | ||
folder=$(basename "${subdir}") | ||
docker buildx build \ | ||
--push \ | ||
--tag "greencoding/${folder}:latest" \ | ||
--platform linux/amd64,linux/arm64 \ | ||
"${subdir}" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM mcr.microsoft.com/playwright/python:v1.35.0-jammy | ||
|
||
# Install dependencies | ||
RUN apt-get update && apt-get install -y curl wget gnupg && rm -rf /var/lib/apt/lists/* | ||
|
||
# Install Playwright | ||
RUN pip install playwright==1.35.0 | ||
|
||
# Set up Playwright dependencies for Chromium, Firefox and Webkit | ||
RUN playwright install | ||
RUN playwright install-deps | ||
|
||
CMD ["/bin/bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
CREATE TABLE network_intercepts ( | ||
id SERIAL PRIMARY KEY, | ||
project_id uuid NOT NULL REFERENCES projects(id) ON DELETE CASCADE ON UPDATE CASCADE , | ||
time bigint NOT NULL, | ||
connection_type text NOT NULL, | ||
protocol text NOT NULL, | ||
created_at timestamp with time zone DEFAULT now() | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
-r requirements.txt | ||
pydantic==2.3.0 | ||
pytest==7.4.0 | ||
pytest==7.4.1 | ||
requests==2.31.0 | ||
pylint==2.17.5 |
5 changes: 2 additions & 3 deletions
5
.../usage_scenarios/schema_checker_valid.yml → ...r/schema_checker_invalid_image_builds.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
28 changes: 28 additions & 0 deletions
28
test/data/usage_scenarios/schema_checker/schema_checker_invalid_wrong_type.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
name: Test | ||
author: Dan Mateas | ||
description: test | ||
|
||
networks: | ||
network-name: | ||
|
||
networks: | ||
- network-a | ||
- network-b | ||
|
||
services: | ||
test-container: | ||
type: container | ||
image: gcb_stress | ||
build: . | ||
|
||
flow: | ||
- name: Stress | ||
container: test-container | ||
commands: | ||
- type: console | ||
command: stress-ng -c 1 -t 1 -q | ||
note: Starting Stress | ||
shell: bash | ||
log-stdout: true | ||
log-stderr: "no" # should throw error, not a bool |
28 changes: 28 additions & 0 deletions
28
test/data/usage_scenarios/schema_checker/schema_checker_valid.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
name: Test | ||
author: Dan Mateas | ||
description: test | ||
|
||
networks: | ||
network-name: | ||
network-name-2: | ||
|
||
services: | ||
test-container: | ||
type: container | ||
image: gcb_stress | ||
build: . | ||
test-container-2: | ||
type: container | ||
image: fizzbump | ||
|
||
flow: | ||
- name: Stress | ||
container: test-container | ||
commands: | ||
- type: console | ||
command: stress-ng -c 1 -t 1 -q | ||
note: Starting Stress | ||
shell: bash | ||
log-stdout: true | ||
log-stderr: false |
25 changes: 25 additions & 0 deletions
25
test/data/usage_scenarios/schema_checker/schema_checker_valid_network_as_keys.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
name: Test | ||
author: Dan Mateas | ||
description: test | ||
|
||
networks: | ||
network-name: | ||
network-name-2: | ||
|
||
services: | ||
test-container: | ||
type: container | ||
image: gcb_stress | ||
build: . | ||
|
||
flow: | ||
- name: Stress | ||
container: test-container | ||
commands: | ||
- type: console | ||
command: stress-ng -c 1 -t 1 -q | ||
note: Starting Stress | ||
shell: bash | ||
log-stdout: true | ||
log-stderr: false |
25 changes: 25 additions & 0 deletions
25
test/data/usage_scenarios/schema_checker/schema_checker_valid_network_as_list.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
name: Test | ||
author: Dan Mateas | ||
description: test | ||
|
||
networks: | ||
- network-a | ||
- network-b | ||
|
||
services: | ||
test-container: | ||
type: container | ||
image: gcb_stress | ||
build: . | ||
|
||
flow: | ||
- name: Stress | ||
container: test-container | ||
commands: | ||
- type: console | ||
command: stress-ng -c 1 -t 1 -q | ||
note: Starting Stress | ||
shell: bash | ||
log-stdout: true | ||
log-stderr: false |
Oops, something went wrong.