Skip to content

Commit

Permalink
attempt pooling image build
Browse files Browse the repository at this point in the history
  • Loading branch information
mickmis committed Apr 23, 2024
1 parent 5ab499f commit adafdb3
Show file tree
Hide file tree
Showing 15 changed files with 138 additions and 74 deletions.
92 changes: 71 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,71 @@ on:
branches:
- main
jobs:
build-monitoring:
runs-on: ubuntu-latest
name: Build interuss/monitoring docker image
steps:
- name: Job information
run: |
echo "Job information"
echo "Trigger: ${{ github.event_name }}"
echo "Host: ${{ runner.os }}"
echo "Repository: ${{ github.repository }}"
echo "Branch: ${{ github.ref }}"
docker images
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Build and export interuss/monitoring docker image
run: |
cd monitoring
make image
docker save --output /tmp/monitoring-docker-image.tar interuss/monitoring
- name: Upload interuss/monitoring docker image as artifact
uses: actions/upload-artifact@v4
with:
name: monitoring-docker-image
path: /tmp/monitoring-docker-image.tar

hygiene-tests:
name: Repository hygiene
needs: build-monitoring
runs-on: ubuntu-latest
steps:
- name: Job information
run: |
echo "Job information"
echo "Trigger: ${{ github.event_name }}"
echo "Host: ${{ runner.os }}"
echo "Repository: ${{ github.repository }}"
echo "Branch: ${{ github.ref }}"
docker images
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Python lint
run: make python-lint
- name: Automated hygiene verification
run: make check-hygiene
- name: uss_qualifier documentation validation
run: make validate-uss-qualifier-docs
- name: Shell lint
run: make shell-lint
- name: Job information
run: |
echo "Job information"
echo "Trigger: ${{ github.event_name }}"
echo "Host: ${{ runner.os }}"
echo "Repository: ${{ github.repository }}"
echo "Branch: ${{ github.ref }}"
docker images
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Download interuss/monitoring docker image as artifact
uses: actions/download-artifact@v4
with:
name: monitoring-docker-image
path: /tmp
- name: Import interuss/monitoring docker image
run: |
docker load --input /tmp/monitoring-docker-image.tar
docker image ls -a
- name: Python lint
run: make python-lint
- name: Automated hygiene verification
run: make check-hygiene
- name: uss_qualifier documentation validation
run: make validate-uss-qualifier-docs
- name: Shell lint
run: make shell-lint

mock_uss-test:
name: mock_uss tests
needs: build-monitoring
uses: ./.github/workflows/monitoring-test.yml
with:
name: mock_uss
Expand All @@ -41,6 +79,7 @@ jobs:
uss_qualifier-noop-test:
name: uss_qualifier configurations.dev.noop tests
needs: build-monitoring
uses: ./.github/workflows/monitoring-test.yml
with:
name: uss_qualifier-noop-test
Expand All @@ -52,6 +91,7 @@ jobs:
uss_qualifier-geoawareness_cis-test:
name: uss_qualifier configurations.dev.geoawareness_cis tests
needs: build-monitoring
uses: ./.github/workflows/monitoring-test.yml
with:
name: uss_qualifier-geoawareness_cis-test
Expand All @@ -63,6 +103,7 @@ jobs:
uss_qualifier-generate_rid_test_data-test:
name: uss_qualifier configurations.dev.generate_rid_test_data tests
needs: build-monitoring
uses: ./.github/workflows/monitoring-test.yml
with:
name: uss_qualifier-generate_rid_test_data-test
Expand All @@ -74,6 +115,7 @@ jobs:
uss_qualifier-geospatial_comprehension-test:
name: uss_qualifier configurations.dev.geospatial_comprehension tests
needs: build-monitoring
uses: ./.github/workflows/monitoring-test.yml
with:
name: uss_qualifier-geospatial_comprehension-test
Expand All @@ -85,6 +127,7 @@ jobs:
uss_qualifier-general_flight_auth-test:
name: uss_qualifier configurations.dev.general_flight_auth tests
needs: build-monitoring
uses: ./.github/workflows/monitoring-test.yml
with:
name: uss_qualifier-general_flight_auth-test
Expand All @@ -96,6 +139,7 @@ jobs:
uss_qualifier-message_signing-test:
name: uss_qualifier configurations.dev.message_signing tests
needs: build-monitoring
uses: ./.github/workflows/monitoring-test.yml
with:
name: uss_qualifier-message_signing-test
Expand All @@ -107,6 +151,7 @@ jobs:
uss_qualifier-dss_probing-test:
name: uss_qualifier configurations.dev.dss_probing tests
needs: build-monitoring
uses: ./.github/workflows/monitoring-test.yml
with:
name: uss_qualifier-dss_probing-test
Expand All @@ -118,6 +163,7 @@ jobs:
uss_qualifier-f3548_self_contained-test:
name: uss_qualifier configurations.dev.f3548_self_contained tests
needs: build-monitoring
uses: ./.github/workflows/monitoring-test.yml
with:
name: uss_qualifier-f3548_self_contained-test
Expand All @@ -129,6 +175,7 @@ jobs:
uss_qualifier-netrid_v22a-test:
name: uss_qualifier configurations.dev.netrid_v22a tests
needs: build-monitoring
uses: ./.github/workflows/monitoring-test.yml
with:
name: uss_qualifier-netrid_v22a-test
Expand All @@ -140,6 +187,7 @@ jobs:
uss_qualifier-netrid_v19-test:
name: uss_qualifier configurations.dev.netrid_v19 tests
needs: build-monitoring
uses: ./.github/workflows/monitoring-test.yml
with:
name: uss_qualifier-netrid_v19-test
Expand All @@ -151,6 +199,7 @@ jobs:
uss_qualifier-uspace-test:
name: uss_qualifier configurations.dev.uspace tests
needs: build-monitoring
uses: ./.github/workflows/monitoring-test.yml
with:
name: uss_qualifier-uspace-test
Expand All @@ -162,6 +211,7 @@ jobs:
prober-test:
name: prober tests
needs: build-monitoring
uses: ./.github/workflows/monitoring-test.yml
with:
name: prober
Expand All @@ -186,7 +236,7 @@ jobs:
path: monitoring

- name: Get uss_qualifier reports
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: ./artifacts

Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/monitoring-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:
required: true
type: string

# todo dependency on job

jobs:
monitoring-test:
runs-on: ubuntu-latest
Expand All @@ -29,19 +31,28 @@ jobs:
uses: actions/checkout@v4
with:
submodules: true
- name: Download interuss/monitoring docker image as artifact
uses: actions/download-artifact@v4
with:
name: monitoring-docker-image
path: /tmp
- name: Import interuss/monitoring docker image
run: |
docker load --input /tmp/monitoring-docker-image.tar
docker image ls -a
- name: Run ${{ inputs.name }} test
run: ${{ inputs.script }}
- name: Save containers and tracer logs as artifact
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: monitoring-test-${{ inputs.name }}-logs
path: |
logs
monitoring/mock_uss/output
- name: Save USS qualifier reports as artifact
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: monitoring-test-${{ inputs.name }}-reports
path: |
Expand Down
8 changes: 4 additions & 4 deletions monitoring/mock_uss/run_locally_msgsigning.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ else
fi
cd "${BASEDIR}/../.." || exit 1

(
cd monitoring || exit 1
make image
)
#(
#cd monitoring || exit 1
#make image
#)

AUTH="DummyOAuth(http://host.docker.internal:8085/token,uss1)"
DSS="http://host.docker.internal:8082"
Expand Down
9 changes: 5 additions & 4 deletions monitoring/mock_uss/run_locally_test_geoawareness.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ else
fi
cd "${BASEDIR}/../.." || exit 1

(
cd monitoring || exit 1
make image
)
# TODO: temporarly disabled for CI import artifact
#(
#cd monitoring || exit 1
#make image
#)

PUBLIC_KEY="/var/test-certs/auth2.pem"
container_name="mock_uss_geoawareness_test"
Expand Down
8 changes: 4 additions & 4 deletions monitoring/mock_uss/start_all_local_mocks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ else
fi
cd "${BASEDIR}/../.." || exit 1

(
cd monitoring || exit 1
make image
)
#(
#cd monitoring || exit 1
#make image
#)

./monitoring/mock_uss/run_locally.sh up --wait --wait-timeout 60 -d
9 changes: 5 additions & 4 deletions monitoring/prober/run_locally.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ else
fi
cd "${BASEDIR}/../.." || exit 1

(
cd monitoring || exit 1
make image
)
# TODO: temporarly disabled for CI import artifact
#(
#cd monitoring || exit 1
#make image
#)

CORE_SERVICE_CONTAINER="local_infra-dss-1"
OAUTH_CONTAINER="local_infra-oauth-1"
Expand Down
8 changes: 4 additions & 4 deletions monitoring/uss_qualifier/bin/generate_rid_test_definition.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ else
fi
cd "${BASEDIR}/../../.." || exit 1

(
cd monitoring || exit 1
make image
)
#(
#cd monitoring || exit 1
#make image
#)

CONFIG_LOCATION="monitoring/uss_qualifier/config_run_locally.json"
CONFIG='--config config_run_locally.json'
Expand Down
8 changes: 4 additions & 4 deletions monitoring/uss_qualifier/bin/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ AUTH="${2:-NoAuth()}"

QUALIFIER_OPTIONS="--auth $AUTH --config /config.json --report output/report.json"

(
cd monitoring || exit 1
make image
)
#(
#cd monitoring || exit 1
#make image
#)

if [ "$CI" == "true" ]; then
docker_args="--add-host host.docker.internal:host-gateway" # Required to reach other containers in Ubuntu (used for Github Actions)
Expand Down
8 changes: 4 additions & 4 deletions monitoring/uss_qualifier/make_artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ else
fi
cd "${BASEDIR}/../.." || exit 1

(
cd monitoring || exit 1
make image
)
#(
#cd monitoring || exit 1
#make image
#)

CONFIG_NAME="${1}"

Expand Down
9 changes: 5 additions & 4 deletions monitoring/uss_qualifier/run_locally.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ else
fi
cd "${BASEDIR}/../.." || exit 1

(
cd monitoring || exit 1
make image
)
# TODO: temporarly disabled for CI import artifact
#(
#cd monitoring || exit 1
#make image
#)

CONFIG_NAME="${1:-ALL}"

Expand Down
8 changes: 4 additions & 4 deletions monitoring/uss_qualifier/scripts/format_test_documentation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ else
fi
cd "${BASEDIR}/../../.." || exit 1

(
cd monitoring || exit 1
make image
)
#(
#cd monitoring || exit 1
#make image
#)

# shellcheck disable=SC2086
docker run --name test_documentation_formatter \
Expand Down
8 changes: 4 additions & 4 deletions monitoring/uss_qualifier/scripts/format_test_suite_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ else
fi
cd "${BASEDIR}/../../.." || exit 1

(
cd monitoring || exit 1
make image
)
#(
#cd monitoring || exit 1
#make image
#)

# shellcheck disable=SC2086
docker run --name test_suite_docs_formatter \
Expand Down
Loading

0 comments on commit adafdb3

Please sign in to comment.