Switch /git-artifacts and /release to trigger GitHub workflows instead#29
Conversation
This functionality is used already for the `/deploy` command, and we are about to need it also in the `/git-artifacts` and `/release` commands. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
| commitSHA, | ||
| workflowName | ||
| ) | ||
| const succeeded = runs.filter(run => run.status === 'completed' && run.conclusion === 'success') |
There was a problem hiding this comment.
Could we encounter check runs that aren't completed at this point and unintentionally dispatch two parallel workflow runs for the same artifacts?
There was a problem hiding this comment.
Hmm. You mean two parallel tag-git workflow runs, or two parallel git-artifacts-<architecture> runs for the same architecture?
There was a problem hiding this comment.
In either case, that's possible, but unlikely. And hard to fend against...
There was a problem hiding this comment.
I mean that we have a running git-artifacts run for for that architecture and we encounter that non-completed check run here and launch a second git-artifacts run. But I guess it is very unlikely.
There was a problem hiding this comment.
Oh right. But then the running workflow would not be based on the most recent tag-git run...
I guess that a valid concern is that a previously successful git-artifacts run would block a new one based on a newer tag-git run. Hrm. Maybe I do have to encode the tag-git run ID in the git-artifacts' summaries and then match those...
This is _very_ convenient: just select the "Debug" panel on the left side of the VS Code window, select the `Debug Tests` in the drop-down box at the top of said panel, set breakpoints at your heart's extent and start debugging interactively, with the ability to inspect local variables and single-stepping. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
c02c8a0 to
dd111c2
Compare
…git` run This commit is part of Git for Windows' transition off of Azure Pipelines onto GitHub workflows. One thing that was changed during that transition is that the tasks were split up into several workflow runs instead of having one ginormous `Git Artifacts` Pipeline that does everything from tagging the Git version to building the Pacman packages in matrix builds, to building the installers/portable Gits/MinGits/etc in another set of matrix builds, to generating the release notes as well as the announcement mail. Now, the Git version is tagged in the `tag-git` workflow, and that workflow also generates the release notes and announcement mail template (the SHA-256s of the generated artifacts are part of both, therefore the final version can only be constructed once those artifacts are available). Once the `tag-git` workflow has run successfully, the `git-artifacts` workflow needs to be started multiple times, once per supported architecture (currently x86_64 and i686, hopefully soon also aarch64). This commit teaches GitForWindowsHelper to do that by reacting when a `tag-git` run completed, triggering the `git-artifacts` runs. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
With this commit, a `/git-artifacts` command will no longer trigger the `Git Artifacts` Azure Pipeline but instead the `tag-git` GitHub workflow. This relies on the previous commit which teaches the GitForWindows GitHub App to react to a completed `tag-git` run by triggering the corresponding `git-artifacts` runs. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This concludes the transition of Git for Windows' release process off of Azure Pipelines onto GitHub workflows. The added code is a bit more verbose than the previous one because we have to do all the hard work of maintaining the Check Run in the git-for-windows/git PR manually. This is actually a net improvement over the previous situation, where there was _no_ update in that PR whatsoever as to the current state of the release. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
We only need to trigger a new `tag-git` run if there is no existing, successful one yet. If there _is_ one, we can trigger the `git-artifacts` runs right away. This commit is best viewed with `--color-moved --color-moved-ws=allow-indentation-change`. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
It is not just any old Check Run that we need here, it is a `tag-git` Check Run. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dd111c2 to
9aeb564
Compare
|
Full disclosure: these commits were needed after merging this to release Git for Windows v2.40.0-rc2: bc586a4...961ebdb |
Git for Windows has been using GitHub workflows instead, ever since #29 was merged. Therefore, the code to trigger Azure Pipelines has not been in use for almost two years. It's time to retire it. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This is the companion to git-for-windows/git-for-windows-automation#38 that concludes Git for Windows' release process' journey off of Azure Pipelines.
With this PR, the
/git-artifactscommand triggers atag-gitworkflow run, upon whose mirrored Check Run's conclusion thegit-artifactsruns are triggered. And the/releasepicks up those runs and triggers therelease-gitworkflow run.I intend to verify the correctness of this PR (and to fix whatever is necessary) with
-rc2which is supposed to be released today.