Skip to content
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
192 changes: 186 additions & 6 deletions builds/e2e/longhaul.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,36 @@ jobs:
aziotis.artifact.name: 'packages_ubuntu-20.04_amd64'
aziotis.package.filter: 'aziot-identity-service_*_amd64.deb'
quickstart.artifactName: 'IotEdgeQuickstart.linux-x64.tar.gz'
- task: AzureCLI@2
displayName: 'Get SAS URI for Blob Storage Account'
inputs:
azureSubscription: $(azure.subscription)
scriptType: 'bash'
scriptLocation: 'inlineScript'
inlineScript: |
# Hardcoded resource group and storage account name
resource_group="iotedge-deploy"
storage_account="iotedgeconnectivitytest"

# Set container name with current date
container_name="logs$(date +%Y%m%d)"

# Set expiry time for the SAS token
expiry_time="$(date --utc --date "+12 hours" +"%Y-%m-%dT%H:%MZ")"

# Generate the SAS token for the container
sasToken="$(az storage container generate-sas --account-name "$storage_account" --name "$container_name" --https-only --expiry "$expiry_time" --as-user --auth-mode login --permissions drwl --output tsv)"
if [ $? -ne 0 ]; then
echo "Failed to generate SAS token: $sasToken"
exit 1
fi

echo "SAS token for Azure Storage account acquired. Expires $expiry_time"

# Construct the SAS URI
endpoint="$(az storage account show --name "$storage_account" --resource-group "$resource_group" --query 'primaryEndpoints.blob' -o tsv)"
sasUri="$endpoint$container_name?$sasToken"
echo "##vso[task.setvariable variable=testBlobStoreSas;issecret=true]$sasUri"
- template: templates/longhaul-deploy.yaml
parameters:
release.label: 'lh$(agent.group)'
Expand Down Expand Up @@ -97,7 +127,7 @@ jobs:
test.testMode: 'LongHaul'
test.useTRC: '$(useTRC)'
test.deploymentFileName: 'long_haul_deployment.template.json'
testResultCoordinator.storageAccountConnectionString: '$(EdgeLonghaulStorageAccountConnString)'
testResultCoordinator.blobStorageAccountUriWithSasToken: '$(testBlobStoreSas)'
clientModuleTransportType: 'All'

################################################################################
Expand All @@ -122,6 +152,36 @@ jobs:
aziotis.artifact.name: 'packages_debian-11-slim_arm32v7'
aziotis.package.filter: 'aziot-identity-service_*_armhf.deb'
quickstart.artifactName: 'IotEdgeQuickstart.linux-arm.tar.gz'
- task: AzureCLI@2
displayName: 'Get SAS URI for Blob Storage Account'
inputs:
azureSubscription: $(azure.subscription)
scriptType: 'bash'
scriptLocation: 'inlineScript'
inlineScript: |
# Hardcoded resource group and storage account name
resource_group="iotedge-deploy"
storage_account="iotedgeconnectivitytest"

# Set container name with current date
container_name="logs$(date +%Y%m%d)"

# Set expiry time for the SAS token
expiry_time="$(date --utc --date "+12 hours" +"%Y-%m-%dT%H:%MZ")"

# Generate the SAS token for the container
sasToken="$(az storage container generate-sas --account-name "$storage_account" --name "$container_name" --https-only --expiry "$expiry_time" --as-user --auth-mode login --permissions drwl --output tsv)"
if [ $? -ne 0 ]; then
echo "Failed to generate SAS token."
exit 1
fi

echo "SAS token for Azure Storage account acquired. Expires $expiry_time"

# Construct the SAS URI
endpoint="$(az storage account show --name "$storage_account" --resource-group "$resource_group" --query 'primaryEndpoints.blob' -o tsv)"
sasUri="$endpoint$container_name?$sasToken"
echo "##vso[task.setvariable variable=testBlobStoreSas;issecret=true]$sasUri"
- template: templates/longhaul-deploy.yaml
parameters:
release.label: 'lh$(agent.group)'
Expand Down Expand Up @@ -158,7 +218,7 @@ jobs:
test.testMode: 'LongHaul'
test.useTRC: '$(useTRC)'
test.deploymentFileName: 'long_haul_deployment_constrained.template.json'
testResultCoordinator.storageAccountConnectionString: '$(EdgeLonghaulStorageAccountConnString)'
testResultCoordinator.blobStorageAccountUriWithSasToken: '$(testBlobStoreSas)'
clientModuleTransportType: 'amqp'

################################################################################
Expand All @@ -183,6 +243,36 @@ jobs:
aziotis.artifact.name: 'packages_debian-11-slim_arm32v7'
aziotis.package.filter: 'aziot-identity-service_*_armhf.deb'
quickstart.artifactName: 'IotEdgeQuickstart.linux-arm.tar.gz'
- task: AzureCLI@2
displayName: 'Get SAS URI for Blob Storage Account'
inputs:
azureSubscription: $(azure.subscription)
scriptType: 'bash'
scriptLocation: 'inlineScript'
inlineScript: |
# Hardcoded resource group and storage account name
resource_group="iotedge-deploy"
storage_account="iotedgeconnectivitytest"

# Set container name with current date
container_name="logs$(date +%Y%m%d)"

# Set expiry time for the SAS token
expiry_time="$(date --utc --date "+12 hours" +"%Y-%m-%dT%H:%MZ")"

# Generate the SAS token for the container
sasToken="$(az storage container generate-sas --account-name "$storage_account" --name "$container_name" --https-only --expiry "$expiry_time" --as-user --auth-mode login --permissions drwl --output tsv)"
if [ $? -ne 0 ]; then
echo "Failed to generate SAS token."
exit 1
fi

echo "SAS token for Azure Storage account acquired. Expires $expiry_time"

# Construct the SAS URI
endpoint="$(az storage account show --name "$storage_account" --resource-group "$resource_group" --query 'primaryEndpoints.blob' -o tsv)"
sasUri="$endpoint$container_name?$sasToken"
echo "##vso[task.setvariable variable=testBlobStoreSas;issecret=true]$sasUri"
- template: templates/longhaul-deploy.yaml
parameters:
release.label: 'lh$(agent.group)'
Expand Down Expand Up @@ -219,7 +309,7 @@ jobs:
test.testMode: 'LongHaul'
test.useTRC: '$(useTRC)'
test.deploymentFileName: 'long_haul_deployment_constrained.template.json'
testResultCoordinator.storageAccountConnectionString: '$(EdgeLonghaulStorageAccountConnString)'
testResultCoordinator.blobStorageAccountUriWithSasToken: '$(testBlobStoreSas)'
clientModuleTransportType: 'mqtt'

################################################################################
Expand All @@ -244,6 +334,36 @@ jobs:
aziotis.artifact.name: 'packages_ubuntu-20.04_aarch64'
aziotis.package.filter: 'aziot-identity-service_*_arm64.deb'
quickstart.artifactName: 'IotEdgeQuickstart.linux-arm64.tar.gz'
- task: AzureCLI@2
displayName: 'Get SAS URI for Blob Storage Account'
inputs:
azureSubscription: $(azure.subscription)
scriptType: 'bash'
scriptLocation: 'inlineScript'
inlineScript: |
# Hardcoded resource group and storage account name
resource_group="iotedge-deploy"
storage_account="iotedgeconnectivitytest"

# Set container name with current date
container_name="logs$(date +%Y%m%d)"

# Set expiry time for the SAS token
expiry_time="$(date --utc --date "+12 hours" +"%Y-%m-%dT%H:%MZ")"

# Generate the SAS token for the container
sasToken="$(az storage container generate-sas --account-name "$storage_account" --name "$container_name" --https-only --expiry "$expiry_time" --as-user --auth-mode login --permissions drwl --output tsv)"
if [ $? -ne 0 ]; then
echo "Failed to generate SAS token."
exit 1
fi

echo "SAS token for Azure Storage account acquired. Expires $expiry_time"

# Construct the SAS URI
endpoint="$(az storage account show --name "$storage_account" --resource-group "$resource_group" --query 'primaryEndpoints.blob' -o tsv)"
sasUri="$endpoint$container_name?$sasToken"
echo "##vso[task.setvariable variable=testBlobStoreSas;issecret=true]$sasUri"
- template: templates/longhaul-deploy.yaml
parameters:
release.label: 'lh$(agent.group)'
Expand Down Expand Up @@ -281,7 +401,7 @@ jobs:
test.testMode: 'LongHaul'
test.useTRC: '$(useTRC)'
test.deploymentFileName: 'long_haul_deployment_constrained.template.json'
testResultCoordinator.storageAccountConnectionString: '$(EdgeLonghaulStorageAccountConnString)'
testResultCoordinator.blobStorageAccountUriWithSasToken: '$(testBlobStoreSas)'
clientModuleTransportType: 'amqp'

################################################################################
Expand All @@ -306,6 +426,36 @@ jobs:
aziotis.artifact.name: 'packages_ubuntu-20.04_aarch64'
aziotis.package.filter: 'aziot-identity-service_*_arm64.deb'
quickstart.artifactName: 'IotEdgeQuickstart.linux-arm64.tar.gz'
- task: AzureCLI@2
displayName: 'Get SAS URI for Blob Storage Account'
inputs:
azureSubscription: $(azure.subscription)
scriptType: 'bash'
scriptLocation: 'inlineScript'
inlineScript: |
# Hardcoded resource group and storage account name
resource_group="iotedge-deploy"
storage_account="iotedgeconnectivitytest"

# Set container name with current date
container_name="logs$(date +%Y%m%d)"

# Set expiry time for the SAS token
expiry_time="$(date --utc --date "+12 hours" +"%Y-%m-%dT%H:%MZ")"

# Generate the SAS token for the container
sasToken="$(az storage container generate-sas --account-name "$storage_account" --name "$container_name" --https-only --expiry "$expiry_time" --as-user --auth-mode login --permissions drwl --output tsv)"
if [ $? -ne 0 ]; then
echo "Failed to generate SAS token."
exit 1
fi

echo "SAS token for Azure Storage account acquired. Expires $expiry_time"

# Construct the SAS URI
endpoint="$(az storage account show --name "$storage_account" --resource-group "$resource_group" --query 'primaryEndpoints.blob' -o tsv)"
sasUri="$endpoint$container_name?$sasToken"
echo "##vso[task.setvariable variable=testBlobStoreSas;issecret=true]$sasUri"
- template: templates/longhaul-deploy.yaml
parameters:
release.label: 'lh$(agent.group)'
Expand Down Expand Up @@ -343,7 +493,7 @@ jobs:
test.testMode: 'LongHaul'
test.useTRC: '$(useTRC)'
test.deploymentFileName: 'long_haul_deployment_constrained.template.json'
testResultCoordinator.storageAccountConnectionString: '$(EdgeLonghaulStorageAccountConnString)'
testResultCoordinator.blobStorageAccountUriWithSasToken: '$(testBlobStoreSas)'
clientModuleTransportType: 'mqtt'

################################################################################
Expand All @@ -367,6 +517,36 @@ jobs:
aziotis.package.filter: 'aziot-identity-service-?.*.x86_64.rpm'
identityServiceArtifactName: packages_mariner-2_amd64
quickstart.artifactName: 'IotEdgeQuickstart.linux-x64.tar.gz'
- task: AzureCLI@2
displayName: 'Get SAS URI for Blob Storage Account'
inputs:
azureSubscription: $(azure.subscription)
scriptType: 'bash'
scriptLocation: 'inlineScript'
inlineScript: |
# Hardcoded resource group and storage account name
resource_group="iotedge-deploy"
storage_account="iotedgeconnectivitytest"

# Set container name with current date
container_name="logs$(date +%Y%m%d)"

# Set expiry time for the SAS token
expiry_time="$(date --utc --date "+12 hours" +"%Y-%m-%dT%H:%MZ")"

# Generate the SAS token for the container
sasToken="$(az storage container generate-sas --account-name "$storage_account" --name "$container_name" --https-only --expiry "$expiry_time" --as-user --auth-mode login --permissions drwl --output tsv)"
if [ $? -ne 0 ]; then
echo "Failed to generate SAS token."
exit 1
fi

echo "SAS token for Azure Storage account acquired. Expires $expiry_time"

# Construct the SAS URI
endpoint="$(az storage account show --name "$storage_account" --resource-group "$resource_group" --query 'primaryEndpoints.blob' -o tsv)"
sasUri="$endpoint$container_name?$sasToken"
echo "##vso[task.setvariable variable=testBlobStoreSas;issecret=true]$sasUri"
- task: DeleteFiles@1
inputs:
SourceFolder: '$(Agent.HomeDirectory)/../artifacts/'
Expand Down Expand Up @@ -409,6 +589,6 @@ jobs:
test.testMode: 'LongHaul'
test.useTRC: '$(useTRC)'
test.deploymentFileName: 'long_haul_deployment.template.json'
testResultCoordinator.storageAccountConnectionString: '$(EdgeLonghaulStorageAccountConnString)'
testResultCoordinator.blobStorageAccountUriWithSasToken: '$(testBlobStoreSas)'
clientModuleTransportType: 'All'
packageType: 'rpm'
4 changes: 2 additions & 2 deletions builds/e2e/templates/longhaul-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ parameters:
test.testMode: ''
test.useTRC: ''
test.deploymentFileName: ''
testResultCoordinator.storageAccountConnectionString: ''
testResultCoordinator.blobStorageAccountUriWithSasToken: ''
clientModuleTransportType: ''
packageType: 'deb'

Expand Down Expand Up @@ -91,7 +91,7 @@ steps:
-metricsScrapeFrequencyInSecs "${{ parameters['metricsCollector.scrapeFrequencyInSecs'] }}" \
-metricsUploadTarget "${{ parameters['metricsCollector.uploadTarget'] }}" \
-deploymentFileName "${{ parameters['test.deploymentFileName'] }}" \
-storageAccountConnectionString "${{ parameters['testResultCoordinator.storageAccountConnectionString'] }}" \
-blobStorageAccountUriWithSasToken "$(testBlobStoreSas)" \
-testRuntimeLogLevel "${{ parameters['test.runtimeLogLevel'] }}" \
-testInfo "$testInfo" \
-twinUpdateSize "${{ parameters['twinTester.twinUpdateSize'] }}" \
Expand Down
1 change: 0 additions & 1 deletion builds/e2e/templates/longhaul-setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ steps:
SnitchLongHaulAlertUrl,
kvLogAnalyticWorkspaceId,
kvLogAnalyticSharedKey,
EdgeLonghaulStorageAccountConnString,
GitHubAccessToken
- task: AzureKeyVault@1
displayName: 'Azure Key Vault: $(azure.keyVault)'
Expand Down
2 changes: 1 addition & 1 deletion builds/e2e/templates/nested-deploy-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ steps:
-containerRegistryPassword "$(edgebuilds-azurecr-io-pwd)" \
-iotHubConnectionString "$(IotHub-ConnStr)" \
-deploymentFileName "${{ parameters.deploymentFile }}" \
-storageAccountConnectionString "$(EdgeConnectivityStorageAccountConnString)" \
-blobStorageAccountUriWithSasToken "$(testBlobStoreSas)" \
-edgeRuntimeBuildNumber "$(Build.BuildNumber)" \
-customEdgeAgentImage "$(customEdgeAgent.image)" \
-customEdgeHubImage "$(customEdgeHub.image)" \
Expand Down
32 changes: 30 additions & 2 deletions builds/e2e/templates/nested-get-secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ steps:
edgebuilds-azurecr-io-pwd,
kvLogAnalyticWorkspaceId,
kvLogAnalyticSharedKey,
EdgeConnectivityStorageAccountConnString,
EdgeLonghaulStorageAccountConnString,
GitHubAccessToken,
edgebuild-service-principal-secret,

Expand Down Expand Up @@ -40,3 +38,33 @@ steps:
echo "Azure DevOps AAD token acquired. Expires $(echo $aadTokenInfo | jq -r .expiresOn)"
aadToken=$(echo $aadTokenInfo | jq -r .accessToken)
echo "##vso[task.setvariable variable=IotEdgePAT;issecret=true]$aadToken"
- task: AzureCLI@2
displayName: 'Get SAS URI for Blob Storage Account'
inputs:
azureSubscription: $(azure.subscription)
scriptType: 'bash'
scriptLocation: 'inlineScript'
inlineScript: |
# Hardcoded resource group and storage account name
resource_group="iotedge-deploy"
storage_account="iotedgeconnectivitytest"

# Set container name with current date
container_name="logs$(date +%Y%m%d)"

# Set expiry time for the SAS token
expiry_time="$(date --utc --date "+12 hours" +"%Y-%m-%dT%H:%MZ")"

# Generate the SAS token for the container
sasToken="$(az storage container generate-sas --account-name "$storage_account" --name "$container_name" --https-only --expiry "$expiry_time" --as-user --auth-mode login --permissions drwl --output tsv)"
if [ $? -ne 0 ]; then
echo "Failed to generate SAS token."
exit 1
fi

echo "SAS token for Azure Storage account acquired. Expires $expiry_time"

# Construct the SAS URI
endpoint="$(az storage account show --name "$storage_account" --resource-group "$resource_group" --query 'primaryEndpoints.blob' -o tsv)"
sasUri="$endpoint$container_name?$sasToken"
echo "##vso[task.setvariable variable=testBlobStoreSas;issecret=true]$sasUri"
2 changes: 1 addition & 1 deletion builds/e2e/templates/nested-longhaul-deploy-amd64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
metricsCollector.hostPlatform: '$(hostPlatform)'
longHaul.parentHostname: '$(parentName)'
longHaul.parentEdgeDevice: '$(parentDeviceId)'
testResultCoordinator.storageAccountConnectionString: '$(EdgeLonghaulStorageAccountConnString)'
testResultCoordinator.blobStorageAccountUriWithSasToken: '$(testBlobStoreSas)'
quickstart.package.name: '$(quickstart.package.name)'
testInfo.testName: "${{ parameters['testInfo.testName'] }}"
upstream.protocol: "${{ parameters['upstream.protocol'] }}"
4 changes: 2 additions & 2 deletions builds/e2e/templates/nested-longhaul-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ parameters:
test.runtimeLogLevel: ''
longHaul.parentHostname: ''
longHaul.parentEdgeDevice: ''
testResultCoordinator.storageAccountConnectionString: ''
testResultCoordinator.blobStorageAccountUriWithSasToken: ''
quickstart.package.name: ''
upstream.protocol: ''

Expand Down Expand Up @@ -176,7 +176,7 @@ steps:
-metricsScrapeFrequencyInSecs "${{ parameters['metricsCollector.scrapeFrequencyInSecs'] }}" \
-metricsUploadTarget "${{ parameters['metricsCollector.uploadTarget'] }}" \
-deploymentFileName "${{ parameters['test.deploymentFileName'] }}" \
-storageAccountConnectionString "${{ parameters['testResultCoordinator.storageAccountConnectionString'] }}" \
-blobStorageAccountUriWithSasToken "$(testBlobStoreSas)" \
-testRuntimeLogLevel "${{ parameters['test.runtimeLogLevel'] }}" \
-testInfo "$testInfo" \
-twinUpdateSize "${{ parameters['twinTester.twinUpdateSize'] }}" \
Expand Down
4 changes: 2 additions & 2 deletions e2e_deployment_files/edgehub_restart_deployment.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@
"IOT_HUB_CONNECTION_STRING": {
"value": "<IoTHubConnectionString>"
},
"STORAGE_ACCOUNT_CONNECTION_STRING": {
"value": "<TestResultCoordinator.StorageAccountConnectionString>"
"BLOB_STORE_SAS": {
"value": "<testBlobStoreSas>"
},
"NetworkControllerRunProfile": {
"value": "<NetworkController.RunProfile>"
Expand Down
Loading