-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
58 lines (50 loc) · 974 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
48
49
50
51
52
53
54
55
56
57
58
stages:
- build
- test
- deploy
services:
- name: docker:dind
command: ["--experimental"]
before_script:
- apk --no-cache add git just
image: docker:git
variables:
PLATFORMS: "linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6"
.matrix:
parallel:
matrix:
- VERSION:
- "latest"
build:
extends:
- .matrix
stage: build
script:
- just build "${VERSION}" "linux/amd64" "local"
- just run
- docker stop unbound
- >
just
USER="${CI_REGISTRY_USER}"
PASSWORD="${CI_REGISTRY_PASSWORD}"
REGISTRY="${CI_REGISTRY}"
REPOSITORY="${CI_REGISTRY_IMAGE}"
upload "${VERSION}" "${PLATFORMS}"
scan:
extends:
- .matrix
image:
name: aquasec/trivy
entrypoint: [""]
stage: test
script:
- just scan "${CI_REGISTRY_IMAGE}:${VERSION}"
deploy:
extends:
- .matrix
only:
- master
retry: 1
stage: deploy
script:
- just upload "${VERSION}" "${PLATFORMS}"