Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
6042a8d
remove deprecated samples
sbSteveK Aug 15, 2025
e4a79f5
remove more samples and begin updating ci
sbSteveK Aug 15, 2025
fce9ad9
update mac ci
sbSteveK Aug 15, 2025
21361ef
update linux ci
sbSteveK Aug 15, 2025
486926b
more sample ci cleanup
sbSteveK Aug 15, 2025
52ed9e2
more sample culling
sbSteveK Aug 15, 2025
e6d375d
remove more mqtt3 samples
sbSteveK Aug 15, 2025
72bf681
remove unused roles
sbSteveK Aug 15, 2025
337355a
remove mqtt3 samples from codebuild smoketest
sbSteveK Aug 15, 2025
5b4bdf8
point CD and other areas to mqtt5 pubsub. Reinstate basic_discovery
sbSteveK Aug 18, 2025
8d380b8
remove --is_ci args from runner scripts
sbSteveK Aug 18, 2025
0a302fc
remove ci from mqtt5 pubsub
sbSteveK Aug 18, 2025
5c23074
forgot utils
sbSteveK Aug 18, 2025
ff8a813
restore old basic_discovery.py
sbSteveK Aug 18, 2025
029e88d
restore basic_discovery.md
sbSteveK Aug 18, 2025
3cfbabf
simplify arg parsing for pubsub
sbSteveK Aug 18, 2025
7561ef6
update custom auth sample
sbSteveK Aug 18, 2025
d5f5aa3
remove duplicate use_websockets
sbSteveK Aug 18, 2025
c8b1ed8
missed comma
sbSteveK Aug 18, 2025
df3c19d
comma again
sbSteveK Aug 18, 2025
2bb49a1
rename args
sbSteveK Aug 18, 2025
4c54985
input_custom_authorizer_name
sbSteveK Aug 18, 2025
b696d7e
is_ci remove
sbSteveK Aug 18, 2025
baa0c37
clientID
sbSteveK Aug 18, 2025
228e40a
use websockets is a toggle
sbSteveK Aug 18, 2025
3b69654
update samples
sbSteveK Aug 18, 2025
81d83dc
remove is_ci
sbSteveK Aug 18, 2025
85bd350
remove command line utils
sbSteveK Aug 18, 2025
45b4fcc
update fleet_provisioning test
sbSteveK Aug 19, 2025
0750ba1
remove utils dependency from remaining service tests
sbSteveK Aug 19, 2025
ac73022
remove utils from basic_discovery
sbSteveK Aug 19, 2025
bb3b98a
remove command_line_utils.py
sbSteveK Aug 19, 2025
5805cd7
samples-wide factoring start
sbSteveK Aug 19, 2025
f75b65e
simplify parser
sbSteveK Aug 19, 2025
13724e8
further formatting
sbSteveK Aug 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
157 changes: 5 additions & 152 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,12 @@ env:
DA_SHADOW_VALUE_DEFAULT: OFF
CI_UTILS_FOLDER: "./aws-iot-device-sdk-python-v2/utils"
CI_SAMPLES_CFG_FOLDER: "./aws-iot-device-sdk-python-v2/.github/workflows"
CI_SAMPLES_FOLDER: "./aws-iot-device-sdk-python-v2/samples"
CI_PUBSUB_ROLE: arn:aws:iam::180635532705:role/CI_PubSub_Role
CI_COGNITO_ROLE: arn:aws:iam::180635532705:role/CI_Cognito_Role
CI_X509_ROLE: arn:aws:iam::180635532705:role/CI_X509_Role
CI_CUSTOM_AUTHORIZER_ROLE: arn:aws:iam::180635532705:role/CI_CustomAuthorizer_Role
CI_SHADOW_ROLE: arn:aws:iam::180635532705:role/CI_Shadow_Role
CI_JOBS_ROLE: arn:aws:iam::180635532705:role/CI_Jobs_Role
CI_FLEET_PROVISIONING_ROLE: arn:aws:iam::180635532705:role/service-role/CI_FleetProvisioning_Role
CI_GREENGRASS_ROLE: arn:aws:iam::180635532705:role/CI_Greengrass_Role
CI_GREENGRASS_INSTALLER_ROLE: arn:aws:iam::180635532705:role/CI_GreengrassInstaller_Role
CI_DEVICE_ADVISOR: arn:aws:iam::180635532705:role/CI_DeviceAdvisor_Role
CI_MQTT5_ROLE: arn:aws:iam::180635532705:role/CI_MQTT5_Role
CI_BUILD_AND_TEST_ROLE: arn:aws:iam::180635532705:role/V2_SDK_Unit_Testing
CI_JOBS_SERVICE_CLIENT_ROLE: arn:aws:iam::180635532705:role/CI_JobsServiceClient_Role
CI_SERVICE_ROLE_CFG_FOLDER: "./aws-iot-device-sdk-python-v2/servicetests/test_cases"
CI_SHADOW_SERVICE_CLIENT_ROLE: arn:aws:iam::180635532705:role/CI_ShadowServiceClient_Role

jobs:
Expand All @@ -57,7 +48,7 @@ jobs:
python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
python builder.pyz build -p ${{ env.PACKAGE_NAME }}
- name: configure AWS credentials (MQTT5)
uses: aws-actions/configure-aws-credentials@v2
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_MQTT5_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
Expand All @@ -72,22 +63,6 @@ jobs:
python3 -m unittest test.test_identity
source utils/test_cleanup.sh
cd ..
- name: configure AWS credentials (PubSub)
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_PUBSUB_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: run PubSub sample
run: |
python ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_pubsub_cfg.json
- name: run Windows Certificate Connect sample
run: |
python ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_windows_cert_connect_cfg.json
- name: configure AWS credentials (MQTT5 samples)
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_MQTT5_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: run MQTT5 PubSub sample
run: |
python ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_mqtt5_pubsub_cfg.json
Expand All @@ -104,6 +79,7 @@ jobs:
osx:
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
runner:
- macos-13
Expand All @@ -112,8 +88,8 @@ jobs:
id-token: write # This is required for requesting the JWT
steps:
- name: Install boto3
# Starting from macos14, boto3 is no longer available in macos homebrew python https://github.com/Homebrew/homebrew-core/issues/157500
# use virtual env to work around.
# Starting from macos14, boto3 is no longer available in macos homebrew python https://github.com/Homebrew/homebrew-core/issues/157500
# use virtual env to work around.
run: |
python3 -m venv .venv
source .venv/bin/activate
Expand Down Expand Up @@ -146,28 +122,6 @@ jobs:
python3 -m unittest test.test_identity
source utils/test_cleanup.sh
cd ..
- name: configure AWS credentials (PubSub)
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_PUBSUB_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: run PubSub sample
run: |
source .venv/bin/activate
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_pubsub_cfg.json
- name: run PKCS12 sample
run: |
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
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
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\")
openssl pkcs12 -export -in /tmp/certificate.pem -inkey /tmp/privatekey.pem -out ./pkcs12-key.p12 -name PubSub_Thing_Alias -password pass:$pkcs12_password
source .venv/bin/activate
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_pkcs12_connect_cfg.json
- name: configure AWS credentials (MQTT5 samples)
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_MQTT5_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: run MQTT5 PubSub sample
run: |
source .venv/bin/activate
Expand Down Expand Up @@ -217,19 +171,6 @@ jobs:
python3 -m unittest test.test_identity
source utils/test_cleanup.sh
cd ..
- name: configure AWS credentials (PubSub)
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_PUBSUB_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: run PubSub sample
run: |
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_pubsub_cfg.json
- name: configure AWS credentials (MQTT5 samples)
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_MQTT5_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: run MQTT5 PubSub sample
run: |
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_mqtt5_pubsub_cfg.json
Expand All @@ -243,7 +184,7 @@ jobs:
cd ./aws-iot-device-sdk-python-v2
python3 ./deviceadvisor/script/DATestRun.py

# Runs the samples and ensures that everything is working
# Runs the sampels and service tests and ensures that everything is working
linux-smoke-tests:
runs-on: ubuntu-22.04
permissions:
Expand All @@ -265,7 +206,6 @@ jobs:
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
chmod a+x builder
./builder build -p ${{ env.PACKAGE_NAME }}

- name: configure AWS credentials (service tests Fleet Provisioning)
uses: aws-actions/configure-aws-credentials@v4
with:
Expand All @@ -291,7 +231,6 @@ jobs:
run: |
export PYTHONPATH=${{ github.workspace }}/aws-iot-device-sdk-python-v2/utils:${{ github.workspace }}/aws-iot-device-sdk-python-v2/samples
python3 ./test_cases/test_fleet_provisioning.py --config-file test_cases/mqtt5_fleet_provisioning_with_csr_cfg.json --thing-name-prefix Fleet_Thing_

- name: configure AWS credentials (service tests Shadow)
uses: aws-actions/configure-aws-credentials@v4
with:
Expand All @@ -317,7 +256,6 @@ jobs:
run: |
export PYTHONPATH=${{ github.workspace }}/aws-iot-device-sdk-python-v2/utils:${{ github.workspace }}/aws-iot-device-sdk-python-v2/samples
python3 ./test_cases/test_shadow_update.py --config-file test_cases/mqtt3_named_shadow_cfg.json

- name: configure AWS credentials (service tests Jobs)
uses: aws-actions/configure-aws-credentials@v4
with:
Expand All @@ -333,43 +271,6 @@ jobs:
run: |
export PYTHONPATH=${{ github.workspace }}/aws-iot-device-sdk-python-v2/utils:${{ github.workspace }}/aws-iot-device-sdk-python-v2/samples
python3 ./test_cases/test_jobs_execution.py --config-file test_cases/mqtt5_jobs_cfg.json

- name: configure AWS credentials (Connect and PubSub)
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_PUBSUB_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: run Basic Connect sample
run: |
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_basic_connect_cfg.json
- name: run Websocket Connect sample
run: |
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_websocket_connect_cfg.json
- name: run PubSub sample
run: |
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_pubsub_cfg.json
- name: run PKCS11 Connect sample
run: |
mkdir -p /tmp/tokens
export SOFTHSM2_CONF=/tmp/softhsm2.conf
echo "directories.tokendir = /tmp/tokens" > /tmp/softhsm2.conf
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_pkcs11_connect_cfg.json
- name: configure AWS credentials (Cognito)
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_COGNITO_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: run Cognito Connect sample
run: |
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_cognito_connect_cfg.json
- name: configure AWS credentials (X509)
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_X509_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: run X509 sample
run: |
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_x509_connect_cfg.json
- name: configure AWS credentials (MQTT5 samples)
uses: aws-actions/configure-aws-credentials@v4
with:
Expand All @@ -393,53 +294,6 @@ jobs:
- name: run MQTT5 Shared Subscription sample
run: |
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_mqtt5_shared_subscription_cfg.json
- name: configure AWS credentials (Custom Authorizer)
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_CUSTOM_AUTHORIZER_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: run CustomAuthorizerConnect sample
run: |
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_custom_authorizer_connect_cfg.json
- name: configure AWS credentials (Shadow)
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_SHADOW_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: run Shadow sample
run: |
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_shadow_cfg.json
- name: run MQTT5 Shadow sample
run: |
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_mqtt5_shadow_cfg.json
- name: configure AWS credentials (Jobs)
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_JOBS_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: run Jobs sample
run: |
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_jobs_cfg.json
- name: run MQTT5 Jobs sample
run: |
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_mqtt5_jobs_cfg.json
- name: configure AWS credentials (Fleet provisioning)
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_FLEET_PROVISIONING_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: run Fleet Provisioning sample
run: |
echo "Generating UUID for IoT thing"
Sample_UUID=$(python3 -c "import uuid; print (uuid.uuid4())")
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_fleet_provisioning_cfg.json --input_uuid ${Sample_UUID}
python3 ${{ env.CI_UTILS_FOLDER }}/delete_iot_thing_ci.py --thing_name "Fleet_Thing_${Sample_UUID}" --region "us-east-1"
- name: run MQTT5 Fleet Provisioning sample
run: |
echo "Generating UUID for IoT thing"
Sample_UUID=$(python3 -c "import uuid; print (uuid.uuid4())")
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_mqtt5_fleet_provisioning_cfg.json --input_uuid ${Sample_UUID}
python3 ${{ env.CI_UTILS_FOLDER }}/delete_iot_thing_ci.py --thing_name "Fleet_Thing_${Sample_UUID}" --region "us-east-1"

linux-greengrass-tests:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -500,7 +354,6 @@ jobs:
echo "=== software.amazon.awssdk.sdk-gg-ipc.log"
cat testResults/gg*/software.amazon.awssdk.sdk-gg-ipc.log


# check that docs can still build
check-docs:
runs-on: ubuntu-22.04 # latest
Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/ci_run_basic_connect_cfg.json

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/ci_run_cognito_connect_cfg.json

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/ci_run_custom_authorizer_connect_cfg.json

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/ci_run_fleet_provisioning_cfg.json

This file was deleted.

4 changes: 0 additions & 4 deletions .github/workflows/ci_run_greengrass_ipc_cfg.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
{
"name": "--message",
"data": "hello"
},
{
"name": "--is_ci",
"data": "true"
}
]
}
Loading