-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
67 lines (55 loc) · 1.9 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
include: https://gitlab-templates.ddbuild.io/compute-delivery/v2/compute-delivery.yml
variables:
CI_APP: draino
CURRENT_CI_IMAGE: "v1.0.1"
.export-github-token: &export-github-token export GITHUB_TOKEN=$(aws ssm get-parameter --region us-east-1 --name github.user.datadog-compute-robot --with-decryption --query "Parameter.Value" --out text) && git config --global url."https://${GITHUB_TOKEN}@github.com/DataDog".insteadOf https://github.com/DataDog
.export-cnab-token: &export-cnab-token export CNAB_API_TOKEN=$(aws ssm get-parameter --region us-east-1 --name sdm.production_deploy.token --with-decryption --query "Parameter.Value" --out text)
.ci-variables: &ci-variables
variables:
GOPRIVATE: github.com/DataDog/*
GO111MODULE: "on"
.ci: &ci
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/$CI_APP:$CURRENT_CI_IMAGE
<<: *ci-variables
ci-image:
image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/docker:18.03.1
stage: ci-image
when: manual
except: [ tags, schedules ]
tags: [ "runner:docker" ]
script:
- docker build --tag 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/$CI_APP:$CURRENT_CI_IMAGE ci
- docker push 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/$CI_APP:$CURRENT_CI_IMAGE
goreleaser-snapshot:
extends: .compute-ci.goreleaser-snapshot
before_script:
- *export-github-token
goreleaser:
extends: .compute-ci.goreleaser
before_script:
- *export-github-token
cnab-diff:
extends: .cnab-diff
before_script:
- *export-github-token
- *export-cnab-token
cnab-apply:
extends: .cnab-apply
before_script:
- *export-github-token
- *export-cnab-token
update-single-image:
extends: .update-single-image
before_script:
- *export-github-token
update-all-images:
extends: .update-all-images
before_script:
- *export-github-token
test:
<<: *ci
tags: ["runner:main"]
stage: verify
script:
- *export-github-token
- make test