File tree Expand file tree Collapse file tree 4 files changed +55
-2
lines changed Expand file tree Collapse file tree 4 files changed +55
-2
lines changed Original file line number Diff line number Diff line change 28
28
CI_SHADOW_ROLE : arn:aws:iam::180635532705:role/CI_Shadow_Role
29
29
CI_JOBS_ROLE : arn:aws:iam::180635532705:role/CI_Jobs_Role
30
30
CI_FLEET_PROVISIONING_ROLE : arn:aws:iam::180635532705:role/service-role/CI_FleetProvisioning_Role
31
+ CI_GREENGRASS_ROLE : arn:aws:iam::180635532705:role/CI_Greengrass_Role
31
32
CI_DEVICE_ADVISOR : arn:aws:iam::180635532705:role/CI_DeviceAdvisor_Role
32
33
CI_MQTT5_ROLE : arn:aws:iam::180635532705:role/CI_MQTT5_Role
33
34
CI_BUILD_AND_TEST_ROLE : arn:aws:iam::180635532705:role/V2_SDK_Unit_Testing
@@ -297,6 +298,14 @@ jobs:
297
298
Sample_UUID=$(python3 -c "import uuid; print (uuid.uuid4())")
298
299
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}
299
300
python3 ${{ env.CI_UTILS_FOLDER }}/delete_iot_thing_ci.py --thing_name "Fleet_Thing_${Sample_UUID}" --region "us-east-1"
301
+ - name : configure AWS credentials (Greengrass)
302
+ uses : aws-actions/configure-aws-credentials@v1
303
+ with :
304
+ role-to-assume : ${{ env.CI_GREENGRASS_ROLE }}
305
+ aws-region : ${{ env.AWS_DEFAULT_REGION }}
306
+ - name : run Greengrass Discovery sample
307
+ run : |
308
+ python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_greengrass_discovery_cfg.json
300
309
301
310
# check that docs can still build
302
311
check-docs :
Original file line number Diff line number Diff line change
1
+ {
2
+ "language" : " Python" ,
3
+ "sample_file" : " ./aws-iot-device-sdk-python-v2/samples/basic_discovery.py" ,
4
+ "sample_region" : " us-east-1" ,
5
+ "sample_main_class" : " " ,
6
+ "arguments" : [
7
+ {
8
+ "name" : " --cert" ,
9
+ "secret" : " ci/Greengrass/cert" ,
10
+ "filename" : " tmp_certificate.pem"
11
+ },
12
+ {
13
+ "name" : " --key" ,
14
+ "secret" : " ci/Greengrass/key" ,
15
+ "filename" : " tmp_key.pem"
16
+ },
17
+ {
18
+ "name" : " --ca_file" ,
19
+ "secret" : " ci/Greengrass/ca" ,
20
+ "filename" : " tmp_ca.pem"
21
+ },
22
+ {
23
+ "name" : " --region" ,
24
+ "data" : " us-east-1"
25
+ },
26
+ {
27
+ "name" : " --thing_name" ,
28
+ "data" : " CI_GreenGrass_Thing"
29
+ },
30
+ {
31
+ "name" : " --is_ci" ,
32
+ "data" : " true"
33
+ },
34
+ {
35
+ "name" : " --print_discover_resp_only" ,
36
+ "data" : " "
37
+ }
38
+ ]
39
+ }
Original file line number Diff line number Diff line change 37
37
resp_future = discovery_client .discover (cmdData .input_thing_name )
38
38
discover_response = resp_future .result ()
39
39
40
- print (discover_response )
40
+ if (cmdData .input_is_ci ):
41
+ print ("Received a greengrass discovery result! Not showing result in CI for possible data sensitivity." )
42
+ else :
43
+ print (discover_response )
44
+
41
45
if (cmdData .input_print_discovery_resp_only ):
42
46
exit (0 )
43
47
Original file line number Diff line number Diff line change @@ -83,7 +83,8 @@ def setup_json_arguments_list(parsed_commands):
83
83
if isinstance (tmp_value , str ) and 'input_uuid' in parsed_commands :
84
84
if ("$INPUT_UUID" in tmp_value ):
85
85
tmp_value = tmp_value .replace ("$INPUT_UUID" , parsed_commands .input_uuid )
86
- config_json_arguments_list .append (tmp_value )
86
+ if (tmp_value != None and tmp_value != "" ):
87
+ config_json_arguments_list .append (tmp_value )
87
88
88
89
# None of the above? Just print an error
89
90
else :
You can’t perform that action at this time.
0 commit comments