File tree 2 files changed +20
-0
lines changed
2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -e
4
+
5
+ unset AWS_SESSION_TOKEN
6
+
7
+ role_arn=" $1 "
8
+ region=" $2 "
9
+ temp_role=$( aws sts assume-role \
10
+ --role-arn " ${role_arn} " \
11
+ --role-session-name " concourse-task" \
12
+ --duration 1800)
13
+
14
+ export AWS_ACCESS_KEY_ID=$( echo $temp_role | jq .Credentials.AccessKeyId | xargs)
15
+ export AWS_SECRET_ACCESS_KEY=$( echo $temp_role | jq .Credentials.SecretAccessKey | xargs)
16
+ export AWS_SESSION_TOKEN=$( echo $temp_role | jq .Credentials.SessionToken | xargs)
17
+ export AWS_DEFAULT_REGION=${region:- eu-west-2}
Original file line number Diff line number Diff line change 34
34
pip install -r requirements-pipeline.txt
35
35
pre-commit install -c .gds/.pre-commit-config.yaml
36
36
git config --global core.hookspath ../global_install/hooks
37
+ source ../concourse/bin/sts-assume-role.sh /
38
+ 'arn:aws:iam::103495720024:role/gds_pre_commit_tests_role)' /
39
+ 'eu-west-2'
37
40
make run
You can’t perform that action at this time.
0 commit comments