Skip to content

Commit adc1a0e

Browse files
authored
Merge pull request #123 from git-for-windows/retire-the-azure-pipeline-trigger
Retire the Azure Pipeline trigger
2 parents 92e1d90 + 496cfb1 commit adc1a0e

File tree

4 files changed

+7
-192
lines changed

4 files changed

+7
-192
lines changed

GitForWindowsHelper/azure-pipelines.js

Lines changed: 0 additions & 187 deletions
This file was deleted.

GitForWindowsHelper/trigger-workflow-dispatch.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ const waitForWorkflowRun = async (context, owner, repo, workflow_id, after, toke
3636
}
3737

3838
const triggerWorkflowDispatch = async (context, token, owner, repo, workflow_id, ref, inputs) => {
39+
if ('true' === process.env.DO_NOT_TRIGGER_ANYTHING) {
40+
throw new Error(`Would have triggered workflow ${workflow_id} on ${owner}/${repo} with ref ${ref} and inputs ${JSON.stringify(inputs)}`)
41+
}
3942
const { headers: { date } } = await githubApiRequest(
4043
context,
4144
token,

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ For convenience, the command can be abbreviated as `/add relnote <type> <message
5555

5656
**Where can it be called?** In `git-for-windows/git`'s [Pull Requests](https://github.com/git-for-windows/git/pulls)
5757

58-
**What does it do?** This command starts [the `Git artifacts` Azure Pipeline](https://dev.azure.com/git-for-windows/git/_build?definitionId=34&_a=summary) that builds all of the artifacts of a full Git for Windows release: installer, Portable Git, MinGit, etc
58+
**What does it do?** This command starts [the `git-artifacts` workflow](https://github.com/git-for-windows/git-for-windows-automation/actions/workflows/git-artifacts.yml) that builds all of the artifacts of a full Git for Windows release: installer, Portable Git, MinGit, etc
5959

6060
### `/release`
6161

6262
**Where can it be called?** In `git-for-windows/git`'s [Pull Requests](https://github.com/git-for-windows/git/pulls)
6363

64-
**What does it do?** Call this command after a `/git-artifacts` command successfully produced the artifacts _and_ after the installer artifact has been validated manually, using [the "pre-flight checklist"](https://github.com/git-for-windows/build-extra/blob/HEAD/installer/checklist.txt). This will start [the Azure Release Pipeline](https://dev.azure.com/git-for-windows/git/_release?_a=releases&view=mine&definitionId=1) to publish the artifacts in a new GitHub Release.
64+
**What does it do?** Call this command after a `/git-artifacts` command successfully produced the artifacts _and_ after the installer artifact has been validated manually, using [the "pre-flight checklist"](https://github.com/git-for-windows/build-extra/blob/HEAD/installer/checklist.txt). This will start [the `release-git` workflow](https://github.com/git-for-windows/git-for-windows-automation/actions/workflows/release-git.yml) to publish the artifacts in a new GitHub Release.
6565

6666
## Spinning up Windows/ARM64 runners
6767

@@ -94,7 +94,6 @@ Then, configure [the `GITHUB_*` variables](#some-environment-variables) locally,
9494
"IsEncrypted": false,
9595
"Values": {
9696
"FUNCTIONS_WORKER_RUNTIME": "node",
97-
"AZURE_PIPELINE_TRIGGER_TOKEN": "<personal-access-token>",
9897
"AzureWebJobsStorage": "<storage-key>",
9998
"GITHUB_APP_ID": "<app-id>",
10099
"GITHUB_APP_CLIENT_ID": "<client-id>",
@@ -128,7 +127,7 @@ After the deployment succeeded, in the "Overview" tab, there is a "Get publish p
128127

129128
A few environment variables will have to be configured for use with the Azure Function. This can be done on the "Configuration" tab, which is in the "Settings" group.
130129

131-
Concretely, the environment variables `AZURE_PIPELINE_TRIGGER_TOKEN`, `GITHUB_WEBHOOK_SECRET`, `GITHUB_APP_PRIVATE_KEY`, `GITHUB_APP_CLIENT_SECRET`, `GITHUB_APP_CLIENT_ID` and `GITHUB_APP_ID` need to be set. For the first, a generated random string was used. The private key, client secret and ID of the GitHub App are not known at this time, though, therefore they will have to be set in the Azure Function Configuration later.
130+
Concretely, the environment variables `GITHUB_WEBHOOK_SECRET`, `GITHUB_APP_PRIVATE_KEY`, `GITHUB_APP_CLIENT_SECRET`, `GITHUB_APP_CLIENT_ID` and `GITHUB_APP_ID` need to be set. For the first, a generated random string was used. The private key, client secret and ID of the GitHub App are not known at this time, though, therefore they will have to be set in the Azure Function Configuration later.
132131

133132
### The repository
134133

test-pr-comment-delivery.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969

7070
// avoid accidentally triggering anything
7171
delete process.env.GITHUB_APP_PRIVATE_KEY
72-
delete process.env.AZURE_PIPELINE_TRIGGER_TOKEN
72+
process.env.DO_NOT_TRIGGER_ANYTHING = 'true'
7373

7474
const index = require('./GitForWindowsHelper/index')
7575
console.log(await index(context, req) || context.res)

0 commit comments

Comments
 (0)