-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
111 lines (98 loc) · 2.46 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
104
105
106
107
108
109
110
111
default:
image: ubuntu:22.04
include:
# Run pipeline only on branches, not MRs
- template: 'Workflows/Branch-Pipelines.gitlab-ci.yml'
# auto-static-analysis
# - template: Security/SAST.gitlab-ci.yml
# - template: Code-Quality.gitlab-ci.yml
variables:
GIT_SUBMODULE_STRATEGY: recursive
DOCKER_BUILDKIT: 1
DEBIAN_FRONTEND: "noninteractive"
# for Python/PIP
PIP_CERT: /etc/ssl/certs/ca-certificates.crt
PIP_DEFAULT_TIMEOUT: "300"
# for Ruby/bolt
SSL_CERT_FILE: /etc/ssl/certs/ca-certificates.crt
stages:
- build
- test
- deploy
.prep-install-ca: &prep-install-ca |
apt-get update && apt-get install -y ca-certificates curl
mkdir -p /usr/local/share/ca-certificates
curl -svL http://apllinuxdepot.jhuapl.edu/linux/APL-root-cert/JHUAPL-MS-Root-CA-05-21-2038-B64-text.cer -o /usr/local/share/ca-certificates/JHUAPL-MS-Root-CA-05-21-2038-B64-text.crt
update-ca-certificates
.prep-install-ext: &prep-install-ext |
apt-get update && apt-get install -y \
build-essential rsync autoconf libtool \
cmake ninja-build ruby \
libmysqlclient-dev libcivetweb-dev civetweb libcjson-dev
.prep-install-docs: &prep-install-docs |
apt-get update && apt-get install -y \
cmake ninja-build \
doxygen graphviz plantuml
.prep-install-docker: &prep-install-docker |
apt-get update && apt-get install -y \
docker.io python3-pip && \
pip3 install docker-compose
#sast:
# stage: test
#code_quality:
# variables:
# SOURCE_CODE: src
build:
stage: build
needs: []
before_script:
- *prep-install-ca
- *prep-install-ext
script:
- ./prep.sh
- ./build.sh
- ./build.sh install
artifacts:
paths:
- testroot
- build
docs:
stage: build
needs: []
before_script:
- *prep-install-ca
- *prep-install-ext
- *prep-install-docs
script:
- ./prep.sh -DBUILD_AGENT=OFF -DBUILD_MANAGER=OFF -DBUILD_DOCS=ON
- ./build.sh docs
artifacts:
paths:
- build/default/docs/doxygen
unit-test:
stage: test
needs:
- build
allow_failure: true
before_script:
- *prep-install-ca
- *prep-install-ext
script:
- ./build.sh check
artifacts:
when: always
reports:
junit: build/default/testresults.xml
integration-test:
stage: test
needs:
- build
allow_failure: true
before_script:
- *prep-install-ca
- *prep-install-docker
script:
- ./testenv/start.sh
- ./testenv/check.sh
after_script:
- ./testenv/stop.sh