77 - ' docs'
88
99env :
10- BUILDER_VERSION : v0.9.75
10+ BUILDER_VERSION : v0.9.84
1111 BUILDER_SOURCE : releases
1212 BUILDER_HOST : https://d19elf31gohf1l.cloudfront.net
1313 PACKAGE_NAME : aws-iot-device-sdk-js-v2
1818 DA_SHADOW_PROPERTY : datest
1919 DA_SHADOW_VALUE_SET : ON
2020 DA_SHADOW_VALUE_DEFAULT : OFF
21- CI_IOT_CONTAINERS : arn:aws:iam::123124136734:role/CRT_IoT_Containers
22- CI_PUBSUB_ROLE : arn:aws:iam::180635532705:role/CI_PubSub_Role
23- CI_COGNITO_ROLE : arn:aws:iam::180635532705:role/CI_Cognito_Role
24- CI_X509_ROLE : arn:aws:iam::180635532705:role/CI_X509_Role
25- CI_CUSTOM_AUTHORIZER_ROLE : arn:aws:iam::180635532705:role/CI_CustomAuthorizer_Role
26- CI_SHADOW_ROLE : arn:aws:iam::180635532705:role/CI_Shadow_Role
27- CI_JOBS_ROLE : arn:aws:iam::180635532705:role/CI_Jobs_Role
2821 CI_FLEET_PROVISIONING_ROLE : arn:aws:iam::180635532705:role/service-role/CI_FleetProvisioning_Role
29- CI_DEVICE_ADVISOR : arn:aws:iam::180635532705:role/CI_DeviceAdvisor_Role
3022 CI_MQTT5_ROLE : arn:aws:iam::180635532705:role/CI_MQTT5_Role
3123 CI_SHADOW_SERVICE_CLIENT_ROLE : arn:aws:iam::180635532705:role/CI_ShadowServiceClient_Role
3224 CI_JOBS_SERVICE_CLIENT_ROLE : arn:aws:iam::180635532705:role/CI_JobsServiceClient_Role
@@ -41,38 +33,11 @@ jobs:
4133 run : |
4234 python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
4335 python builder.pyz build -p ${{ env.PACKAGE_NAME }}
44- - name : Running samples in CI setup
45- run : |
46- python -m pip install boto3
47- - name : configure AWS credentials (PubSub)
48- uses : aws-actions/configure-aws-credentials@v4
49- with :
50- role-to-assume : ${{ env.CI_PUBSUB_ROLE }}
51- aws-region : ${{ env.AWS_DEFAULT_REGION }}
52- - name : run PubSub sample
53- run : |
54- python ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_pubsub_cfg.json
55- # The electron app in CI would not perform any IoT operations. The CI only verify the app is launched correctly.
56- # This is because electron requires manually input for pwd while processing the credentials. Currently we don't have a good way to workaround it.
57- - name : run PubSub Electron sample
58- run : |
59- python ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_pubsub_electron_cfg.json
60- - name : run Windows Certificate Connect sample
61- run : |
62- python ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_windows_cert_connect_cfg.json
63- - name : configure AWS credentials (Device Advisor)
64- uses : aws-actions/configure-aws-credentials@v4
65- with :
66- role-to-assume : ${{ env.CI_DEVICE_ADVISOR }}
67- aws-region : ${{ env.AWS_DEFAULT_REGION }}
68- - name : run DeviceAdvisor
69- run : |
70- cd ./aws-iot-device-sdk-js-v2
71- python ./deviceadvisor/script/DATestRun.py
7236
7337 osx :
7438 runs-on : ${{ matrix.runner }}
7539 strategy :
40+ fail-fast : false
7641 matrix :
7742 runner :
7843 - macos-13
8550 python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
8651 chmod a+x builder
8752 ./builder build -p ${{ env.PACKAGE_NAME }}
88- - name : Running samples in CI setup
89- run : |
90- python3 -m venv .venv
91- source .venv/bin/activate
92- python3 -m pip install boto3
93- - name : configure AWS credentials (PubSub)
94- uses : aws-actions/configure-aws-credentials@v4
95- with :
96- role-to-assume : ${{ env.CI_PUBSUB_ROLE }}
97- aws-region : ${{ env.AWS_DEFAULT_REGION }}
98- - name : run PubSub sample
99- run : |
100- source .venv/bin/activate
101- python3 ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_pubsub_cfg.json
102-
103- # The electron app in CI would not perform any IoT operations. The CI only verify the app is launched correctly.
104- # This is because electron requires manually input for pwd while processing the credentials. Currently we don't have a good way to workaround it.
105- - name : run PubSub Electron sample
106- run : |
107- source .venv/bin/activate
108- python3 ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_pubsub_electron_cfg.json
109- - name : run PKCS12 sample
110- run : |
111- cert=$(aws secretsmanager get-secret-value --region us-east-1 --secret-id "ci/PubSub/cert" --query "SecretString" | cut -f2 -d":" | cut -f2 -d\") && echo -e "$cert" > /tmp/certificate.pem
112- key=$(aws secretsmanager get-secret-value --region us-east-1 --secret-id "ci/PubSub/key" --query "SecretString" | cut -f2 -d":" | cut -f2 -d\") && echo -e "$key" > /tmp/privatekey.pem
113- pkcs12_password=$(aws secretsmanager get-secret-value --region us-east-1 --secret-id "ci/PubSub/key_pkcs12_password" --query "SecretString" | cut -f2 -d":" | cut -f2 -d\")
114- openssl pkcs12 -export -in /tmp/certificate.pem -inkey /tmp/privatekey.pem -out /tmp/pkcs12-key.p12 -name PubSub_Thing_Alias -password pass:$pkcs12_password
115- source .venv/bin/activate
116- python3 ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_pkcs12_connect_cfg.json
117- - name : configure AWS credentials (Device Advisor)
118- uses : aws-actions/configure-aws-credentials@v4
119- with :
120- role-to-assume : ${{ env.CI_DEVICE_ADVISOR }}
121- aws-region : ${{ env.AWS_DEFAULT_REGION }}
122- - name : run DeviceAdvisor
123- run : |
124- source .venv/bin/activate
125- cd ./aws-iot-device-sdk-js-v2
126- python3 ./deviceadvisor/script/DATestRun.py
12753
12854 linux :
12955 runs-on : ubuntu-22.04 # latest
@@ -135,37 +61,11 @@ jobs:
13561 python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
13662 chmod a+x builder
13763 ./builder build -p ${{ env.PACKAGE_NAME }}
138- - name : Running samples in CI setup
139- run : |
140- python3 -m pip install boto3
141- - name : configure AWS credentials (PubSub)
142- uses : aws-actions/configure-aws-credentials@v4
143- with :
144- role-to-assume : ${{ env.CI_PUBSUB_ROLE }}
145- aws-region : ${{ env.AWS_DEFAULT_REGION }}
146- - name : run PubSub sample
147- run : |
148- python3 ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_pubsub_cfg.json
149-
150- # Electron requires X11 on linux, while github actions does not have X11 support. We work around it using XVFB.
151- - name : run PubSub Electron sample
152- run : |
153- export DISPLAY=:99
154- sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
155- python ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_pubsub_electron_cfg.json
156- - name : configure AWS credentials (Device Advisor)
157- uses : aws-actions/configure-aws-credentials@v4
158- with :
159- role-to-assume : ${{ env.CI_DEVICE_ADVISOR }}
160- aws-region : ${{ env.AWS_DEFAULT_REGION }}
161- - name : run DeviceAdvisor
162- run : |
163- cd ./aws-iot-device-sdk-js-v2
164- python3 ./deviceadvisor/script/DATestRun.py
16564
16665 v2-service-client-tests :
16766 runs-on : ${{ matrix.runner }}
16867 strategy :
68+ fail-fast : false
16969 matrix :
17070 runner :
17171 - macos-13
@@ -281,104 +181,6 @@ jobs:
281181 run : |
282182 export PYTHONPATH=${{ github.workspace }}/aws-iot-device-sdk-js-v2/utils
283183 python3 ./test_cases/test_jobs_execution.py --config-file test_cases/mqtt5_jobs_cfg.json
284- - name : configure AWS credentials (Connect and PubSub)
285- uses : aws-actions/configure-aws-credentials@v4
286- with :
287- role-to-assume : ${{ env.CI_PUBSUB_ROLE }}
288- aws-region : ${{ env.AWS_DEFAULT_REGION }}
289- - name : run Basic Connect sample
290- run : |
291- python3 ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_basic_connect_cfg.json
292- - name : run Websocket Connect sample
293- run : |
294- python3 ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_websocket_connect_cfg.json
295- - name : run PubSub sample
296- run : |
297- python3 ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_pubsub_cfg.json
298-
299- # Electron requires X11 on linux, while github actions does not have X11 support. We work around it using XVFB.
300- - name : run PubSub Electron sample
301- run : |
302- export DISPLAY=:99
303- sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
304- python ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_pubsub_electron_cfg.json
305- - name : run PubSub JS sample
306- run : |
307- python3 ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_pubsub_js_cfg.json
308- - name : run PKCS11 Connect sample
309- run : |
310- mkdir -p /tmp/tokens
311- export SOFTHSM2_CONF=/tmp/softhsm2.conf
312- echo "directories.tokendir = /tmp/tokens" > /tmp/softhsm2.conf
313- python3 ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_pkcs11_connect_cfg.json
314- - name : configure AWS credentials (Cognito)
315- uses : aws-actions/configure-aws-credentials@v4
316- with :
317- role-to-assume : ${{ env.CI_COGNITO_ROLE }}
318- aws-region : ${{ env.AWS_DEFAULT_REGION }}
319- - name : run Cognito Connect sample
320- run : |
321- python3 ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_cognito_connect_cfg.json
322- - name : configure AWS credentials (X509)
323- uses : aws-actions/configure-aws-credentials@v4
324- with :
325- role-to-assume : ${{ env.CI_X509_ROLE }}
326- aws-region : ${{ env.AWS_DEFAULT_REGION }}
327- - name : run X509 sample
328- run : |
329- python3 ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_x509_connect_cfg.json
330- - name : configure AWS credentials (Custom Authorizer)
331- uses : aws-actions/configure-aws-credentials@v4
332- with :
333- role-to-assume : ${{ env.CI_CUSTOM_AUTHORIZER_ROLE }}
334- aws-region : ${{ env.AWS_DEFAULT_REGION }}
335- - name : run CustomAuthorizerConnect sample
336- run : |
337- python3 ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_custom_authorizer_connect_cfg.json
338- - name : configure AWS credentials (Shadow)
339- uses : aws-actions/configure-aws-credentials@v4
340- with :
341- role-to-assume : ${{ env.CI_SHADOW_ROLE }}
342- aws-region : ${{ env.AWS_DEFAULT_REGION }}
343- - name : run v1 Shadow sample
344- run : |
345- python3 ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_shadow_cfg.json
346- - name : run v1 Mqtt5 Shadow sample
347- run : |
348- python3 ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_shadow_mqtt5_cfg.json
349- - name : configure AWS credentials (Jobs)
350- uses : aws-actions/configure-aws-credentials@v4
351- with :
352- role-to-assume : ${{ env.CI_JOBS_ROLE }}
353- aws-region : ${{ env.AWS_DEFAULT_REGION }}
354- - name : run v1 Jobs sample
355- run : |
356- python3 ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_jobs_cfg.json
357- - name : run v1 Mqtt5 Jobs sample
358- run : |
359- python3 ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_jobs_mqtt5_cfg.json
360- - name : configure AWS credentials (Fleet provisioning)
361- uses : aws-actions/configure-aws-credentials@v4
362- with :
363- role-to-assume : ${{ env.CI_FLEET_PROVISIONING_ROLE }}
364- aws-region : ${{ env.AWS_DEFAULT_REGION }}
365- - name : run v1 Fleet Provisioning sample
366- run : |
367- python3 ./aws-iot-device-sdk-js-v2/utils/run_fleet_provisioning_sample.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_fleet_provisioning_cfg.json --thing-name-prefix "Fleet_Thing_"
368- - name : run v1 Mqtt5 Fleet Provisioning sample
369- run : |
370- python3 ./aws-iot-device-sdk-js-v2/utils/run_fleet_provisioning_sample.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_fleet_provisioning_mqtt5_cfg.json --thing-name-prefix "Fleet_Thing_"
371- - name : configure AWS credentials (MQTT5 PubSub)
372- uses : aws-actions/configure-aws-credentials@v4
373- with :
374- role-to-assume : ${{ env.CI_MQTT5_ROLE }}
375- aws-region : ${{ env.AWS_DEFAULT_REGION }}
376- - name : run MQTT5 PubSub sample
377- run : |
378- python3 ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_mqtt5_pubsub_cfg.json
379- - name : run MQTT5 Shared Subscription sample
380- run : |
381- python3 ./aws-iot-device-sdk-js-v2/utils/run_in_ci.py --file ./aws-iot-device-sdk-js-v2/.github/workflows/ci_run_mqtt5_shared_subscription_cfg.json
382184
383185 # check that docs can still build
384186 check-docs :
0 commit comments