Skip to content

Commit 3d3fda8

Browse files
authored
Fix az CLI query in ISA-95 pipeline (#7479)
There's an Azure CLI command in the setup for the ISA-95 smoke test pipeline which gets the NSG for a given NIC. It needs this information so it can add a rule to the NSG to block outbound traffic during the smoke test. The JMESPath query in the Azure CLI command was wrong; it is supposed to find any NSGs associated with the NIC via network interface _or_ subnet, but it was only finding the former. This update fixes the query to find both. I also replaced some hard-coded proxy URLs with pipeline variables. In the future we can replace those with Azure CLI commands that get the IP address for each proxy server given their VM name (which is currently still hard-coded into the tests), but this incremental improvement is a reasonable first step. I ran the smoke test in a previously failing environment that has a subnet association instead of network interface, and it passed. ## Azure IoT Edge PR checklist:
1 parent 3c1b551 commit 3d3fda8

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

builds/e2e/isa-95-smoke-test.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@ schedules:
2020
variables:
2121
Codeql.Enabled: false
2222
DisableDockerDetector: true
23-
itProxy: http://10.16.8.4:3128
24-
otProxy: http://10.16.5.4:3128
2523
resourceGroup: nested-edge-isa95
26-
otProxyName: "otproxy"
24+
otProxyName: iotedge-isa95-otproxy
2725

2826
resources:
2927
pipelines:
@@ -71,7 +69,7 @@ stages:
7169
deploymentFile: nestededge_topLayerBaseDeployment_amqp.json
7270
parentName: ''
7371
parentDeviceId: ''
74-
proxyAddress: $(itProxy)
72+
proxyAddress: $(proxyUrl.it)
7573
pool:
7674
name: $(pool.name)
7775
demands:
@@ -154,7 +152,7 @@ stages:
154152
level: 3
155153
upstreamProtocol: amqp
156154
deploymentFile: nestededge_isa95_smoke_test_BaseDeployment.json
157-
proxyAddress: $(otProxy)
155+
proxyAddress: $(proxyUrl.ot)
158156
x64ParentName: $[ dependencies.SetupVM_level4.outputs['x64.deployIoTEdge.deviceName'] ]
159157
x64ParentDeviceId: $[ dependencies.SetupVM_level4.outputs['x64.createIdentity.parentDeviceId'] ]
160158
arm64ParentName: $[ dependencies.SetupVM_level4.outputs['arm64.deployIoTEdge.deviceName'] ]
@@ -222,7 +220,7 @@ stages:
222220
identityArtifactName: aziot-identity-ubuntu24.04-amd64
223221
artifactName: iotedged-ubuntu24.04-amd64
224222
nestededge: true
225-
proxyAddress: $(otProxy)
223+
proxyAddress: $(proxyUrl.ot)
226224
test_type: nestededge_isa95
227225
verbose: false
228226
strategy:

builds/e2e/templates/nested-isa95-lock.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ steps:
3131
--resource-group '$(resourceGroup)' \
3232
--name "$network_interface" \
3333
--output tsv \
34-
--query 'value[?contains(keys(association), `networkInterface` || `subnet`)].networkSecurityGroup | [0].id'
34+
--query 'value[?contains(keys(association), `networkInterface`) ||
35+
contains(keys(association), `subnet`)].networkSecurityGroup | [0].id'
3536
)
3637
echo "$nsg_resource"
3738
nsgName=$(echo "$nsg_resource" | sed -n 's/.*\/\(.*\)/\1/p')

0 commit comments

Comments
 (0)