Newer
Older
# Image with everything needed to run Cyber Sandbox Creator.
image: registry.gitlab.ics.muni.cz:443/muni-kypo-csc/cyber-sandbox-creator:debian
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# Make sure that VirtualBox kernel modules are loaded and install Python dependencies.
before_script:
- lsmod | grep "vbox" || /usr/lib/virtualbox/vboxdrv.sh setup
- pip3 install -r requirements.txt
- chmod +x test_topologies.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
original:
stage: 0-routers-1-network-1-host
script:
- ./test_topologies.sh ./testing/ci/config_1_1.yml
# run even when other stages fail
when: always
# only run for commits to master branch and 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
# 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_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
# 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-ubuntu:
stage: 1-router-2-networks-2-hosts-ubuntu
script:
- ./test_topologies.sh ./testing/ci/config_4_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-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