-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
43 lines (40 loc) · 1.21 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
stages:
- test
- build
- deploy
test:
image: harbor.ulbricht.casa/proxy/library/golang:1.21-alpine
stage: test
script:
- go vet .
- go build -o kubernetes-deployment-version-checker
docker-build:
stage: deploy
image:
name: gcr.io/kaniko-project/executor:debug
pull_policy: always
entrypoint: [""]
before_script:
- echo $KANIKO_DOCKERHUB_AND_HARBOR > /kaniko/.docker/config.json
script:
- /kaniko/executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
--destination "harbor.ulbricht.casa/imanuel/kubernetes-version-checker:2.0.${CI_PIPELINE_IID}"
--destination "harbor.ulbricht.casa/imanuel/kubernetes-version-checker:latest"
--destination "iulbricht/kubernetes-version-checker:2.0.${CI_PIPELINE_IID}"
--destination "iulbricht/kubernetes-version-checker:latest"
rules:
- if: $CI_COMMIT_BRANCH == "v2"
exists:
- Dockerfile
binary-build-linux:
image: harbor.ulbricht.casa/proxy/library/golang:1.21-alpine
stage: build
script:
- go build -o kubernetes-deployment-version-checker
artifacts:
paths:
- kubernetes-deployment-version-checker
rules:
- if: $CI_COMMIT_BRANCH == "v2"