.gitlab-ci.yml raw
1 variables:
2 DOCKER_IMAGE: '$IMAGE_URL'
3 image: '$DOCKER_IMAGE'
4 stages:
5 - analyze
6 - lint
7 - test
8 - validate
9 - deploy
10 - release
11
12 analyze:lint:
13 stage: analyze
14 image: golangci/golangci-lint:v1.57
15 script:
16 - golangci-lint run -v
17 tags:
18 - k8s-tbk
19
20 lint:gofmt:
21 stage: lint
22 script:
23 - ci/gofmt.sh
24 tags:
25 - k8s-tbk
26
27 lint:vet:
28 stage: lint
29 script:
30 - go vet ./...
31 tags:
32 - k8s-tbk
33
34 lint:modtidy:
35 stage: lint
36 script:
37 - ci/tidy.sh
38 tags:
39 - k8s-tbk
40
41 test:go:
42 stage: test
43 script:
44 - go test ./...
45 tags:
46 - k8s-tbk
47
48 validate:tag-message:
49 stage: validate
50 only:
51 - tags
52 script:
53 - ci/validate_tag_message.sh $CI_COMMIT_TAG
54 tags:
55 - k8s-tbk
56
57 deploy:deploy-to-github:
58 stage: deploy
59 only:
60 - tags
61 script:
62 - ci/deploy_to_github.sh
63 tags:
64 - k8s-tbk
65
66 release:release-to-github:
67 stage: release
68 only:
69 - tags
70 script:
71 - ci/release_to_github.sh $CI_COMMIT_TAG
72 tags:
73 - k8s-tbk
74