Skip to content

Commit 9f60220

Browse files
authored
.gitlab-ci: add deploy job (DataDog#682)
1 parent 672e8e0 commit 9f60220

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.gitlab-ci

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
stages:
2+
- deploy
3+
4+
variables:
5+
INDEX_FILE: index.txt
6+
7+
.common: &common
8+
tags: [ "runner:main", "size:large" ]
9+
10+
copy_to_s3:
11+
<<: *common
12+
stage: deploy
13+
image: registry.gitlab.com/gitlab-org/cloud-deploy/aws-base:latest
14+
rules:
15+
- if: '$CI_COMMIT_BRANCH == "v1"'
16+
when: on_success
17+
script:
18+
- export ACCESS_KEY_ID=$(aws ssm get-parameter --region us-east-1 --name ci.dd-trace-go.secret_key_id --with-decryption --query "Parameter.Value" --out text)
19+
- export SECRET_ACCESS_KEY=$(aws ssm get-parameter --region us-east-1 --name ci.dd-trace-go.secret_sec_key_id --with-decryption --query "Parameter.Value" --out text)
20+
- export AWS_ACCESS_KEY_ID=$ACCESS_KEY_ID
21+
- export AWS_SECRET_ACCESS_KEY=$SECRET_ACCESS_KEY
22+
- echo $CI_COMMIT_REF_NAME >> $INDEX_FILE
23+
- echo $CI_COMMIT_SHA >> $INDEX_FILE
24+
- echo $GITLAB_USER_NAME >> $INDEX_FILE
25+
- aws s3 cp $INDEX_FILE s3://datadog-reliability-env/go/$INDEX_FILE

0 commit comments

Comments
 (0)