Skip to content

Commit

Permalink
Update Azure CLI command in Nested pipelines (Azure#5150) (Azure#5162)
Browse files Browse the repository at this point in the history
Update Azure CLI command in Nested pipelines
Cherry-picked: Azure@9bb6faf
  • Loading branch information
yophilav authored Jun 25, 2021
1 parent b7b4292 commit 87261b7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions builds/e2e/templates/nested-create-identity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ steps:
echo "Creating ${deviceId} iotedge in iothub: ${iotHubName}, in subscription $(azure.subscription)"
if [ "$LEVEL" = "5" ]; then
az iot hub device-identity create -n ${iotHubName} -d ${deviceId} --ee --output none
az iot hub device-identity create -n ${iotHubName} -d ${deviceId} --ee --output none
else
echo "Attaching device Id to parent device Id: $(parentDeviceId)"
az iot hub device-identity create -n ${iotHubName} -d ${deviceId} --ee --pd $(parentDeviceId) --output none
echo "Create device identity and relate it to the parent device Id: $(parentDeviceId)"
az iot hub device-identity create -n ${iotHubName} -d ${deviceId} --ee --output none && \
az iot hub device-identity parent set --device-id ${deviceId} --hub-name ${iotHubName} --pd $(parentDeviceId)
fi
connectionString=$(az iot hub device-identity connection-string show -d ${deviceId} -n ${iotHubName} --query 'connectionString' -o tsv)
Expand Down

0 comments on commit 87261b7

Please sign in to comment.