-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
113 lines (98 loc) · 3 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
112
113
---
image: gitlab-registry.cern.ch/linuxsupport/cc7-base:latest
include:
- 'https://gitlab.cern.ch/linuxsupport/rpmci/raw/master/rpm-ci.yml'
.installGo14: &installGo14 |
mkdir /go14
yum install -y gcc
curl https://dl.google.com/go/go1.14.2.linux-amd64.tar.gz | tar -zxC /go14
ln -s /go14/go/bin/go /usr/bin/go14
export GOPATH=/go
go14 get ./...
.config: &config |
mkdir -p /usr/local/etc /etc/httpd/conf/
cp tests/landb/goermis.yaml /usr/local/etc/goermis.yaml
sed -i \
-e "s/##REPLACE_BY_USER##/${SOAPUSER}/g" \
-e "s/##REPLACE_BY_PASSWORD##/${SOAPPASSWORD}/g" \
-e "s/##REPLACE_BY_DB##/${DATABASE}/g" \
-e "s/##REPLACE_BY_USERNAME##/${DB_USERNAME}/g" \
-e "s/##REPLACE_BY_DB_PASSWORD##/${DB_PASSWORD}/g" \
-e "s/##REPLACE_BY_HOST##/${DB_HOST}/g" \
-e "s/##REPLACE_BY_PORT##/${DB_PORT}/g" \
-e "s/##REPLACE_BY_IP##/${DNS_MANAGER}/g" /usr/local/etc/goermis.yaml
echo "$ERMISCERT" > /etc/httpd/conf/ermiscert.pem
echo "$ERMISKEY" > /etc/httpd/conf/ermiskey.pem
echo "$CACERT" > /etc/httpd/conf/ca.pem
ls -al /etc/httpd/conf/
chmod 600 /etc/httpd/conf/ermiscert.pem /etc/httpd/conf/ermiskey.pem
variables:
KOJI_TAG: 'lb'
BUILD_8: 'True'
BUILD_8s: 'True'
DIST_8: .el8
build-go14:
stage: prebuild
script:
- *installGo14
- go14 build -race ./...
behave:
image: gitlab-registry.cern.ch/ai-config-team/ai-tools
stage: prebuild
allow_failure: false
script:
- yum -y install krb5-workstation gcc python3-devel krb5-devel python3-requests python3-requests-kerberos
- pip3 install behave
- cd tests/behave
- echo $ERMISTST_DECODED | kinit [email protected]
- klist
- behave . -D ermistst=$ERMISTST -D ermists=$ERMISTS
landb:
#image: gitlab-registry.cern.ch/ai-config-team/ai-tools
stage: prebuild
allow_failure: false
script:
- *installGo14
- *config
- echo "READY TO DO THE SOAP CALL"
- go14 test .
build_docker_prod:
image: gitlab-registry.cern.ch/ci-tools/docker-image-builder:latest
stage: prebuild
script: "echo"
tags:
- docker-image-build
variables:
DOCKER_FILE: Dockerfile.prod
TO: ${CI_REGISTRY_IMAGE}/prod:${CI_COMMIT_BRANCH}
build_docker_qa:
image: gitlab-registry.cern.ch/ci-tools/docker-image-builder:latest
stage: prebuild
script: "echo"
tags:
- docker-image-build
variables:
DOCKER_FILE: Dockerfile.qa
TO: ${CI_REGISTRY_IMAGE}/qa:${CI_COMMIT_BRANCH}
test-go14:
stage: test
allow_failure: false
script:
- *installGo14
- *config
- echo "READY TO DO START THE CI TESTS"
- go14 test -v -cover ./tests/ci/...
- go14 test -race ./tests/ci/...
bench-go14:
stage: test
script:
- *installGo14
- go14 test ./tests/benchmarking/... -bench=. -benchmem
- go14 test ./tests/benchmarking/... -bench=. -benchmem -race
fmt-my-project:
stage: prebuild
script:
- yum install -y golang
- MOD_FILES=$(find . -name "*.go" -exec /usr/bin/go fmt {} \;)
- echo "FILES MODIFIED $MOD_FILES"
- if [ "$MOD_FILES" != "" ]; then false; fi