Skip to content

Commit

Permalink
Some fixes, print caller identity for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
rell-fastly committed Jul 16, 2020
1 parent 0b9a1b0 commit f8c72c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
pip install botocore boto3
- name: Update metadata
run: |
aws sts get-caller-identity
./scripts/update-release-metadata.py sigsci-module-golang ${{ github.ref }}
env:
PROD_ID: ${{ secrets.SIGSCI_PROD_CANONICAL_ID }}
Expand Down
8 changes: 5 additions & 3 deletions scripts/update-release-metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ def write_metadata(data):
resp = client.put_object(
Body=data,
Bucket='release-metadata',
Key='release-versions',
GrantFullControl=prod_canonical_id
Key='release-versions-rell',
GrantFullControl=f'id={prod_canonical_id}'
)

if resp.ResponseMetadata.HTTPStatusCode != 200:
print(resp)

if resp["ResponseMetadata"]["HTTPStatusCode"] != 200:
sys.stderr.write('Unable to upload file. Dumping response metadata.\n')
print(resp, file=sys.stderr)
return 1
Expand Down

0 comments on commit f8c72c0

Please sign in to comment.