-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
47 lines (38 loc) · 973 Bytes
/
.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
---
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_8: 'True'
DIST_8: .el8
.install_go: &install_go |
yum -y install git gcc golang
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 ./tests/...
- go test -race ./tests
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}