Debian Codegraph @

codebuild/mqtt5-python-canary-test.yml

raw symbols SCIP
1 version: 0.2
2 #this build spec assumes the manylinux1 image for pypi
3 #additional packages we installed: cmake 3.5, libcrypto 1.1.0j, gcc 4.8.4
4 env:
5 shell: bash
6 variables:
7 CANARY_DURATION: 300
8 CANARY_THREADS: 3
9 CANARY_TPS: 50
10 CANARY_CLIENT_COUNT: 10
11 CANARY_LOG_FILE: 'canary_log.txt'
12 CANARY_LOG_LEVEL: 'ERROR'
13 PACKAGE_NAME: aws-crt-python
14 CANARY_TEST_EXE: 'python -m unittest --failfast --verbose 2>&1 | tee /tmp/tests.log test.test_mqtt5_canary'
15 CANARY_SERVER_ARN: Mqtt5MosquittoSever
16 phases:
17 install:
18 commands:
19 - apt-get update -y
20 - apt-get install gcc-7 cmake ninja-build python3 -y
21 - python3 -m pip install psutil
22 - python3 -m pip install boto3
23 pre_build:
24 commands:
25 - export CC=gcc-7
26 # Retrieve the private key from Secrets Manager
27 - DEPLOY_KEY=$(aws secretsmanager get-secret-value --secret-id Aws-crt-canaries-deploy-key --query SecretString --output text)
28
29 # Set up SSH configuration
30 - mkdir -p ~/.ssh
31 - echo "$DEPLOY_KEY" > ~/.ssh/id_rsa
32 - chmod 600 ~/.ssh/id_rsa
33
34 # Add GitHub to known hosts to avoid host verification prompt
35 - ssh-keyscan -H github.com >> ~/.ssh/known_hosts
36
37 # Configure SSH to use the key for GitHub
38 - |
39 cat > ~/.ssh/config << EOF
40 Host github.com
41 HostName github.com
42 User git
43 IdentityFile ~/.ssh/id_rsa
44 StrictHostKeyChecking no
45 EOF
46 - chmod 600 ~/.ssh/config
47 build:
48 commands:
49 - echo Build started on `date`
50 # pull and copy canary scripts
51 - git clone [email protected]:awslabs/aws-crt-canaries.git
52 - cp aws-crt-canaries/source/mqtt5/*.py ./codebuild
53 - source ./codebuild/mqtt5_test_setup.sh s3://aws-crt-test-stuff/TestIotProdMQTT5EnvironmentVariables.txt us-east-1
54 - export ENDPOINT=$(aws secretsmanager get-secret-value --secret-id "$CANARY_SERVER_ARN" --query "SecretString" | cut -f2 -d":" | sed -e 's/[\\\"\}]//g')
55 - export GIT_HASH=$(git rev-parse HEAD)
56 - $CODEBUILD_SRC_DIR/codebuild/mqtt5-python-canary-test.sh
57 post_build:
58 commands:
59 - echo Build completed on `date`
60 # Clean up SSH keys for security
61 - rm -rf ~/.ssh/id_rsa ~/.ssh/config