-
Notifications
You must be signed in to change notification settings - Fork 848
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
feat: add check release to auto trigger internal release job #16207
Conversation
@tadelesh can you give me more context on what we are trying to fix here? If we don't want to release a given package we should opt it out of release as opposed to ignoring what looks like could be real errors in other packages we do want to release. |
I need to trigger an internal release pipeline manually if I need to do the SDK release for now. Then after the build stage in pipeline pass, I need to do another manual approval to continue the release stage. As we release SDK with separate RP packages, there are so many manual clicks. So I want to setup a new stage to trigger the internal release pipeline automatically. The trigger condition is: if a package is under development with the changelog in |
If the goal is to cut down on manual approvals, I don't think this is the correct approach. With the current changes it will actually potentially skip out on packages we want to ship but have errors that weren't discovered in other ways. I'm actually unsure how your current changes even eliminate the manual steps of clicking the approve button on the packages you want to release. Just in case you aren't aware the thing that causes the manual approval check is the |
I think you misunderstand what I've done. When I want to do a release for some SDK. I need to find the SDK's specific internal pipeline in the ado and trigger it manually. Then the pipeline will do build and test first. After that, I need to do the approval to continue the pipeline. So there are TWO manual work here (trigger and approval). What I've done is to cut the first manual trigger work. Any following release step including the approval step will not change. |
OK I think I see. You removed
We will definitely have to fix the first issue but we might be able to live with the second issue but we would need to test to see what that looks like. @benbp @seankane-msft what do you think about this release process for go packages? |
eng/scripts/Verify-NeedToRelease.ps1
Outdated
|
||
if (!$changeLogEntry) | ||
{ | ||
Write-Host "Changelog not existed for package: $PackageName, version: $($PackageProp.Version)." |
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.
Write-Host "Changelog not existed for package: $PackageName, version: $($PackageProp.Version)." | |
Write-Host "Changelog does not exist for package: $PackageName, version: $($PackageProp.Version)." |
eng/scripts/Verify-NeedToRelease.ps1
Outdated
|
||
if ([System.String]::IsNullOrEmpty($changeLogEntry.ReleaseStatus) -or $changeLogEntry.ReleaseStatus -eq $CHANGELOG_UNRELEASED_STATUS) | ||
{ | ||
Write-Host "Changelog not in release status for package: $PackageName, version: $($PackageProp.Version)." |
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.
Write-Host "Changelog not in release status for package: $PackageName, version: $($PackageProp.Version)." | |
Write-Host "Changelog is not in release status for package: $PackageName, version: $($PackageProp.Version)." |
For the first issue, there is an internal check in the outside template (archetype-sdk-client.yml: ${{if and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'internal'))}}). I removed the inner check (archetype-go-release.yml: ${{if and(eq(variables['Build.Reason'], 'Manual'), eq(variables['System.TeamProject'], 'internal'))}}) for deduplication. Btw, I've fixed the log grammar. AFAIK, mgmt. plane of JS SDK has the same requirement. |
eng/scripts/Verify-NeedToRelease.ps1
Outdated
|
||
if (!$changeLogEntry) | ||
{ | ||
Write-Host "Changelog does not existed for package: $PackageName, version: $($PackageProp.Version)." |
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.
Write-Host "Changelog does not existed for package: $PackageName, version: $($PackageProp.Version)." | |
Write-Host "Changelog does not exist for package: $PackageName, version: $($PackageProp.Version)." |
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.
I'm good with these changes I would like to get someone like @seankane-msft to also examine the changes.
Thanks @weshaggard . @benbp @seankane-msft Could you help to have a review? |
7a5d84f
to
a2132d3
Compare
jobs: | ||
- deployment: TagRepository | ||
displayName: "Create release tag" | ||
condition: and(succeeded(), eq(variables['NeedToRelease'], 'true'), ne(variables['Skip.TagRepository'], 'true')) |
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.
I suspect you need to get this value from the outputs similar to the other usage. Actually, do we need the condition here as well as on the stage? Perhaps this one can be removed.
I think this is likely the reason for the issue that @seankane-msft is seeing.
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.
Yes, this job condition is wrong and also redundant. I've removed it by this PR. Thanks @weshaggard @seankane-msft for your validation and correction.
As there are too many manual trigger works for SDK release, I added a release check stage before the release pipeline. The stage will check whether there is a new release and to trigger or skip release stage then.