Skip to content

Commit af42116

Browse files
authored
[release-15.0] Tooling improvements backports (vitessio#12527)
* Block merge if the `Do Not Merge` label is set (vitessio#12489) * Block Merge if the label is set Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr> * fix echo syntax Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr> --------- Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr> * Improve release process post `v16.0.0 GA` code freeze (vitessio#12487) * Update the release instructions document with pre-requisites for release team Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr> * Add Do Not Merge to release Pull Request upon creation Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr> --------- Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr> * fix typo Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr> --------- Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
1 parent 92d2af2 commit af42116

File tree

2 files changed

+43
-15
lines changed

2 files changed

+43
-15
lines changed

.github/workflows/release_notes_label.yml

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,12 @@ jobs:
1414
runs-on: ubuntu-latest
1515
if: github.repository == 'vitessio/vitess'
1616
steps:
17-
- uses: mheap/github-action-required-labels@v1
18-
name: Check release notes label
19-
id: required_label
20-
env:
21-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22-
with:
23-
mode: exactly
24-
count: 0
25-
labels: "release notes (needs details)"
26-
27-
- name: Print helper
28-
if: failure() && steps.required_label.outcome == 'failure'
17+
- name: Release Notes label
2918
run: |
30-
echo The "release notes (needs details)" label is set. The changes made in this Pull Request need to be documented in the release notes summary "('./doc/releasenotes/15_0_0_summary.md')". Once documented, the "release notes (needs details)" label can be removed.
31-
exit 1
19+
if [[ "${{contains( github.event.pull_request.labels.*.name, 'release notes (needs details)')}}" == "true" ]]; then
20+
echo The "release notes (needs details)" label is set. The changes made in this Pull Request need to be documented in the release notes summary "('./doc/releasenotes/16_0_0_summary.md')". Once documented, the "release notes (needs details)" label can be removed.
21+
exit 1
22+
fi
3223
3324
- name: Check type and component labels
3425
env:
@@ -50,3 +41,32 @@ jobs:
5041
echo "Expecting PR to have label 'Type: ...'"
5142
exit 1
5243
fi
44+
45+
- name: Check NeedsWebsiteDocsUpdate and NeedsDescriptionUpdate are off
46+
env:
47+
PR_NUMBER: ${{ github.event.pull_request.number }}
48+
run: |
49+
LABELS_JSON="/tmp/labels.json"
50+
# Get labels for this pull request
51+
curl -s \
52+
-H 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
53+
-H "Accept: application/vnd.github.v3+json" \
54+
-H "Content-type: application/json" \
55+
"https://api.github.com/repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/labels" \
56+
> "$LABELS_JSON"
57+
if cat ${LABELS_JSON} | jq -r '.[].name ' | grep -q 'NeedsDescriptionUpdate' ; then
58+
echo "Expecting PR to not have the NeedsDescriptionUpdate label, please update the PR's description and remove the label."
59+
exit 1
60+
fi
61+
if cat ${LABELS_JSON} | jq -r '.[].name ' | grep -q 'NeedsWebsiteDocsUpdate' ; then
62+
echo "Expecting PR to not have the NeedsWebsiteDocsUpdate label, please update the documentation and remove the label."
63+
exit 1
64+
fi
65+
66+
67+
- name: Do Not Merge label
68+
run: |
69+
if [[ "${{contains( github.event.pull_request.labels.*.name, 'Do Not Merge')}}" == "true" ]]; then
70+
echo "This PR should not be merged. The 'Do Not Merge' label is set. Please unset it if you wish to merge this PR."
71+
exit 1
72+
fi

doc/internal/ReleaseInstructions.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,17 @@ Create the `settings.xml` in the `$HOME/.m2/` directory as described in their [i
118118

119119
## Release Cutover
120120

121-
In this section we describe our current release process. We begin with a short [**overview**](#overview).
121+
In this section we describe our current release process. We begin with a list of [**pre-requisites for the release team**](#pre-requisites) and with a short [**overview**](#overview).
122122
The release process is divided into three parts: [**Pre-Release**](#pre-release), [**Release**](#release), [**Post-Release**](#post-release), which are detailed after the overview.
123123

124+
### Pre-Requisites
125+
126+
This section highlights the different pre-requisites the release team has to meet before releasing.
127+
128+
- The tool `gh` must be installed locally and ready to be used.
129+
- You must have access to the Java release, more information in the [**Java Packages**](#java-packages) section.
130+
- You must be able to create branches and have admin right on the `vitessio/vitess` and `planetscale/vitess-operator` repositories.
131+
124132
### Overview
125133

126134
#### Schedule

0 commit comments

Comments
 (0)