-
Notifications
You must be signed in to change notification settings - Fork 217
/
Copy pathtest_test_pypi.yml
30 lines (27 loc) · 1.59 KB
/
test_test_pypi.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
version: 0.2
# this image assumes Ubuntu 14.04 base image
phases:
install:
commands:
- sudo apt-get update -y
- sudo apt-get install python3 python3-pip -y
- python3 -m pip install --upgrade pip
- python3 -m pip install --upgrade setuptools
pre_build:
commands:
- curl https://www.amazontrust.com/repository/AmazonRootCA1.pem --output /tmp/AmazonRootCA1.pem
- cert=$(aws secretsmanager get-secret-value --secret-id "unit-test/certificate" --query "SecretString" | cut -f2 -d":" | cut -f2 -d\") && echo "$cert" > /tmp/certificate.pem
- key=$(aws secretsmanager get-secret-value --secret-id "unit-test/privatekey" --query "SecretString" | cut -f2 -d":" | cut -f2 -d\") && echo "$key" > /tmp/privatekey.pem
- ENDPOINT=$(aws secretsmanager get-secret-value --secret-id "unit-test/endpoint" --query "SecretString" | cut -f2 -d":" | sed -e 's/[\\\"\}]//g')
build:
commands:
- echo Build started on `date`
- cd aws-iot-device-sdk-python-v2
- CURRENT_TAG_VERSION=$(git describe --tags | cut -f2 -dv)
# this is here because typing isn't in testpypi, so pull it from prod instead
- python3 -m pip install typing
- python3 continuous-delivery/pip-install-with-retry.py -i https://testpypi.python.org/simple --user awsiotsdk==$CURRENT_TAG_VERSION
- python3 samples/basic_discovery.py --region us-east-1 --cert /tmp/certificate.pem --key /tmp/privatekey.pem --ca_file /tmp/AmazonRootCA1.pem --thing_name aws-sdk-crt-unit-test --print_discover_resp_only -v Trace
post_build:
commands:
- echo Build completed on `date`