change approach for ci: initial container build #31
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
name: ci | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 0 * * *' # every day at midnight | |
workflow_dispatch: | |
jobs: | |
docker-build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout traffic-reproducer | |
uses: actions/checkout@v4 | |
with: | |
path: traffic-reproducer | |
submodules: recursive | |
- name: Build traffic-reproducer container | |
shell: bash | |
run: | | |
cd traffic-reproducer | |
docker build -t traffic-reproducer:latest -f docker/Dockerfile . | |
- name: Save image as artifact | |
shell: bash | |
run: | | |
mkdir -p /tmp/docker/ | |
docker save -o /tmp/docker/traffic_reproducer_docker_image.tar traffic-reproducer:latest | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
retention-days: 7 | |
name: traffic_reproducer_docker_image | |
path: /tmp/docker | |
# TODO idea: send all messages from all examples and then do some basic check on collector logs / print files (no warnings, no error, line counts, etc...) | |
regression-tests: | |
runs-on: ubuntu-latest | |
needs: docker-build | |
steps: | |
- name: Download Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: '*_docker_images' | |
path: /tmp/docker | |
- name: Import images in the local registry | |
run: | | |
ls -la /tmp/docker | |
docker load -i /tmp/docker/traffic_reproducer_docker_image/traffic_reproducer_docker_image.tar | |
echo "List Images" | |
docker images | grep 'traffic-reproducer' | |
- name: Run traffic-reproducer container | |
run: | | |
docker run --rm --name traffic-reproducer traffic-reproducer:latest |