7
7
- ' docs'
8
8
9
9
env :
10
- BUILDER_VERSION : v0.9.75
10
+ BUILDER_VERSION : v0.9.84
11
11
BUILDER_SOURCE : releases
12
12
BUILDER_HOST : https://d19elf31gohf1l.cloudfront.net
13
13
PACKAGE_NAME : aws-iot-device-sdk-java-v2
19
19
DA_SHADOW_PROPERTY : datest
20
20
DA_SHADOW_VALUE_SET : ON
21
21
DA_SHADOW_VALUE_DEFAULT : OFF
22
- CI_IOT_CONTAINERS : arn:aws:iam::123124136734:role/CRT_IoT_Containers
23
- CI_PUBSUB_ROLE : arn:aws:iam::180635532705:role/CI_PubSub_Role
24
- CI_COGNITO_ROLE : arn:aws:iam::180635532705:role/CI_Cognito_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
28
22
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
30
- CI_X509_ROLE : arn:aws:iam::180635532705:role/CI_X509_Role
31
23
CI_MQTT5_ROLE : arn:aws:iam::180635532705:role/CI_MQTT5_Role
32
24
CI_ANDROID_DEVICE_TESTING_ROLE : arn:aws:iam::180635532705:role/CI_Android_Device_Testing_Role
33
25
CI_SHADOW_SERVICE_CLIENT_ROLE : arn:aws:iam::180635532705:role/CI_ShadowServiceClient_Role
83
75
source utils/test_setup.sh s3://iot-sdk-ci-bucket-us-east1/IotUsProdMqtt5EnvironmentVariables.txt us-east-1
84
76
mvn test -Dtest=Mqtt5BuilderTest -Dsurefire.failIfNoSpecifiedTests=false
85
77
source utils/test_cleanup.sh
86
- - name : Running samples in CI setup
87
- run : |
88
- python -m pip install boto3
89
- mvn install -DskipTests
90
- - name : configure AWS credentials (PubSub)
91
- uses : aws-actions/configure-aws-credentials@v2
92
- with :
93
- role-to-assume : ${{ env.CI_PUBSUB_ROLE }}
94
- aws-region : ${{ env.AWS_DEFAULT_REGION }}
95
- - name : run PubSub sample
96
- run : |
97
- python ./utils/run_in_ci.py --file ./.github/workflows/ci_run_pubsub_cfg.json
98
- - name : run Windows Certificate Connect sample
99
- run : |
100
- python ./utils/run_in_ci.py --file ./.github/workflows/ci_run_windows_cert_connect_cfg.json
101
- - name : configure AWS credentials (MQTT5)
102
- uses : aws-actions/configure-aws-credentials@v2
103
- with :
104
- role-to-assume : ${{ env.CI_MQTT5_ROLE }}
105
- aws-region : ${{ env.AWS_DEFAULT_REGION }}
106
- - name : run MQTT5 PubSub sample
107
- run : |
108
- python3 ./utils/run_in_ci.py --file ./.github/workflows/ci_run_mqtt5_pubsub_cfg.json
109
- - name : configure AWS credentials (Device Advisor)
110
- uses : aws-actions/configure-aws-credentials@v2
111
- with :
112
- role-to-assume : ${{ env.CI_DEVICE_ADVISOR }}
113
- aws-region : ${{ env.AWS_DEFAULT_REGION }}
114
- - name : run DeviceAdvisor
115
- run : |
116
- python ./deviceadvisor/script/DATestRun.py
117
78
118
79
osx-java-compat :
119
80
runs-on : macos-latest
@@ -162,47 +123,6 @@ jobs:
162
123
source utils/test_setup.sh s3://iot-sdk-ci-bucket-us-east1/IotUsProdMqtt5EnvironmentVariables.txt us-east-1
163
124
mvn test -Dtest=Mqtt5BuilderTest -DfailIfNoTests=false -Dsurefire.failIfNoSpecifiedTests=false
164
125
source utils/test_cleanup.sh
165
- - name : Running samples in CI setup
166
- run : |
167
- python3 -m venv .venv
168
- source .venv/bin/activate
169
- python3 -m pip install boto3
170
- mvn install -Dmaven.test.skip=true
171
- - name : configure AWS credentials (PubSub)
172
- uses : aws-actions/configure-aws-credentials@v2
173
- with :
174
- role-to-assume : ${{ env.CI_PUBSUB_ROLE }}
175
- aws-region : ${{ env.AWS_DEFAULT_REGION }}
176
- - name : run PubSub sample
177
- run : |
178
- source .venv/bin/activate
179
- python3 ./utils/run_in_ci.py --file ./.github/workflows/ci_run_pubsub_cfg.json
180
- - name : run PKCS12 Connect sample
181
- run : |
182
- 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
183
- 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
184
- 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\")
185
- openssl pkcs12 -export -in /tmp/certificate.pem -inkey /tmp/privatekey.pem -out ./pkcs12-key.p12 -name PubSub_Thing_Alias -password pass:$pkcs12_password
186
- source .venv/bin/activate
187
- python3 ./utils/run_in_ci.py --file ./.github/workflows/ci_run_pkcs12_connect_cfg.json
188
- - name : configure AWS credentials (MQTT5)
189
- uses : aws-actions/configure-aws-credentials@v2
190
- with :
191
- role-to-assume : ${{ env.CI_MQTT5_ROLE }}
192
- aws-region : ${{ env.AWS_DEFAULT_REGION }}
193
- - name : run MQTT5 PubSub sample
194
- run : |
195
- source .venv/bin/activate
196
- python3 ./utils/run_in_ci.py --file ./.github/workflows/ci_run_mqtt5_pubsub_cfg.json
197
- - name : configure AWS credentials (Device Advisor)
198
- uses : aws-actions/configure-aws-credentials@v2
199
- with :
200
- role-to-assume : ${{ env.CI_DEVICE_ADVISOR }}
201
- aws-region : ${{ env.AWS_DEFAULT_REGION }}
202
- - name : run DeviceAdvisor
203
- run : |
204
- source .venv/bin/activate
205
- python3 ./deviceadvisor/script/DATestRun.py
206
126
207
127
linux-java-compat :
208
128
runs-on : ubuntu-latest
@@ -251,33 +171,6 @@ jobs:
251
171
source utils/test_setup.sh s3://iot-sdk-ci-bucket-us-east1/IotUsProdMqtt5EnvironmentVariables.txt us-east-1
252
172
mvn test -Dtest=Mqtt5BuilderTest -Dsurefire.failIfNoSpecifiedTests=false
253
173
source utils/test_cleanup.sh
254
- - name : Running samples in CI setup
255
- run : |
256
- python3 -m pip install boto3
257
- - name : configure AWS credentials (PubSub)
258
- uses : aws-actions/configure-aws-credentials@v2
259
- with :
260
- role-to-assume : ${{ env.CI_PUBSUB_ROLE }}
261
- aws-region : ${{ env.AWS_DEFAULT_REGION }}
262
- - name : run PubSub sample
263
- run : |
264
- python3 ./utils/run_in_ci.py --file ./.github/workflows/ci_run_pubsub_cfg.json
265
- - name : configure AWS credentials (MQTT5)
266
- uses : aws-actions/configure-aws-credentials@v2
267
- with :
268
- role-to-assume : ${{ env.CI_MQTT5_ROLE }}
269
- aws-region : ${{ env.AWS_DEFAULT_REGION }}
270
- - name : run MQTT5 PubSub sample
271
- run : |
272
- python3 ./utils/run_in_ci.py --file ./.github/workflows/ci_run_mqtt5_pubsub_cfg.json
273
- - name : configure AWS credentials (Device Advisor)
274
- uses : aws-actions/configure-aws-credentials@v2
275
- with :
276
- role-to-assume : ${{ env.CI_DEVICE_ADVISOR }}
277
- aws-region : ${{ env.AWS_DEFAULT_REGION }}
278
- - name : run DeviceAdvisor
279
- run : |
280
- python3 ./deviceadvisor/script/DATestRun.py
281
174
282
175
android-device-farm :
283
176
name : Android Device Farm
@@ -290,13 +183,18 @@ jobs:
290
183
uses : actions/checkout@v2
291
184
with :
292
185
submodules : true
293
- # Setup JDK 11
294
- - name : set up JDK 11
295
- uses : actions/setup-java@v3.14.1
186
+ # Setup JDK 17
187
+ - name : set up JDK 17
188
+ uses : actions/setup-java@v4
296
189
with :
297
- java-version : ' 11 '
190
+ java-version : ' 17 '
298
191
distribution : ' temurin'
299
192
cache : ' gradle'
193
+ # Ensure Gradle uses this JDK (important when toolchains are present)
194
+ - name : Point Gradle at JDK 17
195
+ run : echo "ORG_GRADLE_JAVA_HOME=$JAVA_HOME" >> $GITHUB_ENV
196
+ - name : Mirror ANDROID_HOME → ANDROID_SDK_ROOT
197
+ run : echo "ANDROID_SDK_ROOT=$ANDROID_HOME" >> "$GITHUB_ENV"
300
198
- name : Configure AWS credentials for Device Farm
301
199
uses : aws-actions/configure-aws-credentials@v2
302
200
with :
@@ -314,6 +212,21 @@ jobs:
314
212
cd sdk/tests/android/testapp/src/main/assets
315
213
python3 -m pip install boto3
316
214
python3 ./android_file_creation.py
215
+
216
+ - name : Set Android keystore home
217
+ run : |
218
+ echo "ANDROID_SDK_HOME=$GITHUB_WORKSPACE/.android-home" >> "$GITHUB_ENV"
219
+ echo "ANDROID_PREFS_ROOT=$GITHUB_WORKSPACE/.android-home" >> "$GITHUB_ENV"
220
+ mkdir -p "$GITHUB_WORKSPACE/.android-home/.android"
221
+ - name : Create debug keystore
222
+ run : |
223
+ keytool -genkeypair \
224
+ -keystore "$ANDROID_SDK_HOME/.android/debug.keystore" \
225
+ -storepass android -keypass android \
226
+ -alias androiddebugkey \
227
+ -dname "CN=Android Debug,O=Android,C=US" \
228
+ -keyalg RSA -keysize 2048 -validity 14000
229
+
317
230
- name : Build Test App
318
231
run : |
319
232
cd sdk/tests/android/testapp
@@ -466,102 +379,3 @@ jobs:
466
379
run : |
467
380
export PYTHONPATH=${{ github.workspace }}/utils
468
381
python3 ./test_cases/test_jobs_execution.py --mqtt-version 5
469
- - name : configure AWS credentials (Connect and PubSub)
470
- uses : aws-actions/configure-aws-credentials@v2
471
- with :
472
- role-to-assume : ${{ env.CI_PUBSUB_ROLE }}
473
- aws-region : ${{ env.AWS_DEFAULT_REGION }}
474
- - name : run Basic Connect sample
475
- run : |
476
- python3 ./utils/run_in_ci.py --file ./.github/workflows/ci_run_basic_connect_cfg.json
477
- - name : run Websocket Connect sample
478
- run : |
479
- python3 ./utils/run_in_ci.py --file ./.github/workflows/ci_run_websocket_connect_cfg.json
480
- - name : run PubSub sample
481
- run : |
482
- python3 ./utils/run_in_ci.py --file ./.github/workflows/ci_run_pubsub_cfg.json
483
- - name : run CustomKeyOperations sample
484
- run : |
485
- python3 ./utils/run_in_ci.py --file ./.github/workflows/ci_run_custom_key_ops_cfg.json
486
- - name : run PKCS11 Connect sample
487
- run : |
488
- mkdir -p /tmp/tokens
489
- export SOFTHSM2_CONF=/tmp/softhsm2.conf
490
- echo "directories.tokendir = /tmp/tokens" > /tmp/softhsm2.conf
491
- python3 ./utils/run_in_ci.py --file ./.github/workflows/ci_run_pkcs11_connect_cfg.json
492
- - name : run Java keystore Connect sample
493
- run : |
494
- 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
495
- 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
496
- 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\")
497
- openssl pkcs12 -export -in /tmp/certificate.pem -inkey /tmp/privatekey.pem -out /tmp/pkcs12-key.p12 -name PubSub_Thing_Alias -password pass:$pkcs12_password
498
- keytool -importkeystore -srckeystore /tmp/pkcs12-key.p12 -destkeystore ./java_keystore.keys -srcstoretype PKCS12 -alias PubSub_Thing_Alias -srcstorepass $pkcs12_password -deststorepass $pkcs12_password
499
- python3 ./utils/run_in_ci.py --file ./.github/workflows/ci_run_keystore_connect_cfg.json
500
- - name : configure AWS credentials (Cognito)
501
- uses : aws-actions/configure-aws-credentials@v2
502
- with :
503
- role-to-assume : ${{ env.CI_COGNITO_ROLE }}
504
- aws-region : ${{ env.AWS_DEFAULT_REGION }}
505
- - name : run CognitoConnect sample
506
- run : |
507
- python3 ./utils/run_in_ci.py --file ./.github/workflows/ci_run_cognito_connect_cfg.json
508
- - name : configure AWS credentials (Custom Authorizer)
509
- uses : aws-actions/configure-aws-credentials@v2
510
- with :
511
- role-to-assume : ${{ env.CI_CUSTOM_AUTHORIZER_ROLE }}
512
- aws-region : ${{ env.AWS_DEFAULT_REGION }}
513
- - name : run CustomAuthorizerConnect sample
514
- run : |
515
- python3 ./utils/run_in_ci.py --file ./.github/workflows/ci_run_custom_authorizer_connect_cfg.json
516
- - name : configure AWS credentials (Shadow)
517
- uses : aws-actions/configure-aws-credentials@v2
518
- with :
519
- role-to-assume : ${{ env.CI_SHADOW_ROLE }}
520
- aws-region : ${{ env.AWS_DEFAULT_REGION }}
521
- - name : run Shadow sample
522
- run : |
523
- python3 ./utils/run_in_ci.py --file ./.github/workflows/ci_run_shadow_cfg.json
524
- - name : run Mqtt5 Shadow sample
525
- run : |
526
- python3 ./utils/run_in_ci.py --file ./.github/workflows/ci_run_shadow_mqtt5_cfg.json
527
- - name : configure AWS credentials (Jobs)
528
- uses : aws-actions/configure-aws-credentials@v2
529
- with :
530
- role-to-assume : ${{ env.CI_JOBS_ROLE }}
531
- aws-region : ${{ env.AWS_DEFAULT_REGION }}
532
- - name : run Jobs sample
533
- run : |
534
- python3 ./utils/run_in_ci.py --file ./.github/workflows/ci_run_jobs_cfg.json
535
- - name : run Mqtt5 Jobs sample
536
- run : |
537
- python3 ./utils/run_in_ci.py --file ./.github/workflows/ci_run_jobs_mqtt5_cfg.json
538
- - name : configure AWS credentials (Fleet provisioning)
539
- uses : aws-actions/configure-aws-credentials@v2
540
- with :
541
- role-to-assume : ${{ env.CI_FLEET_PROVISIONING_ROLE }}
542
- aws-region : ${{ env.AWS_DEFAULT_REGION }}
543
- - name : run Fleet Provisioning sample
544
- run : |
545
- python3 ./utils/run_fleet_provisioning_sample.py --file ./.github/workflows/ci_run_fleet_provisioning_cfg.json --thing-name-prefix "Fleet_Thing_"
546
- - name : run Mqtt5 Fleet Provisioning sample
547
- run : |
548
- python3 ./utils/run_fleet_provisioning_sample.py --file ./.github/workflows/ci_run_fleet_provisioning_mqtt5_cfg.json --thing-name-prefix "Fleet_Thing_"
549
- - name : configure AWS credentials (X509)
550
- uses : aws-actions/configure-aws-credentials@v2
551
- with :
552
- role-to-assume : ${{ env.CI_X509_ROLE }}
553
- aws-region : ${{ env.AWS_DEFAULT_REGION }}
554
- - name : run X509 sample
555
- run : |
556
- python3 ./utils/run_in_ci.py --file ./.github/workflows/ci_run_x509_connect_cfg.json
557
- - name : configure AWS credentials (MQTT5)
558
- uses : aws-actions/configure-aws-credentials@v2
559
- with :
560
- role-to-assume : ${{ env.CI_MQTT5_ROLE }}
561
- aws-region : ${{ env.AWS_DEFAULT_REGION }}
562
- - name : run MQTT5 PubSub sample
563
- run : |
564
- python3 ./utils/run_in_ci.py --file ./.github/workflows/ci_run_mqtt5_pubsub_cfg.json
565
- - name : run MQTT5 Shared Subscription sample
566
- run : |
567
- python3 ./utils/run_in_ci.py --file ./.github/workflows/ci_run_mqtt5_shared_subscription_cfg.json
0 commit comments