Skip to content
Draft
Changes from all commits
Commits
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
28 changes: 15 additions & 13 deletions eng/pipelines/templates/stages/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,18 @@ extends:
SubscriptionConfigurationFilePaths: ${{ cloud.value.SubscriptionConfigurationFilePaths }}

# The Prerelease and Release stages are conditioned on:
# 1. Internal trigger, not Pull Request trigger
# 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
# 1. Internal pipeline
# 2. Only release from main or hotfix/*
# 3. Not weekly build
# 4. Manual trigger or force IncludeRelease
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- ${{ if or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), startsWith(variables['Build.SourceBranch'], 'refs/heads/hotfix/')) }}:
Copy link
Member

@heaths heaths Sep 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't branch specifics usually in ci.yml? This feels much more strict.

Copy link
Member Author

Choose a reason for hiding this comment

The 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 IncludeRelease parameter. As is, the PR template passes "IncludeRelease: false" and all of the ci.ymls let it default to true. For some reason, we ignore IncludeRelease if the build was manually queued, which is what I want to avoid here....

Can you think of any reason to release a build that wasn't manually queued?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, but I also wonder why we don't support the usual release/ prefix. Or even feature/, though we'd want to make sure those don't publish to crates.io and that would require more work than is in scope here or necessary for GA.

Copy link
Member

Choose a reason for hiding this comment

The 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