-
Notifications
You must be signed in to change notification settings - Fork 439
/
.gitlab-ci
25 lines (22 loc) · 940 Bytes
/
.gitlab-ci
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
stages:
- deploy
variables:
INDEX_FILE: index.txt
.common: &common
tags: [ "runner:main", "size:large" ]
copy_to_s3:
<<: *common
stage: deploy
image: registry.gitlab.com/gitlab-org/cloud-deploy/aws-base:latest
rules:
- if: '$CI_COMMIT_BRANCH == "v1"'
when: on_success
script:
- 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)
- 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)
- export AWS_ACCESS_KEY_ID=$ACCESS_KEY_ID
- export AWS_SECRET_ACCESS_KEY=$SECRET_ACCESS_KEY
- echo $CI_COMMIT_REF_NAME >> $INDEX_FILE
- echo $CI_COMMIT_SHA >> $INDEX_FILE
- echo $GITLAB_USER_NAME >> $INDEX_FILE
- aws s3 cp $INDEX_FILE s3://datadog-reliability-env/go/$INDEX_FILE