-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbitbucket-pipelines.yml
30 lines (29 loc) · 1.15 KB
/
bitbucket-pipelines.yml
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
26
27
28
29
30
image: python:3.6
pipelines:
default:
- step:
name: Test and create artifacts/schema.json
oidc: true
script:
# venv setup
- python --version
- python -m venv venv
- . venv/bin/activate
- pip install --upgrade pip
- python setup.py install
# run tests and create artifacts/schema.json
- git clone https://[email protected]/awpenn/upenn-dictionaryutils.git; cd upenn-dictionaryutils
- ./run_tests.sh
# install awscli dependencies
- pip install awscli
- pip install colorama
- pip list
# test awscli install
- aws --version
- cat artifacts/schema.json
# s3 cp artifacts/schema.json to s3 bucket
- export AWS_REGION=us-east-1
- export AWS_ROLE_ARN=arn:aws:iam::179308192920:role/BBPipelines-role-01
- echo $BITBUCKET_STEP_OIDC_TOKEN > $(pwd)/web-identity-token
- export AWS_WEB_IDENTITY_TOKEN_FILE=$(pwd)/web-identity-token
- aws s3 cp ./artifacts/schema.json s3://addapt-gen3-utility-bucket/datadictionary/master/schema.json