-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
42 lines (38 loc) · 1.7 KB
/
.gitlab-ci.yml
1
2
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
stages:
- prerequisites
- test
- benchmark
project_private:
stage: prerequisites
script:
- echo "CI_PROJECT_VISIBILITY = $CI_PROJECT_VISIBILITY"
- /bin/bash -c 'if [[ $CI_PROJECT_VISIBILITY = "private" ]]; then exit 0; else echo "Set your project visibility to private! Settings -> General -> Visibility -> Project visibility"; exit 1; fi'
cache:
key: "$CI_JOB_STAGE-$CI_COMMIT_REF_NAME"
tags:
- "fdedi"
team_file_adapted:
stage: prerequisites
script:
- echo "CI_PROJECT_VISIBILITY = $CI_PROJECT_VISIBILITY"
- /bin/bash -c 'line1=$(sed -n 1p team.txt); line2=$(sed -n 2p team.txt); line3=$(sed -n 3p team.txt); error=0; [[ $line1 =~ ^Teamname:.*$ ]] && ! [[ $line1 =~ ^.*YourNameHere.*$ ]] || { echo "Enter your Teamname! You did not change the default value." && error=1; }; [[ $line2 =~ ^Realname:.*$ ]] && ! [[ $line2 =~ ^.*YourNameHere.*$ ]] || { echo "Enter your Realname! You did not change the default value."; error=1; }; [[ $line3 =~ ^MatrNr:.*$ ]] && ! [[ $line3 =~ ^.*YourMatrikelNrHere.*$ ]] || { echo "Enter your MatrNr! You did not change the default value."; error=1; }; if [ $error -ne 0 ]; then echo "Update the team.txt file. Please make sure the prefixes ('Teamname:', 'Realname:', 'MatrNr:') are still correct."; exit 1; else exit 0; fi'
cache:
key: "$CI_JOB_STAGE-$CI_COMMIT_REF_NAME"
tags:
- "fdedi"
test:
stage: test
script:
- cd deliverable
- ./test.sh
tags:
- "fdedi"
benchmark:
stage: benchmark
script:
- cd deliverable
- ./build.sh
- cd ..
- /data/delivery/measureTaxi ./deliverable/submit.sh
tags:
- "fdedi"