-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.gitlab-ci.yml
32 lines (29 loc) · 1 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
image: golang
stages:
- build
- build-image
build:
stage: build
script:
- GOOS=linux GOARCH=amd64 make eth2-monitor && mv bin/eth2-monitor{,-linux-amd64}
- GOOS=darwin GOARCH=amd64 make eth2-monitor && mv bin/eth2-monitor{,-darwin-amd64}
- GOOS=freebsd GOARCH=amd64 make eth2-monitor && mv bin/eth2-monitor{,-freebsd-amd64}
- GOOS=windows GOARCH=amd64 make eth2-monitor && mv bin/eth2-monitor{,-windows-amd64}
artifacts:
paths:
- bin/
build-image:
stage: build-image
image:
name: gcr.io/kaniko-project/executor:v1.7.0-debug
entrypoint: [""]
script:
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"${CI_REGISTRY}\":{\"auth\":\"$(printf "%s:%s" "${CI_REGISTRY_USER}" "${CI_REGISTRY_PASSWORD}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
- >-
/kaniko/executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
--destination "${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}"
rules:
- if: $CI_COMMIT_TAG