Skip to content

Automate entire release process #1528

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

Merged
merged 5 commits into from
Jul 22, 2021
Merged

Conversation

andyleejordan
Copy link
Member

@andyleejordan andyleejordan commented Jul 22, 2021

This PR sets up the final parts necessary for the Azure DevOps release pipeline to create a (draft) GitHub Release with the built assets directly uploaded from the pipeline itself. This eliminates any developer machine touching the bits between build, sign, and release. There is a manual approval step in the deployment such that the draft release is not created until a Microsoft maintainer approves it. It also includes a few cleanups (such as moving from "build artifacts" to "pipeline artifacts"). It was tested up to the point that the GitHub API complained the release branch didn't exist, which since I wasn't testing off a release branch, was accurate.

@andyleejordan andyleejordan added Issue-Enhancement A feature request (enhancement). Area-Build & Release labels Jul 22, 2021
@andyleejordan andyleejordan requested a review from rjmholt July 22, 2021 05:27
@andyleejordan andyleejordan force-pushed the andschwa/automated-pipeline branch from c35389b to bfef3e8 Compare July 22, 2021 05:32
@andyleejordan
Copy link
Member Author

I've temporarily restored the release/v2.4.6 for one more test to see if the draft release is created and the artifact is uploaded 🤞

@andyleejordan andyleejordan force-pushed the andschwa/automated-pipeline branch from bfef3e8 to a590493 Compare July 22, 2021 06:10
@andyleejordan
Copy link
Member Author

@andyleejordan
Copy link
Member Author

Oops, I have to fix something.

This splits the release into three stages: build, sign, and publish. The
last stage requires a manual approval on its deployment job's associated
environment. When approved, it creates a draft GitHub release using our
ReleaseTools module and securely uploads the artifacts directly from the
build agent, thus taking developer machines out of the release process.
@andyleejordan andyleejordan force-pushed the andschwa/automated-pipeline branch 2 times, most recently from 6649bc5 to 4c02284 Compare July 22, 2021 17:26
@andyleejordan
Copy link
Member Author

Just double-checking those new changes didn't break the release build...

Also move the creation of said artifacts into Azure DevOps templates
themselves, instead of in the build system. Finally, download only the
signed pipeline artifacts in the deployment, which by default downloads
all artifacts.
It leads to bugs I cannot solve.
- Use proper `parameters` syntax
- Use cleaner indentation
- Add decent display names
- Remove setting build name for non-PR builds
- Remove unused NUnit test results
@andyleejordan andyleejordan force-pushed the andschwa/automated-pipeline branch from 4c02284 to 85eae62 Compare July 22, 2021 17:51
@andyleejordan
Copy link
Member Author

Ok, that's it! It all works.

@andyleejordan andyleejordan enabled auto-merge July 22, 2021 18:31
jobs:
- job: Build
pool:
vmImage: vs2017-win2016
Copy link
Contributor

Choose a reason for hiding this comment

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

I could have sworn there was a newer one than this

Copy link
Member Author

Choose a reason for hiding this comment

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

There is, actually. Another time.

@andyleejordan andyleejordan merged commit 34bdaf5 into master Jul 22, 2021
@andyleejordan andyleejordan deleted the andschwa/automated-pipeline branch July 22, 2021 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Build & Release Issue-Enhancement A feature request (enhancement).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants