Skip to content

Request response workspace2 #619

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
106 changes: 76 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,32 @@ jobs:
run: |
python -m pip install boto3
- name: configure AWS credentials (containers)
uses: aws-actions/configure-aws-credentials@v2
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_BUILD_AND_TEST_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: Build ${{ env.PACKAGE_NAME }}
run: |
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 (PubSub)
- name: configure AWS credentials (MQTT5)
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ env.CI_MQTT5_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: Service tests
shell: bash
run: |
cd aws-iot-device-sdk-python-v2
python3 -m pip install .
source utils/test_setup.sh s3://iot-sdk-ci-bucket-us-east1/IotUsProdMqtt5EnvironmentVariables.txt us-east-1
python3 -m unittest test.test_shadow
python3 -m unittest test.test_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 }}
Expand All @@ -68,15 +84,15 @@ jobs:
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@v2
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
- name: configure AWS credentials (Device Advisor)
uses: aws-actions/configure-aws-credentials@v2
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_DEVICE_ADVISOR }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
Expand All @@ -103,7 +119,7 @@ jobs:
source .venv/bin/activate
python3 -m pip install boto3
- name: configure AWS credentials (containers)
uses: aws-actions/configure-aws-credentials@v2
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_BUILD_AND_TEST_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
Expand All @@ -113,8 +129,25 @@ 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 (PubSub)
- name: configure AWS credentials (MQTT5)
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ env.CI_MQTT5_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: Service tests
shell: bash
run: |
source .venv/bin/activate
cd aws-iot-device-sdk-python-v2
python3 -m pip install .
source utils/test_setup.sh s3://iot-sdk-ci-bucket-us-east1/IotUsProdMqtt5EnvironmentVariables.txt us-east-1
python3 -m unittest test.test_shadow
python3 -m unittest test.test_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 }}
Expand All @@ -131,7 +164,7 @@ jobs:
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@v2
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_MQTT5_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
Expand All @@ -140,7 +173,7 @@ jobs:
source .venv/bin/activate
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_mqtt5_pubsub_cfg.json
- name: configure AWS credentials (Device Advisor)
uses: aws-actions/configure-aws-credentials@v2
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_DEVICE_ADVISOR }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
Expand All @@ -155,11 +188,11 @@ jobs:
permissions:
id-token: write # This is required for requesting the JWT
steps:
- name: Running samples in CI setup
- name: Install AWS SDK for Python
run: |
python -m pip install boto3
python3 -m pip install boto3
- name: configure AWS credentials (containers)
uses: aws-actions/configure-aws-credentials@v2
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_BUILD_AND_TEST_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
Expand All @@ -168,27 +201,40 @@ 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: Running samples in CI setup
- name: configure AWS credentials (MQTT5)
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ env.CI_MQTT5_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: Service tests
shell: bash
run: |
python3 -m pip install boto3
cd aws-iot-device-sdk-python-v2
python3 -m pip install .
source utils/test_setup.sh s3://iot-sdk-ci-bucket-us-east1/IotUsProdMqtt5EnvironmentVariables.txt us-east-1
python3 -m unittest test.test_shadow
python3 -m unittest test.test_jobs
python3 -m unittest test.test_identity
source utils/test_cleanup.sh
cd ..
- name: configure AWS credentials (PubSub)
uses: aws-actions/configure-aws-credentials@v2
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@v2
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
- name: configure AWS credentials (Device Advisor)
uses: aws-actions/configure-aws-credentials@v2
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_DEVICE_ADVISOR }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
Expand All @@ -210,7 +256,7 @@ jobs:
sudo apt-get install softhsm -y
softhsm2-util --version
- name: configure AWS credentials (containers)
uses: aws-actions/configure-aws-credentials@v2
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_BUILD_AND_TEST_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
Expand All @@ -221,7 +267,7 @@ jobs:
./builder build -p ${{ env.PACKAGE_NAME }}

- name: configure AWS credentials (service tests Fleet Provisioning)
uses: aws-actions/configure-aws-credentials@v2
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_FLEET_PROVISIONING_ROLE}}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
Expand All @@ -247,7 +293,7 @@ jobs:
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@v2
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_SHADOW_SERVICE_CLIENT_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
Expand All @@ -273,7 +319,7 @@ jobs:
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@v2
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_JOBS_SERVICE_CLIENT_ROLE}}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
Expand All @@ -289,7 +335,7 @@ jobs:
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@v2
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_PUBSUB_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
Expand All @@ -309,23 +355,23 @@ jobs:
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@v2
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@v2
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@v2
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_MQTT5_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
Expand All @@ -348,15 +394,15 @@ jobs:
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@v2
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@v2
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_SHADOW_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
Expand All @@ -367,7 +413,7 @@ jobs:
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@v2
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_JOBS_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
Expand All @@ -378,7 +424,7 @@ jobs:
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@v2
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_FLEET_PROVISIONING_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
Expand All @@ -404,7 +450,7 @@ jobs:
run: |
python3 -m pip install boto3
- name: configure AWS credentials (containers)
uses: aws-actions/configure-aws-credentials@v2
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_BUILD_AND_TEST_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
Expand All @@ -418,7 +464,7 @@ jobs:
python3 -m pip install awsiotsdk
python3 -m pip install -U git+https://github.com/aws-greengrass/[email protected]
- name: Configure AWS credentials (Greengrass)
uses: aws-actions/configure-aws-credentials@v2
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CI_GREENGRASS_INSTALLER_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_run_fleet_provisioning_cfg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"language": "Python",
"sample_file": "./aws-iot-device-sdk-python-v2/samples/fleetprovisioning.py",
"sample_file": "./aws-iot-device-sdk-python-v2/samples/deprecated/fleetprovisioning.py",
"sample_region": "us-east-1",
"sample_main_class": "",
"arguments": [
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_run_jobs_cfg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"language": "Python",
"sample_file": "./aws-iot-device-sdk-python-v2/samples/jobs.py",
"sample_file": "./aws-iot-device-sdk-python-v2/samples/deprecated/jobs.py",
"sample_region": "us-east-1",
"sample_main_class": "",
"arguments": [
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_run_mqtt5_fleet_provisioning_cfg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"language": "Python",
"sample_file": "./aws-iot-device-sdk-python-v2/samples/fleetprovisioning_mqtt5.py",
"sample_file": "./aws-iot-device-sdk-python-v2/samples/deprecated/fleetprovisioning_mqtt5.py",
"sample_region": "us-east-1",
"sample_main_class": "",
"arguments": [
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_run_mqtt5_jobs_cfg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"language": "Python",
"sample_file": "./aws-iot-device-sdk-python-v2/samples/jobs_mqtt5.py",
"sample_file": "./aws-iot-device-sdk-python-v2/samples/deprecated/jobs_mqtt5.py",
"sample_region": "us-east-1",
"sample_main_class": "",
"arguments": [
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_run_mqtt5_shadow_cfg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"language": "Python",
"sample_file": "./aws-iot-device-sdk-python-v2/samples/shadow_mqtt5.py",
"sample_file": "./aws-iot-device-sdk-python-v2/samples/deprecated/shadow_mqtt5.py",
"sample_region": "us-east-1",
"sample_main_class": "",
"arguments": [
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_run_shadow_cfg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"language": "Python",
"sample_file": "./aws-iot-device-sdk-python-v2/samples/shadow.py",
"sample_file": "./aws-iot-device-sdk-python-v2/samples/deprecated/shadow.py",
"sample_region": "us-east-1",
"sample_main_class": "",
"arguments": [
Expand Down
Loading
Loading