forked from cernops/golbd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
48 lines (40 loc) · 1.08 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
---
image: gitlab-registry.cern.ch/linuxsupport/c8-base:latest
include:
- 'https://gitlab.cern.ch/linuxsupport/rpmci/raw/master/rpm-ci.yml'
variables:
KOJI_TAG: 'lb'
BUILD_8s: 'True'
.install_go: &install_go |
yum -y install git gcc golang
mkdir -p /root/go/src/gitlab.cern.ch/lb-experts/
ln -s $(pwd) /root/go/src/gitlab.cern.ch/lb-experts/golbd
cd /root/go/src/gitlab.cern.ch/lb-experts/golbd
go get || true
build-my-project:
stage: prebuild
script:
- *install_go
- go build
- go build -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
test-my-project:
stage: prebuild
script:
- *install_go
- go test -v -cover ./...
- go test -race
build_docker_image_stable:
image: gitlab-registry.cern.ch/ci-tools/docker-image-builder:latest
stage: prebuild
script: "echo"
tags:
- docker-image-build
variables:
TO: ${CI_REGISTRY_IMAGE}:${CI_COMMIT_BRANCH}