forked from ilbers/isar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
103 lines (88 loc) · 2.06 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
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
default:
image: ghcr.io/siemens/kas/kas-isar:3.2.3
variables:
GIT_STRATEGY: clone
.common-build: &common-build
stage: build
before_script:
- export http_proxy=$HTTP_PROXY
- export https_proxy=$HTTPS_PROXY
- export ftp_proxy=$FTP_PROXY
- export no_proxy=$NO_PROXY
- export DISTRO_APT_PREMIRRORS=$DISTRO_APT_PREMIRRORS
artifacts:
name: "logs-$CI_JOB_ID"
paths:
- build/tmp/work/*/*/*/temp
- build/job-results
reports:
junit:
- build/job-results/job*/results.xml
when: always
expire_in: 1 week
.docker-isar: &docker-isar
image: ghcr.io/ilbers/docker-isar:3.2.3
.use-default-image:
rules:
- &use-default-image
if: $IMAGE
when: never
.use-docker-isar-image:
rules:
- &use-docker-isar-image
if: $IMAGE != 'docker-isar'
when: never
dev-ci:
<<: *common-build
rules:
- *use-default-image
- if: $TESTSUITE == 'dev' || $CI_PIPELINE_SOURCE != 'schedule'
script:
- scripts/ci_build.sh -T dev
fast-ci:
<<: *common-build
rules:
- *use-default-image
- if: $TESTSUITE == 'fast'
script:
- scripts/ci_build.sh -T fast
full-ci:
<<: *common-build
rules:
- *use-default-image
- if: $TESTSUITE == null && $CI_PIPELINE_SOURCE == 'schedule'
- if: $TESTSUITE == 'full'
script:
- PREVIOUS_SHA="$(cat .CI_COMMIT_SHA || true)"
- if [ "$CI_COMMIT_SHA" != "$PREVIOUS_SHA" ]; then
echo "$CI_COMMIT_SHA" > .CI_COMMIT_SHA;
scripts/ci_build.sh -T full;
fi
cache:
key: "$CI_COMMIT_REF_SLUG"
paths:
- .CI_COMMIT_SHA
dev-ci-isar:
<<: *docker-isar
<<: *common-build
rules:
- *use-docker-isar-image
- if: $TESTSUITE == 'dev'
script:
- scripts/ci_build.sh -T dev
fast-ci-isar:
<<: *docker-isar
<<: *common-build
rules:
- *use-docker-isar-image
- if: $TESTSUITE == 'fast'
script:
- scripts/ci_build.sh -T fast
full-ci-isar:
<<: *docker-isar
<<: *common-build
rules:
- *use-docker-isar-image
- if: $TESTSUITE == 'full'
script:
- scripts/ci_build.sh -T full