Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
5846298
Make arm32v7 jobs minimal so they don't need to access storage
damonbarry Nov 3, 2025
9ed2135
Get key vault secrets once, share with other jobs
damonbarry Nov 3, 2025
4ca30fb
Rename template
damonbarry Nov 3, 2025
bf4a978
TestIotHubResourceId isn't a secret
damonbarry Nov 3, 2025
d3eb5c6
Use different syntax to refer to template parameters
damonbarry Nov 3, 2025
aa89e84
Fix task name
damonbarry Nov 3, 2025
1d6b5e5
Encode/decode cert and key
damonbarry Nov 4, 2025
db22056
Fix variable case
damonbarry Nov 4, 2025
89de78f
Update end-to-end checkin pipeline
damonbarry Nov 4, 2025
086de13
Remove comment
damonbarry Nov 4, 2025
fc4e0ce
Update variable case in nested e2e pipeline
damonbarry Nov 4, 2025
d5b755c
Only get secrets if key vault name is passed in
damonbarry Nov 4, 2025
b954602
Temporarily hard-code condition
damonbarry Nov 4, 2025
3511651
Fix condition logic for key vault task
damonbarry Nov 4, 2025
d53de73
Remove key vault condition
damonbarry Nov 5, 2025
5d1d782
Wire up more secrets in nested e2e pipeline
damonbarry Nov 5, 2025
db14fa1
Rename template
damonbarry Nov 5, 2025
d91b62d
Sprout child templates
damonbarry Nov 5, 2025
c0faba9
Update connectivity pipeline to use new templates
damonbarry Nov 5, 2025
41a343a
Update ISA-95 pipeline to use new template
damonbarry Nov 5, 2025
7891519
Simplify e2e checkin pipeline
damonbarry Nov 5, 2025
0f278e7
Fix parameters for nested e2e AMQP test run
damonbarry Nov 5, 2025
411c6d3
Fix parameters for ISA-95 test run
damonbarry Nov 5, 2025
c62c40d
Remove outdated job dependency
damonbarry Nov 5, 2025
08f013d
Merge branch 'main' into private-endpoints
damonbarry Nov 5, 2025
082fd50
Don't create output variables for same-job use
damonbarry Nov 5, 2025
124536e
Fix parameter reference syntax
damonbarry Nov 5, 2025
df91f03
Fix sas_uri param ref syntax
damonbarry Nov 5, 2025
3d44627
Reference new template parameter in connectivity pipeline
damonbarry Nov 5, 2025
7fa63d2
Reduce duplication in e2e jobs
damonbarry Nov 7, 2025
0ffc07b
Fix pool references
damonbarry Nov 7, 2025
5a1976b
Fix parameter expression syntax
damonbarry Nov 7, 2025
c6de02b
Fix template indentation
damonbarry Nov 7, 2025
01a27f4
Try different template expression syntax
damonbarry Nov 7, 2025
d78ad11
Revert "Try different template expression syntax"
damonbarry Nov 7, 2025
8e6e63d
Fix another indentation problem
damonbarry Nov 7, 2025
89555ae
Fix snap arch args
damonbarry Nov 7, 2025
4e118b6
Fix arm64 pool variable
damonbarry Nov 7, 2025
00fe982
Revert "Fix arm64 pool variable"
damonbarry Nov 14, 2025
1693f23
Revert "Fix snap arch args"
damonbarry Nov 14, 2025
d6319f1
Revert "Fix another indentation problem"
damonbarry Nov 14, 2025
64fc714
Revert "Revert "Try different template expression syntax""
damonbarry Nov 14, 2025
543254a
Revert "Try different template expression syntax"
damonbarry Nov 14, 2025
fb8cf23
Revert "Fix template indentation"
damonbarry Nov 14, 2025
81a26fe
Revert "Fix parameter expression syntax"
damonbarry Nov 14, 2025
8c35f8b
Revert "Fix pool references"
damonbarry Nov 14, 2025
5f967b7
Revert "Reduce duplication in e2e jobs"
damonbarry Nov 14, 2025
c19ece9
Merge branch 'main' into private-endpoints
damonbarry Nov 14, 2025
ec7b35b
Restore original "minimal" setting for Debian 12 arm32v7
damonbarry Nov 14, 2025
9d68fce
Restore test timeout for Debian 12 arm32v7
damonbarry Nov 14, 2025
6f74566
Disable TestUpload* tests from on-prem custom agents
damonbarry Nov 14, 2025
a31d32b
Merge branch 'main' into private-endpoints
damonbarry Nov 19, 2025
cd610f6
Merge branch 'main' into private-endpoints
damonbarry Dec 11, 2025
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
23 changes: 16 additions & 7 deletions builds/checkin/e2e-checkin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,27 +45,36 @@ stages:
builtImages: $[stageDependencies.CheckBuildImages.check_source_change_runtime.outputs['check_files.RUNTIMECHANGES']]
builtPackages: $[stageDependencies.CheckBuildPackages.check_source_change_edgelet.outputs['check_files.EDGELETCHANGES']]
jobs:
- template: ../e2e/templates/get-storage-uri.yaml
parameters:
azureSubscription: $(az.subscription)

- job: ubuntu_2204_amd64
displayName: Ubuntu 22.04 amd64
dependsOn: Token
condition: succeeded('Token')
variables:
verbose: false
os: linux
arch: amd64
identityArtifactName: aziot-identity-ubuntu22.04-amd64
artifactName: iotedged-ubuntu22.04-amd64
sas_uri: $[ dependencies.Token.outputs['generate.sas_uri'] ]
pool:
name: $(pool.linux.name)
demands:
- ImageOverride -equals agent-aziotedge-ubuntu-22.04-msmoby
steps:
- template: ../e2e/templates/e2e-vault-secrets.yaml
parameters:
azureSubscription: $(az.subscription)
keyVaultName: $(kv.name)
- template: ../e2e/templates/storage-token.yaml
parameters:
azureSubscription: $(az.subscription)
- template: ../e2e/templates/e2e-setup.yaml
parameters:
iotHubResourceId: '$(iotHubResourceId)'
rootCaCertificate: '$(rootCaCertificate)'
rootCaKey: '$(rootCaKey)'
- template: ../e2e/templates/e2e-run.yaml
parameters:
containerRegistryPassword: '$(containerRegistryPassword)'
dpsGroupKeySymmetric: '$(dpsGroupKeySymmetric)'
eventHubCompatibleEndpoint: '$(eventHubCompatibleEndpoint)'
iotHubConnectionString: '$(iotHubConnectionString)'
rootCaPassword: '$(rootCaPassword)'
sas_uri: $(sas_uri)
14 changes: 11 additions & 3 deletions builds/e2e/connectivity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,17 @@ resources:
branch: 'main'

jobs:
- template: templates/get-storage-uri.yaml
parameters:
azureSubscription: $(azure.subscription)
- job: Token
displayName: 'Get SAS URI for Blob Storage Account'
pool:
name: $(pool.linux.name)
demands:
- ImageOverride -equals agent-aziotedge-ubuntu-22.04-msmoby
steps:
- template: templates/storage-token.yaml
parameters:
azureSubscription: $(azure.subscription)
crossJobVariables: true

################################################################################
- job: linux_amd64_moby
Expand Down
255 changes: 241 additions & 14 deletions builds/e2e/e2e.yaml

Large diffs are not rendered by default.

16 changes: 14 additions & 2 deletions builds/e2e/isa-95-smoke-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,23 @@ stages:
Start-Sleep -s 30
displayName: Wait for network to lock
- template: templates/nested-get-root-ca.yaml
- template: templates/e2e-vault-secrets.yaml
parameters:
azureSubscription: $(az.subscription)
keyVaultName: $(kv.name)
- template: templates/e2e-setup.yaml
parameters:
iotHubResourceId: '$(iotHubResourceId)'
rootCaCertificate: '$(rootCaCertificate)'
rootCaKey: '$(rootCaKey)'
- template: templates/e2e-run.yaml
parameters:
EventHubCompatibleEndpoint: '$(IotHub-EventHubConnStr)'
IotHubConnectionString: '$(IotHub-ConnStr)'
containerRegistryPassword: '$(containerRegistryPassword)'
dpsGroupKeySymmetric: '$(dpsGroupKeySymmetric)'
eventHubCompatibleEndpoint: '$(IotHub-EventHubConnStr)'
iotHubConnectionString: '$(IotHub-ConnStr)'
rootCaPassword: '$(rootCaPassword)'
sas_uri: $(sas_uri)
test_type: $(test_type)
- template: templates/nested-isa95-unlock.yaml
parameters:
Expand Down
31 changes: 24 additions & 7 deletions builds/e2e/nested-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ stages:
- stage: RunNestedTests
dependsOn: LockAgents
jobs:
- template: templates/get-storage-uri.yaml
- template: templates/e2e-secrets.yaml
parameters:
azureSubscription: $(az.subscription)
keyVaultName: $(kv.name)
- template: templates/nested-parent-vm-setup.yaml
parameters:
upstream.protocol: mqtt
Expand All @@ -62,6 +63,12 @@ stages:
arch: amd64
identityArtifactName: aziot-identity-ubuntu24.04-amd64
artifactName: iotedged-ubuntu24.04-amd64
containerRegistryPassword: $[ dependencies.Token.outputs['secrets.containerRegistryPassword'] ]
dpsGroupKeySymmetric: $[ dependencies.Token.outputs['secrets.dpsGroupKeySymmetric'] ]
iotHubResourceId: $[ dependencies.Token.outputs['secrets.iotHubResourceId'] ]
rootCaCertificate: $[ dependencies.Token.outputs['secrets.rootCaCertificate'] ]
rootCaKey: $[ dependencies.Token.outputs['secrets.rootCaKey'] ]
rootCaPassword: $[ dependencies.Token.outputs['secrets.rootCaPassword'] ]
sas_uri: $[ dependencies.Token.outputs['generate.sas_uri'] ]
nestededge: true
pool:
Expand All @@ -77,13 +84,20 @@ stages:
- template: templates/nested-get-root-ca.yaml
- template: templates/nested-get-device-name.yaml
- template: templates/e2e-setup.yaml
parameters:
iotHubResourceId: '$(iotHubResourceId)'
rootCaCertificate: '$(rootCaCertificate)'
rootCaKey: '$(rootCaKey)'
- template: templates/e2e-clear-docker-cached-images.yaml
- template: templates/e2e-run.yaml
parameters:
EventHubCompatibleEndpoint: '$(IotHub-EventHubConnStr)'
IotHubConnectionString: '$(IotHub-ConnStr)'
test_type: nestededge_mqtt
containerRegistryPassword: '$(containerRegistryPassword)'
dpsGroupKeySymmetric: '$(dpsGroupKeySymmetric)'
eventHubCompatibleEndpoint: '$(IotHub-EventHubConnStr)'
iotHubConnectionString: '$(IotHub-ConnStr)'
rootCaPassword: '$(rootCaPassword)'
sas_uri: $(sas_uri)
test_type: nestededge_mqtt
- template: templates/nested-deploy-config.yaml
parameters:
deviceId: $(lvl5DeviceId)
Expand All @@ -100,10 +114,13 @@ stages:
name: 4
- template: templates/e2e-run.yaml
parameters:
EventHubCompatibleEndpoint: '$(IotHub-EventHubConnStr)'
IotHubConnectionString: '$(IotHub-ConnStr)'
test_type: nestededge_amqp
containerRegistryPassword: '$(containerRegistryPassword)'
dpsGroupKeySymmetric: '$(dpsGroupKeySymmetric)'
eventHubCompatibleEndpoint: '$(IotHub-EventHubConnStr)'
iotHubConnectionString: '$(IotHub-ConnStr)'
rootCaPassword: '$(rootCaPassword)'
sas_uri: $(sas_uri)
test_type: nestededge_amqp

- stage: Cleanup
condition: always()
Expand Down
27 changes: 18 additions & 9 deletions builds/e2e/templates/e2e-run.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
parameters:
EventHubCompatibleEndpoint: '$(TestEventHubCompatibleEndpoint)'
IotHubConnectionString: '$(TestIotHubConnectionString)'
test_type: ''
containerRegistryPassword: ''
dpsGroupKeySymmetric: ''
eventHubCompatibleEndpoint: ''
iotHubConnectionString: ''
rootCaPassword: ''
sas_uri: ''
test_type: ''

steps:
# This E2E test pipeline uses the following filters in order to skip certain tests:
Expand Down Expand Up @@ -30,6 +33,12 @@ steps:
$filter += '&Category!=FlakyOnArm'
$filter += '&Category!=Amd64Only'
}
if ('$(arch)' -eq 'arm32v7' -And '$(minimal)' -eq 'false')
{
# TestUploadModuleLogs and TestUploadSupportBundle use a storage account that is only accessible via private link.
# If the tests are running from custom on-premises agents (e.g., Raspberry Pis) then they won't have access.
$filter += '&FullyQualifiedName!~TestUploadModuleLogs&FullyQualifiedName!~TestUploadSupportBundle'
}
if ($test_type -eq 'nestededge_mqtt')
{
$filter += '&Category!=SingleNodeOnly'
Expand Down Expand Up @@ -68,12 +77,12 @@ steps:

displayName: Run tests ${{ parameters.test_type }}
env:
E2E_DPS_GROUP_KEY: $(TestDpsGroupKeySymmetric)
E2E_EVENT_HUB_ENDPOINT: ${{ parameters['EventHubCompatibleEndpoint'] }}
E2E_IOT_HUB_CONNECTION_STRING: ${{ parameters['IotHubConnectionString'] }}
E2E_REGISTRIES__0__PASSWORD: $(TestContainerRegistryPassword)
E2E_ROOT_CA_PASSWORD: $(TestRootCaPassword)
E2E_BLOB_STORE_SAS: ${{ parameters['sas_uri'] }}
E2E_DPS_GROUP_KEY: ${{ parameters.dpsGroupKeySymmetric }}
E2E_EVENT_HUB_ENDPOINT: ${{ parameters.eventHubCompatibleEndpoint }}
E2E_IOT_HUB_CONNECTION_STRING: ${{ parameters.iotHubConnectionString }}
E2E_REGISTRIES__0__PASSWORD: ${{ parameters.containerRegistryPassword }}
E2E_ROOT_CA_PASSWORD: ${{ parameters.rootCaPassword }}
E2E_BLOB_STORE_SAS: ${{ parameters.sas_uri }}
no_proxy: 'localhost'

- task: PublishTestResults@2
Expand Down
21 changes: 21 additions & 0 deletions builds/e2e/templates/e2e-secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
parameters:
azureSubscription: ''
keyVaultName: ''

jobs:
- job: Token
displayName: 'Get SAS URI for Blob Storage Account'
pool:
name: $(pool.linux.name)
demands:
- ImageOverride -equals agent-aziotedge-ubuntu-22.04-msmoby
steps:
- template: e2e-vault-secrets.yaml
parameters:
azureSubscription: ${{ parameters.azureSubscription }}
crossJobVariables: true
keyVaultName: ${{ parameters.keyVaultName }}
- template: storage-token.yaml
parameters:
azureSubscription: ${{ parameters.azureSubscription }}
crossJobVariables: true
32 changes: 11 additions & 21 deletions builds/e2e/templates/e2e-setup.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
parameters:
iotHubResourceId: ''
rootCaCertificate: ''
rootCaKey: ''

steps:
- checkout: self
clean: true
fetchDepth: 100
submodules: recursive

- task: AzureKeyVault@2
displayName: Get secrets
inputs:
azureSubscription: $(az.subscription)
keyVaultName: $(kv.name)
secretsFilter: >-
TestContainerRegistryPassword,
TestDpsGroupKeySymmetric,
TestEventHubCompatibleEndpoint,
TestIotHubConnectionString,
TestIotHubResourceId,
TestRootCaCertificate,
TestRootCaKey,
TestRootCaPassword

- bash: |
echo "Built Images Result is '$(builtImages)'"
echo "Built Packages Result is '$(builtPackages)'"
Expand Down Expand Up @@ -108,14 +98,14 @@ steps:
- pwsh: |
$certsDir = '$(System.ArtifactsDirectory)/certs'
New-Item "$certsDir" -ItemType Directory -Force | Out-Null
$env:ROOT_CERT | Out-File -Encoding Utf8 "$certsDir/rsa_root_ca.cert.pem"
$env:ROOT_KEY | Out-File -Encoding Utf8 "$certsDir/rsa_root_ca.key.pem"
$env:ROOT_CERT -replace '\\x0A', "`n" | Out-File -Encoding Utf8 "$certsDir/rsa_root_ca.cert.pem"
$env:ROOT_KEY -replace '\\x0A', "`n" | Out-File -Encoding Utf8 "$certsDir/rsa_root_ca.key.pem"
Write-Output "##vso[task.setvariable variable=certsDir]$certsDir"
displayName: Install CA keys
env:
ROOT_CERT: $(TestRootCaCertificate)
ROOT_KEY: $(TestRootCaKey)
ROOT_CERT: ${{ parameters.rootCaCertificate }}
ROOT_KEY: ${{ parameters.rootCaKey }}

- pwsh: |
$testDir = '$(Build.SourcesDirectory)/test/Microsoft.Azure.Devices.Edge.Test'
dotnet build $testDir
Expand Down Expand Up @@ -238,4 +228,4 @@ steps:
$context | ConvertTo-Json | Out-File -Encoding Utf8 '$(binDir)/context.json'
displayName: Create test arguments file (context.json)
env:
IOT_HUB_RESOURCE_ID: $(TestIotHubResourceId)
IOT_HUB_RESOURCE_ID: ${{ parameters.iotHubResourceId }}
49 changes: 49 additions & 0 deletions builds/e2e/templates/e2e-vault-secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
parameters:
- name: azureSubscription
type: string
default: ''
- name: crossJobVariables
type: boolean
default: false
- name: keyVaultName
type: string
default: ''

steps:
- task: AzureKeyVault@2
displayName: Get secrets
inputs:
azureSubscription: ${{ parameters.azureSubscription }}
keyVaultName: ${{ parameters.keyVaultName }}
secretsFilter: >-
TestContainerRegistryPassword,
TestDpsGroupKeySymmetric,
TestEventHubCompatibleEndpoint,
TestIotHubConnectionString,
TestIotHubResourceId,
TestRootCaCertificate,
TestRootCaKey,
TestRootCaPassword
- bash: |
# Azure Pipelines doesn't seem to handle multi-line task variables, so encode to one line
# See https://developercommunity.visualstudio.com/t/multiple-lines-variable-in-build-and-release/365667
readarray -t certlines < <(echo '$(TestRootCaCertificate)')
cert=$(printf '\\x0A%s' "${certlines[@]//$'\r'}") # Prepend each line with hex-escaped newline
cert=${cert:4} # Remove leading newline

# Azure Pipelines doesn't seem to handle multi-line task variables, so encode to one line
# See https://developercommunity.visualstudio.com/t/multiple-lines-variable-in-build-and-release/365667
readarray -t keylines < <(echo '$(TestRootCaKey)')
key=$(printf '\\x0A%s' "${keylines[@]//$'\r'}") # Prepend each line with hex-escaped newline
key=${key:4} # Remove leading newline

echo "##vso[task.setvariable variable=containerRegistryPassword;issecret=true;isoutput=${{ parameters.crossJobVariables }}]$(TestContainerRegistryPassword)"
echo "##vso[task.setvariable variable=dpsGroupKeySymmetric;issecret=true;isoutput=${{ parameters.crossJobVariables }}]$(TestDpsGroupKeySymmetric)"
echo "##vso[task.setvariable variable=eventHubCompatibleEndpoint;issecret=true;isoutput=${{ parameters.crossJobVariables }}]$(TestEventHubCompatibleEndpoint)"
echo "##vso[task.setvariable variable=iotHubConnectionString;issecret=true;isoutput=${{ parameters.crossJobVariables }}]$(TestIotHubConnectionString)"
echo "##vso[task.setvariable variable=iotHubResourceId;issecret=false;isoutput=${{ parameters.crossJobVariables }}]$(TestIotHubResourceId)"
echo "##vso[task.setvariable variable=rootCaCertificate;issecret=true;isoutput=${{ parameters.crossJobVariables }}]$cert"
echo "##vso[task.setvariable variable=rootCaKey;issecret=true;isoutput=${{ parameters.crossJobVariables }}]$key"
echo "##vso[task.setvariable variable=rootCaPassword;issecret=true;isoutput=${{ parameters.crossJobVariables }}]$(TestRootCaPassword)"
name: secrets
displayName: 'Make Key Vault secrets available to pipeline'
38 changes: 0 additions & 38 deletions builds/e2e/templates/get-storage-uri.yaml

This file was deleted.

Loading