Skip to content
Snippets Groups Projects
Commit ee86e3a1 authored by Jana Ziková's avatar Jana Ziková
Browse files

update CI configuration

parent d1604f35
No related branches found
No related tags found
1 merge request!29Resolve "update testing"
# Image with everything needed to run Cyber Sandbox Creator.
image: registry.gitlab.ics.muni.cz:443/muni-kypo-csc/cyber-sandbox-creator:debian
image: registry.gitlab.ics.muni.cz:443/muni-kypo-csc/cyber-sandbox-creator/csc-debian
# Make sure that VirtualBox kernel modules are loaded and install Python dependencies.
before_script:
- apt-get install -y linux-headers-$(uname -r)
- lsmod | grep "vbox" || /usr/lib/virtualbox/vboxdrv.sh setup
- pip3 install -r requirements.txt
- chmod +x test_topologies.sh
- chmod +x run_tests.sh
# Separating integration tests into several stages to ensure only one job creating virtual environment will run at one time.
# Running several jobs at once will make them fail while testing virtual network.
# Integration tests need to be separated into several jobs to fit under timeout treshold.
stages:
- 0-routers-1-network-1-host
- 1-router-1-network-1-host
- 1-router-2-networks-2-hosts
- 1-router-2-networks-2-hosts-ubuntu
- 1-router-2-networks-2-hosts-kali
- 2-routers-2-networks-2-hosts
- 2-routers-4-networks-4-hosts
- 3-routers-5-networks-5-hosts-br
- 3-routers-5-networks-5-hosts-br-ansloc
- debian
- kali-2020
- windows-server
original:
stage: 0-routers-1-network-1-host
debian:
stage: debian
script:
- ./test_topologies.sh ./testing/ci/config_1_1.yml
- testing/run_tests.sh -c testing/ci/config_debian.yml -p
# run even when other stages fail
when: always
# only run for commits to master branch and merge requests
# only run for merge requests
only:
- merge_requests
debian-stretch:
stage: 0-routers-1-network-1-host
script:
- ./test_topologies.sh ./testing/ci/config_1_2.yml
# run even when other stages fail
when: always
# only run for commits to master branch and merge requests
only:
- merge_requests
debian9:
stage: 0-routers-1-network-1-host
script:
- ./test_topologies.sh ./testing/ci/config_1_3.yml
# run even when other stages fail
when: always
# only run for commits to master branch and merge requests
only:
- merge_requests
ubuntu:
stage: 0-routers-1-network-1-host
script:
- ./test_topologies.sh ./testing/ci/config_1_4.yml
# run even when other stages fail
when: always
# only run for commits to master branch and merge requests
only:
- merge_requests
kali:
stage: 0-routers-1-network-1-host
kali-2020:
stage: kali-2020
# overwritting global before_script to create a virtual display before running test requiring a display
before_script:
- apt-get install -y linux-headers-$(uname -r)
- lsmod | grep "vbox" || /usr/lib/virtualbox/vboxdrv.sh setup
- pip3 install -r requirements.txt
- chmod +x test_topologies.sh
- chmod +x run_tests.sh
- Xvfb :1 -screen 0 800x600x16 &
script:
- DISPLAY=:1 ./test_topologies.sh ./testing/ci/config_1_5.yml
# run even when other stages fail
when: always
# only run for commits to master branch and merge requests
only:
- merge_requests
1-router-1-network-1-host:
stage: 1-router-1-network-1-host
script:
- ./test_topologies.sh ./testing/ci/config_2_1.yml
# run even when other stages fail
when: always
# only run for commits to master branch and merge requests
only:
- merge_requests
1-router-2-networks-2-hosts:
stage: 1-router-2-networks-2-hosts
script:
- ./test_topologies.sh ./testing/ci/config_3_1.yml
- DISPLAY=:1 testing/run_tests.sh -c testing/ci/config_kali_2020.yml -p
# run even when other stages fail
when: always
# only run for commits to master branch and merge requests
# only run for and merge requests
only:
- merge_requests
1-router-2-networks-2-hosts-ubuntu:
stage: 1-router-2-networks-2-hosts-ubuntu
windows-server:
stage: windows-server
script:
- ./test_topologies.sh ./testing/ci/config_4_1.yml
- testing/run_tests.sh -c /testing/ci/config_windows_server.yml -p
# run even when other stages fail
when: always
# only run for commits to master branch and merge requests
# only run for merge requests
only:
- merge_requests
1-router-2-networks-2-hosts-kali:
stage: 1-router-2-networks-2-hosts-kali
# overwritting global before_script to create a virtual display before running test requiring a display
before_script:
- lsmod | grep "vbox" || /usr/lib/virtualbox/vboxdrv.sh setup
- pip3 install -r requirements.txt
- chmod +x test_topologies.sh
- Xvfb :1 -screen 0 800x600x16 &
script:
- DISPLAY=:1 ./test_topologies.sh ./testing/ci/config_5_1.yml
# run even when other stages fail
when: always
# only run for commits to master branch and merge requests
only:
- merge_requests
2-routers-2-networks-2-hosts:
stage: 2-routers-2-networks-2-hosts
script:
- ./test_topologies.sh ./testing/ci/config_6_1.yml
# run even when other stages fail
when: always
# only run for commits to master branch and merge requests
only:
- merge_requests
2-routers-4-networks-4-hosts:
stage: 2-routers-4-networks-4-hosts
script:
- ./test_topologies.sh ./testing/ci/config_7_1.yml
# run even when other stages fail
when: always
# only run for commits to master branch and merge requests
only:
- merge_requests
3-routers-5-networks-5-hosts-br:
stage: 3-routers-5-networks-5-hosts-br
script:
- ./test_topologies.sh ./testing/ci/config_8_1.yml
# run even when other stages fail
when: always
# only run for commits to master branch and merge requests
only:
- merge_requests
3-routers-5-networks-5-hosts-br-ansloc:
stage: 3-routers-5-networks-5-hosts-br-ansloc
script:
- ./test_topologies.sh ./testing/ci/config_9_1.yml
# run even when other stages fail
when: always
# only run for commits to master branch and merge requests
only:
- merge_requests
\ No newline at end of file
# Configuration file for integration testing.
# Tests example topology 1 (see wiki) with all basic optional arguments.
topologies:
- file: ./topologies/0-routers-1-network-1-host.yml
arguments:
- no-arguments
- ansible_local
# Configuration file for integration testing.
# Tests example topology 1 (see wiki) with all basic optional arguments and host machine's OS image changed to Debian Stretch.
topologies:
- file: ./topologies/0-routers-1-network-1-host.yml
arguments:
- no-arguments
- ansible_local
boxes:
- debian/contrib-stretch64
original_boxes: false
# Configuration file for integration testing.
# Tests example topology 1 (see wiki) with all basic optional arguments and host machine's OS image changed to Debian 9.
topologies:
- file: ./topologies/0-routers-1-network-1-host.yml
arguments:
- no-arguments
- ansible_local
boxes:
- generic/debian9
original_boxes: false
# Configuration file for integration testing.
# Tests example topology 1 (see wiki) with all basic optional arguments and host machine's OS image changed to Ubuntu Xenial.
topologies:
- file: ./topologies/0-routers-1-network-1-host.yml
arguments:
- no-arguments
- ansible_local
boxes:
- ubuntu/xenial64
original_boxes: false
# Configuration file for integration testing.
# Tests example topology 1 (see wiki) with all basic optional arguments and host machine's OS image changed to MUNI KYPO Kali.
topologies:
- file: ./topologies/0-routers-1-network-1-host.yml
arguments:
- no-arguments
- ansible_local
boxes:
- kali-2019.4
original_boxes: false
# Configuration file for integration testing.
# Tests example topology 3 (see wiki) with all basic optional arguments.
topologies:
- file: ./topologies/1-router-1-network-1-host.yml
arguments:
- no-arguments
- ansible_local
- border_router
- [ansible_local, border_router]
# Configuration file for integration testing.
# Tests example topology 4 (see wiki) with all basic optional arguments.
topologies:
- file: ./topologies/1-router-2-networks-2-hosts.yml
arguments:
- no-arguments
- ansible_local
- border_router
- [ansible_local, border_router]
\ No newline at end of file
# Configuration file for integration testing.
# Tests example topology 4 (see wiki) with all basic optional arguments and host machine's OS images changed to MUNI KYPO Kali.
topologies:
- file: ./topologies/1-router-2-networks-2-hosts.yml
arguments:
- no-arguments
- ansible_local
- border_router
- [ansible_local, border_router]
boxes:
- kali-2019.4
original_boxes: false
\ No newline at end of file
# Configuration file for integration testing.
# Tests example topology 5 (see wiki) with all basic optional arguments.
topologies:
- file: ./topologies/2-routers-2-networks-2-hosts.yml
arguments:
- border_router
- [ansible_local, border_router]
\ No newline at end of file
# Configuration file for integration testing.
# Tests example topology 6 (see wiki) with all basic optional arguments.
topologies:
- file: ./topologies/2-routers-4-networks-4-hosts.yml
arguments:
- border_router
- [ansible_local, border_router]
# Configuration file for integration testing.
# Tests example topology 7 (see wiki) with the border_router optional argument.
topologies:
- file: ./topologies/3-routers-5-networks-5-hosts.yml
arguments:
- border_router
\ No newline at end of file
# Configuration file for integration testing.
# Tests example topology 7 (see wiki) with the border_router and ansible_local optional arguments.
topologies:
- file: ./topologies/3-routers-5-networks-5-hosts.yml
arguments:
- [ansible_local, border_router]
\ No newline at end of file
# Configuration file for integration testing.
# Tests example topology 4 (see wiki) with all basic optional arguments and host machine's OS images changed to Ubuntu Xenial.
topologies:
- file: ./topologies/0-routers-1-network-1-host.yml
arguments:
- no-arguments
- ansible_local
- file: ./topologies/1-router-1-network-1-host.yml
arguments:
- no-arguments
- ansible_local
- border_router
- [ansible_local, border_router]
- file: ./topologies/1-router-2-networks-2-hosts.yml
arguments:
- no-arguments
- ansible_local
- border_router
- [ansible_local, border_router]
boxes:
- ubuntu/xenial64
original_boxes: false
\ No newline at end of file
- file: ./topologies/2-routers-2-networks-2-hosts.ym
arguments:
- border_router
- [ansible_local, border_router]
\ No newline at end of file
topologies:
- file: ./topologies/0-routers-1-network-1-host.yml
arguments:
- no-arguments
- ansible_local
boxes:
- munikypo/kali-2020.4
original_boxes: false
- file: ./topologies/1-router-1-network-1-host.yml
arguments:
- no-arguments
- ansible_local
- border_router
- [ansible_local, border_router]
boxes:
- munikypo/kali-2020.4
original_boxes: false
- file: ./topologies/1-router-2-networks-2-hosts.yml
arguments:
- no-arguments
- ansible_local
- border_router
- [ansible_local, border_router]
boxes:
- munikypo/kali-2020.4
original_boxes: false
- file: ./topologies/2-routers-2-networks-2-hosts.ym
arguments:
- border_router
- [ansible_local, border_router]
boxes:
- munikypo/kali-2020.4
original_boxes: false
\ No newline at end of file
topologies:
- file: ./topologies/0-routers-1-network-1-host.yml
arguments:
- ansible_local
boxes:
- munikypo/windows-server-2019
original_boxes: false
- file: ./topologies/1-router-1-network-1-host.yml
arguments:
- ansible_local
- [ansible_local, border_router]
boxes:
- munikypo/windows-server-2019
original_boxes: false
- file: ./topologies/1-router-2-networks-2-hosts.yml
arguments:
- ansible_local
- [ansible_local, border_router]
boxes:
- munikypo/windows-server-2019
original_boxes: false
- file: ./topologies/2-routers-2-networks-2-hosts.ym
arguments:
- [ansible_local, border_router]
boxes:
- munikypo/windows-server-2019
original_boxes: false
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment