-
Notifications
You must be signed in to change notification settings - Fork 313
Refactor conditions for Prerelease and Release stages #2977
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,16 +138,18 @@ extends: | |
SubscriptionConfigurationFilePaths: ${{ cloud.value.SubscriptionConfigurationFilePaths }} | ||
|
||
# The Prerelease and Release stages are conditioned on: | ||
# 1. Internal trigger, not Pull Request trigger | ||
# 1. Internal pipeline | ||
# 2. Only release from main or hotfix/* | ||
# 2. Not weekly build | ||
# 3. Manual trigger or force IncludeRelease | ||
- ${{ if and(not(startsWith(variables['Build.SourceBranchName'], 'refs/pull/')), eq(variables['System.TeamProject'], 'internal')) }}: | ||
- ${{ if not(contains(variables['Build.DefinitionName'], 'weekly')) }}: | ||
- ${{ if or(in(variables['Build.Reason'], 'Manual', ''), eq(parameters.IncludeRelease, true)) }}: | ||
- template: archetype-rust-release.yml | ||
parameters: | ||
DependsOn: "Build" | ||
ServiceDirectory: ${{ parameters.ServiceDirectory }} | ||
Artifacts: ${{ parameters.Artifacts }} | ||
TestPipeline: ${{ eq(parameters.ServiceDirectory, 'template') }} | ||
PipelineArtifactName: packages | ||
- ${{ if eq(variables['System.TeamProject'], 'internal') }}: | ||
- ${{ if or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), startsWith(variables['Build.SourceBranch'], 'refs/heads/hotfix/')) }}: | ||
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. Aren't branch specifics usually in 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. We have a lot of rules here that should probably just go into the Can you think of any reason to release a build that wasn't manually queued? 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. No, but I also wonder why we don't support the usual 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. @hallipr as we chatted I agree with Heath this is too strict. We should let you trigger from any branch. We still have the approval environment that will block anything from publishing until it is ready. |
||
- ${{ if not(contains(variables['Build.DefinitionName'], 'weekly')) }}: | ||
- ${{ if or(in(variables['Build.Reason'], 'Manual', ''), eq(parameters.IncludeRelease, true)) }}: | ||
- template: archetype-rust-release.yml | ||
parameters: | ||
DependsOn: "Build" | ||
ServiceDirectory: ${{ parameters.ServiceDirectory }} | ||
Artifacts: ${{ parameters.Artifacts }} | ||
TestPipeline: ${{ eq(parameters.ServiceDirectory, 'template') }} | ||
PipelineArtifactName: packages |
Uh oh!
There was an error while loading. Please reload this page.