Skip to content

Conversation

hallipr
Copy link
Member

@hallipr hallipr commented Sep 8, 2025

  • Allow arbitrary branches to be manually built and live tested without being released
  • Only allow releases from manually queued runs of main or hotfix/*

- Allow arbitrary branches to be manually built and live tested without being released
- Only allow releases from manually queued runs of `main` or `hotfix/*`
@Copilot Copilot AI review requested due to automatic review settings September 8, 2025 21:59
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the CI/CD pipeline conditions to improve branch management and release control by restricting releases to specific branches while allowing live testing on any branch.

  • Reorders conditions to check branch restrictions before other release criteria
  • Restricts releases to only main and hotfix/* branches for better release governance
  • Updates comments to reflect the new condition ordering and branch restrictions

# 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.

@hallipr hallipr marked this pull request as draft September 10, 2025 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants