-
Notifications
You must be signed in to change notification settings - Fork 469
Pipelines access key vault and storage through private endpoints #7483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
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 9ed2135
Get key vault secrets once, share with other jobs
damonbarry 4ca30fb
Rename template
damonbarry bf4a978
TestIotHubResourceId isn't a secret
damonbarry d3eb5c6
Use different syntax to refer to template parameters
damonbarry aa89e84
Fix task name
damonbarry 1d6b5e5
Encode/decode cert and key
damonbarry db22056
Fix variable case
damonbarry 89de78f
Update end-to-end checkin pipeline
damonbarry 086de13
Remove comment
damonbarry fc4e0ce
Update variable case in nested e2e pipeline
damonbarry d5b755c
Only get secrets if key vault name is passed in
damonbarry b954602
Temporarily hard-code condition
damonbarry 3511651
Fix condition logic for key vault task
damonbarry d53de73
Remove key vault condition
damonbarry 5d1d782
Wire up more secrets in nested e2e pipeline
damonbarry db14fa1
Rename template
damonbarry d91b62d
Sprout child templates
damonbarry c0faba9
Update connectivity pipeline to use new templates
damonbarry 41a343a
Update ISA-95 pipeline to use new template
damonbarry 7891519
Simplify e2e checkin pipeline
damonbarry 0f278e7
Fix parameters for nested e2e AMQP test run
damonbarry 411c6d3
Fix parameters for ISA-95 test run
damonbarry c62c40d
Remove outdated job dependency
damonbarry 08f013d
Merge branch 'main' into private-endpoints
damonbarry 082fd50
Don't create output variables for same-job use
damonbarry 124536e
Fix parameter reference syntax
damonbarry df91f03
Fix sas_uri param ref syntax
damonbarry 3d44627
Reference new template parameter in connectivity pipeline
damonbarry 7fa63d2
Reduce duplication in e2e jobs
damonbarry 0ffc07b
Fix pool references
damonbarry 5a1976b
Fix parameter expression syntax
damonbarry c6de02b
Fix template indentation
damonbarry 01a27f4
Try different template expression syntax
damonbarry d78ad11
Revert "Try different template expression syntax"
damonbarry 8e6e63d
Fix another indentation problem
damonbarry 89555ae
Fix snap arch args
damonbarry 4e118b6
Fix arm64 pool variable
damonbarry 00fe982
Revert "Fix arm64 pool variable"
damonbarry 1693f23
Revert "Fix snap arch args"
damonbarry d6319f1
Revert "Fix another indentation problem"
damonbarry 64fc714
Revert "Revert "Try different template expression syntax""
damonbarry 543254a
Revert "Try different template expression syntax"
damonbarry fb8cf23
Revert "Fix template indentation"
damonbarry 81a26fe
Revert "Fix parameter expression syntax"
damonbarry 8c35f8b
Revert "Fix pool references"
damonbarry 5f967b7
Revert "Reduce duplication in e2e jobs"
damonbarry c19ece9
Merge branch 'main' into private-endpoints
damonbarry ec7b35b
Restore original "minimal" setting for Debian 12 arm32v7
damonbarry 9d68fce
Restore test timeout for Debian 12 arm32v7
damonbarry 6f74566
Disable TestUpload* tests from on-prem custom agents
damonbarry a31d32b
Merge branch 'main' into private-endpoints
damonbarry cd610f6
Merge branch 'main' into private-endpoints
damonbarry File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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' |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.