-
Notifications
You must be signed in to change notification settings - Fork 52
Release Fixes 2 #603
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
Release Fixes 2 #603
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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 |
|---|---|---|
|
|
@@ -25,8 +25,14 @@ stages: | |
| displayName: Publish NuGets to internal InstrumentationEngine Feed | ||
| dependsOn: [] | ||
| jobs: | ||
| - deployment: Publish | ||
| displayName: Publish NuGets to internal InstrumentationEngine Feed | ||
| # --------------------------------------------------------------------------------- | ||
| # Approval gate. A release (deployment) job targeting the gated environment so the | ||
| # classic pre-deploy approval still applies before anything is published. It performs | ||
| # no work itself -- 1ES release jobs cannot declare outputs, so the actual NuGet push | ||
| # lives on the separate plain 'Publish' job below (output: nuget). | ||
| # --------------------------------------------------------------------------------- | ||
| - deployment: ApprovalGate | ||
| displayName: Approval gate (internal NuGet feed) | ||
| environment: CLRIE-Release-Internal-NuGet-Feed | ||
| pool: | ||
| name: VSEngSS-Microbuild2022-1ES | ||
|
|
@@ -39,43 +45,93 @@ stages: | |
| deploy: | ||
| steps: | ||
| - download: none | ||
| - download: ClrInstrumentationEngine-Signed-Yaml | ||
| artifact: packages-windows-Release | ||
| patterns: '**/Microsoft.InstrumentationEngine*.nupkg' | ||
| displayName: Download Windows packages | ||
| - download: ClrInstrumentationEngine-Signed-Yaml | ||
| artifact: packages-linux-ubuntu-Release | ||
| patterns: '**/Microsoft.InstrumentationEngine*.nupkg' | ||
| displayName: Download Linux (ubuntu) packages | ||
| - download: ClrInstrumentationEngine-Signed-Yaml | ||
| artifact: packages-linux-alpine-Release | ||
| patterns: '**/Microsoft.InstrumentationEngine*.nupkg' | ||
| displayName: Download Linux (alpine) packages | ||
|
|
||
| - task: NuGetAuthenticate@1 | ||
| displayName: NuGet Authenticate | ||
| # --------------------------------------------------------------------------------- | ||
| # Publish. Plain job (runs only after the gate is approved). Artifacts are downloaded | ||
| # via templateContext.inputs (the 1ES-sanctioned replacement for '- download:') and | ||
| # published via the only construct 1ES allows for pushing NuGet packages: output: nuget. | ||
| # --------------------------------------------------------------------------------- | ||
| - job: Publish | ||
| displayName: Publish NuGets to internal InstrumentationEngine Feed | ||
| dependsOn: ApprovalGate | ||
| pool: | ||
| name: VSEngSS-Microbuild2022-1ES | ||
| os: windows | ||
| templateContext: | ||
| inputs: | ||
| - input: pipelineArtifact | ||
| pipeline: ClrInstrumentationEngine-Signed-Yaml | ||
| artifactName: packages-windows-Release | ||
| targetPath: $(Pipeline.Workspace)\ClrInstrumentationEngine-Signed-Yaml\packages-windows-Release | ||
| - input: pipelineArtifact | ||
| pipeline: ClrInstrumentationEngine-Signed-Yaml | ||
| artifactName: packages-linux-ubuntu-Release | ||
| targetPath: $(Pipeline.Workspace)\ClrInstrumentationEngine-Signed-Yaml\packages-linux-ubuntu-Release | ||
| - input: pipelineArtifact | ||
| pipeline: ClrInstrumentationEngine-Signed-Yaml | ||
| artifactName: packages-linux-alpine-Release | ||
| targetPath: $(Pipeline.Workspace)\ClrInstrumentationEngine-Signed-Yaml\packages-linux-alpine-Release | ||
| outputs: | ||
| - output: nuget | ||
| displayName: Push to DevDiv InstrumentationEngine feed | ||
| # Dry run: skip the actual push (nothing is published) while the rest of the job | ||
| # -- artifact download above and the promote logic downstream -- still runs. | ||
| condition: ne(variables['DryRun'], 'True') | ||
| packageParentPath: $(ArtifactsDirectory) | ||
| packagesToPush: $(ArtifactsDirectory)\$(WindowsInstrumentationEngineNuGetArtifactPathPattern);$(ArtifactsDirectory)\$(LinuxInstrumentationEngineNuGetArtifactPathPattern) | ||
| nuGetFeedType: internal | ||
| publishVstsFeed: 59c1dfae-dea5-4ea5-ac83-c9abcb4ac339 | ||
| allowPackageConflicts: true | ||
| publishPackageMetadata: true | ||
| verbosityPush: Detailed | ||
| steps: | ||
| - checkout: none | ||
|
|
||
| - task: NuGetCommand@2 | ||
| displayName: Push to DevDiv InstrumentationEngine feed | ||
| inputs: | ||
| command: push | ||
| nuGetFeedType: internal | ||
| publishVstsFeed: 59c1dfae-dea5-4ea5-ac83-c9abcb4ac339 | ||
| packagesToPush: $(ArtifactsDirectory)\$(WindowsInstrumentationEngineNuGetArtifactPathPattern);$(ArtifactsDirectory)\$(LinuxInstrumentationEngineNuGetArtifactPathPattern) | ||
| allowPackageConflicts: true | ||
| publishPackageMetadata: true | ||
| verbosityPush: Detailed | ||
| # --------------------------------------------------------------------------------- | ||
| # Promote (optional). Release (deployment) job, only runs when PromoteToRelease=True. | ||
| # Artifacts are downloaded via templateContext.inputs; the promote REST call runs in | ||
| # the on.success hook below. | ||
| # --------------------------------------------------------------------------------- | ||
| - deployment: Promote | ||
| displayName: Promote package to Release View | ||
| dependsOn: Publish | ||
| condition: and(eq(variables['PromoteToRelease'], 'True'), ne(variables['DryRun'], 'True')) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does any of this run then with DryRun == true? You have a condition on the overall deployment and on the promote task. |
||
| environment: CLRIE-Release-Promote-Internal-NuGet-Feed | ||
| pool: | ||
| name: VSEngSS-Microbuild2022-1ES | ||
| os: windows | ||
| templateContext: | ||
| type: releaseJob | ||
| isProduction: true | ||
| inputs: | ||
| - input: pipelineArtifact | ||
| pipeline: ClrInstrumentationEngine-Signed-Yaml | ||
| artifactName: packages-windows-Release | ||
| targetPath: $(Pipeline.Workspace)\ClrInstrumentationEngine-Signed-Yaml\packages-windows-Release | ||
| - input: pipelineArtifact | ||
| pipeline: ClrInstrumentationEngine-Signed-Yaml | ||
| artifactName: packages-linux-ubuntu-Release | ||
| targetPath: $(Pipeline.Workspace)\ClrInstrumentationEngine-Signed-Yaml\packages-linux-ubuntu-Release | ||
| - input: pipelineArtifact | ||
| pipeline: ClrInstrumentationEngine-Signed-Yaml | ||
| artifactName: packages-linux-alpine-Release | ||
| targetPath: $(Pipeline.Workspace)\ClrInstrumentationEngine-Signed-Yaml\packages-linux-alpine-Release | ||
| strategy: | ||
| runOnce: | ||
| deploy: | ||
| steps: | ||
| - download: none | ||
|
wiktork marked this conversation as resolved.
|
||
| on: | ||
| # The 'on success' hook runs after the deploy phase (including the NuGet push above) | ||
| # has succeeded, so the promote step always runs after the packages are published. | ||
| success: | ||
| steps: | ||
| # Classic equivalent: "Promote package to Release View" (deprecated marketplace task, | ||
| # gated on PromoteToRelease). Implemented here against the Azure Artifacts packaging | ||
| # REST API; only runs when PromoteToRelease is set to 'True'. | ||
| # REST API; only runs when PromoteToRelease is 'True' and this is not a dry run. | ||
| - task: PowerShell@2 | ||
| displayName: Promote package to Release View | ||
| condition: and(succeeded(), eq(variables['PromoteToRelease'], 'True')) | ||
| condition: and(succeeded(), eq(variables['PromoteToRelease'], 'True'), ne(variables['DryRun'], 'True')) | ||
| env: | ||
| SYSTEM_ACCESSTOKEN: $(System.AccessToken) | ||
| inputs: | ||
|
|
||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Promote logic doesn't have any dryrun checks. So you can do a dry-run with no push followed by a promote?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to skip promote when DryRun is set