-
Notifications
You must be signed in to change notification settings - Fork 21
Adjust Github Release Pipeline #7
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
Conversation
jimson-msft
commented
Mar 2, 2021
- Publish the release version of all our components as release assets.
- Add new pipeline variables for specifying TargetCommit, previously this pipeline would use the current commit that the build was run off of.
|
|
||
| pool: dotestlab | ||
|
|
||
| variables: |
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.
variables [](start = 0, length = 9)
Can we add a variable to allow us to test the pipeline without actually performing a release? Like a dry run that does everything except the last stage. Instead of the last stage, maybe we can just recursively list everything available in the artifact directory as the final step. #Closed
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.
Yeah I've added it as a parameter so the pipeline UI reflects it in a toggle checkbox
In reply to: 585962244 [](ancestors = 585962244)
| gitHubConnection: 'client2' | ||
| repositoryName: 'microsoft/do-client' | ||
| action: 'create' | ||
| assets: '$(Build.ArtifactStagingDirectory)/**/*-release/*' |
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.
- [](start = 64, length = 1)
Consider specifying *.deb. That is the only asset we intend to publish, yes? #Closed
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.
|
For the source code archives, how was it using the do-client-0.6.0 name for the zip/gz files? Can we make it use the standard Source Code.zip/.gz filenames? #Resolved |
| jobs: | ||
| - job: deliveryoptimization_agent | ||
| steps: | ||
| - template: ../build/templates/doclient-lite-native-steps.yml |
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.
Building all components in the pipeline. Sweet! #Closed
|
The debian packages were named as artifacts.tar.gz which was fine but I see that we are no longer archiving this. I was talking about the source code archive. In reply to: 789339068 [](ancestors = 789339068,789292145) |
| - name: SkipPublishing | ||
| displayName: Build only (skip release stage) | ||
| type: boolean | ||
| default: false |
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.
false [](start = 13, length = 5)
I'd keep default as true to avoid publishing accidentally. We want this pipeline to be a fully thought out execution. #Closed
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.
Well, I'd expect running this pipeline at all to be with the intention of publishing. So this pipeline does two things:
Stage 1: Builds release versions of all our components for all platforms we support
Stage 2: Publishes
Do we see the use case of this pipeline being more for publishing or for validating a build of all our release pipelines? I imagine we won't be using this pipeline too regularly as a 'master' build of all our components, but rather as a 'we are ready to release'. We already have CI via our pipelines running on every check-in on the main branch.
In reply to: 586658460 [](ancestors = 586658460)
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.
Okay, can you remove the default in that case? I'd like it to be explicitly chosen when kicking off the pipeline.
In reply to: 586683419 [](ancestors = 586683419,586658460)
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.
| changeLogCompareToReleaseTag: 'ms-do-client-$(release.previous_version)' | ||
| changeLogType: 'commitBased' | ||
| - stage: release | ||
| condition: and(succeeded(), eq('${{parameters.SkipPublishing}}', false)) |
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.
condition [](start = 2, length = 9)
When SkipPublishing is true, consider listing out, just to the pipeline log output, the artifacts that will be included in the release and things like tag and title. Is there a way to output the change log as well? #Closed
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.
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.
We can definitely print the artifacts to be published, release name and tag/title, but not a good way to output change log.
One hacky way of achieving the above and to print out the change log would be to publish a release, then immediately delete the release in a subsequent task if SkipPublishing is set to true.
In reply to: 586685709 [](ancestors = 586685709,586662450)
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.
Ok, in that case, print everything except the change log. I don't want to actually publish to github because (I think) it might trigger emails if someone is following our repo.
In reply to: 589764290 [](ancestors = 589764290,586685709,586662450)
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've added a task under release to do this, and made the actual github release task the conditional one.
Do note that all that information is available anyways through the azure pipeline display -> all variables can be found as well as contents to be published, but the added task should make it explicit.
In reply to: 589767276 [](ancestors = 589767276,589764290,586685709,586662450)
|
Mind holding off on merging this until we have that meeting with Shiyi and team? I want all of us to understand how new changes are going to be consumed going forward. #Resolved |
|
Sure, I'll leave it open until then In reply to: 789949112 [](ancestors = 789949112) |
|
I'm not sure it's standard to rename the source code archive (taking a look at iotedge for example) In reply to: 789944699 [](ancestors = 789944699,789339068,789292145) |
|
I think they understand that snapping to a tag is the way forward. Feel free to check in once signed off. In reply to: 789965440 [](ancestors = 789965440,789949112) |
| echo Tag used to generate changelog: $(Release.PreviousVersion) | ||
| echo directory to be published: $(Build.ArtifactStagingDirectory) | ||
| echo Content to be published: | ||
| echo ls -l $(Build.ArtifactStagingDirectory) |
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.
echo [](start = 12, length = 4)
echo not needed or ls command right? We need the output from ls itself. #Closed
| - task: DownloadBuildArtifacts@0 | ||
| inputs: | ||
| buildType: 'current' | ||
| downloadType: 'specific' |
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.
specific [](start = 23, length = 8)
Did you intend to specify an itemPattern to download only .deb files?
My suggestion would be to download all artifacts so that we can do things like calculate and publish hashes of each artifact (later). #Resolved
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.
No, the default here is single.
The only other option is 'specific'
https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/download-build-artifacts?view=azure-devops
I intend to download all artifacts, my guess was 'single' was not the right option to do so.
We'll see when the current build completes whether or not 'specific' downloads all artifacts. #Resolved
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.
shishirb-MSFT
left a comment
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.
![]()