specify dockerfiles and docker-compose files and integrate #33
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_images.tar traffic-reproducer:latest | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
retention-days: 7 | |
name: traffic_reproducer_docker_images | |
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...) | |
example-tests: | |
runs-on: ubuntu-latest | |
needs: docker-build | |
steps: | |
- name: Checkout traffic-reproducer | |
uses: actions/checkout@v4 | |
with: | |
path: traffic-reproducer | |
submodules: recursive | |
- name: Download Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: '*_docker_images' | |
path: /tmp/docker | |
- name: Import images in the local registry | |
shell: bash | |
run: | | |
docker load -i /tmp/docker/traffic_reproducer_docker_images/traffic_reproducer_docker_images.tar | |
echo "List Images" | |
docker images | grep 'traffic-reproducer' | |
- name: Run traffic-reproducer container | |
shell: bash | |
run: | | |
docker network create --subnet=192.168.100.0/24 --subnet=cafe::/64 --ipv6 test_network | |
cd traffic-reproducer/ci/collectors | |
docker compose up -d | |
sleep 10 | |
cd ../reproducers | |
export ADDITIONAL_IPV4_LIST="192.168.100.1/24 192.168.100.2/24 192.168.100.3/24" | |
export ADDITIONAL_IPV6_LIST="cafe::1/64 cafe::2/64 cafe::3/64 cafe::4/64 cafe::5/64 cafe::6/64 cafe::7/64" | |
docker compose up -d |