-
Notifications
You must be signed in to change notification settings - Fork 288
Enable extension CI builds — daily + PR #7497
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
Open
rajeshkamal5050
wants to merge
10
commits into
main
Choose a base branch
from
ext-daily-builds
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
a8a48bd
Add daily extension builds to storage
rajeshkamal5050 1ba909d
Add daily extension builds to storage with registry
rajeshkamal5050 c39a5b6
Add daily version suffix for extension CI builds
rajeshkamal5050 9736f32
Address hostile review: input validation, error handling, logging
rajeshkamal5050 32e1005
Address PR review: version override, per-extension registry, manifest…
rajeshkamal5050 fdb24a5
Address PR review feedback: powershell-yaml, registry format, error h…
rajeshkamal5050 49986ec
Add extension PR builds with registry and install comment
rajeshkamal5050 eb8b3a9
Use runtime conditions for publishing based on build reason or overrides
danieljurek 08a30f9
Skip tests
danieljurek 0c7bc3a
Skip ValidateCrossCompile
danieljurek 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 0.1.21-preview | ||
| 0.1.22-preview |
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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| 0.0.17-preview | ||
| 0.0.18-preview |
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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| 0.0.5-preview | ||
| 0.0.6-preview |
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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| 0.1.0 | ||
| 0.1.1 |
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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| 0.6.1 | ||
| 0.6.2 |
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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| 0.2.0 | ||
| 0.2.1 |
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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| 0.1.0 | ||
| 0.1.1 |
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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| 0.6.0 | ||
| 0.6.1 |
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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| 0.10.0 | ||
| 0.10.1 |
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
63 changes: 63 additions & 0 deletions
63
eng/pipelines/templates/stages/publish-extension-daily.yml
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,63 @@ | ||
| parameters: | ||
| - name: SanitizedExtensionId | ||
| type: string | ||
| - name: AzdExtensionId | ||
| type: string | ||
|
|
||
| stages: | ||
| - stage: PublishDaily | ||
| dependsOn: Sign | ||
| condition: >- | ||
| and( | ||
| succeeded(), | ||
| ne(variables['Skip.Release'], 'true'), | ||
| or( | ||
| in(variables['BuildReasonOverride'], 'IndividualCI', 'BatchedCI'), | ||
| and( | ||
| eq('', variables['BuildReasonOverride']), | ||
| in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI') | ||
| ) | ||
| ) | ||
| ) | ||
|
|
||
| variables: | ||
| - template: /eng/pipelines/templates/variables/image.yml | ||
| - template: /eng/pipelines/templates/variables/globals.yml | ||
|
|
||
| jobs: | ||
| - deployment: Publish_Daily | ||
| environment: none | ||
|
|
||
| pool: | ||
| name: azsdk-pool | ||
| image: ubuntu-22.04 | ||
| os: linux | ||
|
|
||
| templateContext: | ||
| type: releaseJob | ||
| isProduction: false | ||
| inputs: | ||
| - input: pipelineArtifact | ||
| artifactName: release | ||
| targetPath: release | ||
| - input: pipelineArtifact | ||
| artifactName: release-metadata | ||
| targetPath: release-metadata | ||
|
|
||
| strategy: | ||
| runOnce: | ||
| deploy: | ||
| steps: | ||
| - template: /eng/pipelines/templates/steps/extension-set-metadata-variables.yml | ||
| parameters: | ||
| Use1ESArtifactTask: true | ||
|
|
||
| - template: /eng/pipelines/templates/steps/publish-extension.yml | ||
| parameters: | ||
| PublishUploadLocations: ${{ parameters.SanitizedExtensionId }}/daily;${{ parameters.SanitizedExtensionId }}/daily/archive/$(EXT_VERSION) | ||
| CreateGitHubRelease: false | ||
|
|
||
| - template: /eng/pipelines/templates/steps/update-extension-daily-registry.yml | ||
| parameters: | ||
| SanitizedExtensionId: ${{ parameters.SanitizedExtensionId }} | ||
| AzdExtensionId: ${{ parameters.AzdExtensionId }} |
120 changes: 120 additions & 0 deletions
120
eng/pipelines/templates/stages/publish-extension-pr.yml
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,120 @@ | ||
| parameters: | ||
| - name: SanitizedExtensionId | ||
| type: string | ||
| - name: AzdExtensionId | ||
| type: string | ||
|
|
||
| stages: | ||
| - stage: PublishForPR | ||
| dependsOn: Sign | ||
| condition: >- | ||
| and( | ||
| succeeded(), | ||
| ne(variables['Skip.Release'], 'true'), | ||
| or( | ||
| eq('PullRequest', variables['BuildReasonOverride']), | ||
| and( | ||
| eq('', variables['BuildReasonOverride']), | ||
| eq(variables['Build.Reason'], 'PullRequest') | ||
| ) | ||
| ) | ||
| ) | ||
|
|
||
| variables: | ||
| - template: /eng/pipelines/templates/variables/image.yml | ||
| - template: /eng/pipelines/templates/variables/globals.yml | ||
|
|
||
| jobs: | ||
| - deployment: Publish_Extension_For_PR | ||
| environment: none | ||
|
|
||
| pool: | ||
| name: azsdk-pool | ||
| image: ubuntu-22.04 | ||
| os: linux | ||
|
|
||
| templateContext: | ||
| type: releaseJob | ||
| isProduction: false | ||
| inputs: | ||
| - input: pipelineArtifact | ||
| artifactName: release | ||
| targetPath: release | ||
| - input: pipelineArtifact | ||
| artifactName: release-metadata | ||
| targetPath: release-metadata | ||
|
|
||
| strategy: | ||
| runOnce: | ||
| deploy: | ||
| steps: | ||
| - pwsh: | | ||
| $PRNumber = '$(System.PullRequest.PullRequestNumber)' | ||
| if ($env:PRNUMBEROVERRIDE) { | ||
| Write-Host "PR Number override: $($env:PRNUMBEROVERRIDE)" | ||
| $PRNumber = "$($env:PRNUMBEROVERRIDE)" | ||
| } | ||
| if (-not $PRNumber -or $PRNumber -match '^\$\(') { | ||
| Write-Error "PR number could not be determined. Ensure this runs in a PR build or set PRNUMBEROVERRIDE." | ||
| exit 1 | ||
| } | ||
| Write-Host "##vso[task.setvariable variable=PRNumber]$PRNumber" | ||
| displayName: Set PR Number Variable | ||
|
|
||
| - template: /eng/pipelines/templates/steps/extension-set-metadata-variables.yml | ||
| parameters: | ||
| Use1ESArtifactTask: true | ||
|
|
||
| - template: /eng/pipelines/templates/steps/publish-extension.yml | ||
| parameters: | ||
| PublishUploadLocations: ${{ parameters.SanitizedExtensionId }}/pr/$(PRNumber) | ||
| CreateGitHubRelease: false | ||
|
|
||
| - template: /eng/pipelines/templates/steps/update-extension-pr-registry.yml | ||
| parameters: | ||
| SanitizedExtensionId: ${{ parameters.SanitizedExtensionId }} | ||
| AzdExtensionId: ${{ parameters.AzdExtensionId }} | ||
| PRNumber: $(PRNumber) | ||
|
|
||
| - pwsh: | | ||
| $storageHost = "$(publish-storage-static-host)" | ||
| $extId = "${{ parameters.AzdExtensionId }}" | ||
| $sanitizedId = "${{ parameters.SanitizedExtensionId }}" | ||
| $prNumber = "$(PRNumber)" | ||
| $registryUrl = "$storageHost/azd/extensions/pr-registry-entries/$prNumber/$extId.json" | ||
| $binaryBase = "$storageHost/azd/extensions/$sanitizedId/pr/$prNumber" | ||
|
|
||
| $content = @" | ||
| <!-- #comment-ext-pr-$extId --> | ||
| ## azd Extension Install Instructions — ``$extId`` | ||
|
|
||
| > :warning: **These are unsigned PR builds for testing only.** Do not use in production. | ||
|
|
||
| ### Install from PR build | ||
|
|
||
| ``````bash | ||
| azd ext source add -n pr-$prNumber -t url -l "$registryUrl" | ||
| azd ext install $extId --source pr-$prNumber | ||
| `````` | ||
|
|
||
| ### Standalone Binaries | ||
|
|
||
| | Platform | Download | | ||
| |----------|----------| | ||
| | Linux x86_64 | $binaryBase/$sanitizedId-linux-amd64.tar.gz | | ||
| | Linux ARM64 | $binaryBase/$sanitizedId-linux-arm64.tar.gz | | ||
| | macOS x86_64 | $binaryBase/$sanitizedId-darwin-amd64.zip | | ||
| | macOS ARM64 | $binaryBase/$sanitizedId-darwin-arm64.zip | | ||
| | Windows x86_64 | $binaryBase/$sanitizedId-windows-amd64.zip | | ||
| | Windows ARM64 | $binaryBase/$sanitizedId-windows-arm64.zip | | ||
| "@ | ||
| $file = New-TemporaryFile | ||
| Set-Content -Path $file -Value $content | ||
| Write-Host "##vso[task.setvariable variable=CommentBodyFile]$file" | ||
| displayName: Generate PR comment body | ||
|
|
||
| - template: /eng/pipelines/templates/steps/update-prcomment.yml | ||
| parameters: | ||
| PrNumber: $(PRNumber) | ||
| BodyFile: $(CommentBodyFile) | ||
| Tag: '<!-- #comment-ext-pr-${{ parameters.AzdExtensionId }} -->' |
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
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.