Skip to content

Commit

Permalink
Add gpg key
Browse files Browse the repository at this point in the history
  • Loading branch information
rtfpessoa committed Jul 31, 2018
1 parent 5d9e6b4 commit cf90982
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,20 @@ jobs:
- *setup_dependencies_key
- *restore_dependencies
- *restore_build
- run:
name: Install AWS CLI
command: |
sudo apt -y update
sudo apt -y install python3-pip
sudo python3 -m pip install awscli
- run:
name: Setup AWS Credentials
command: ./scripts/setup-aws-credentials.sh
- run:
name: Retrieve GPG Keys
command: |
mkdir -p ~/.gnupg
aws s3 sync --profile shared-services --include '*.gpg' s3://$AWS_CREDENTIALS_BUCKET/gnupg/ ~/.gnupg
- run:
name: Publish library
command: ./scripts/publish-lib.sh 5.0.$CIRCLE_BUILD_NUM
Expand Down Expand Up @@ -191,6 +205,7 @@ workflows:
requires:
- compile
- publish_library:
context: CodacyAWS
requires:
- compile
- test
Expand Down
14 changes: 14 additions & 0 deletions scripts/setup-aws-credentials.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

set -e

mkdir -p ~/.aws && touch ~/.aws/credentials

cat >> ~/.aws/credentials << EOF
[default]
aws_access_key_id=$ACCESS_KEY_ID
aws_secret_access_key=$SECRET_ACCESS_KEY
[shared-services]
source_profile = default
role_arn = arn:aws:iam::$ACCOUNT_ID:role/CredentialsBucketReader
EOF

0 comments on commit cf90982

Please sign in to comment.