Skip to content

Commit 3ba16bd

Browse files
authored
Merge pull request #1010 from mastastny/enhance_build_md
Enhance BUILD.md with release process details
2 parents 3de82d5 + 807dcde commit 3ba16bd

1 file changed

Lines changed: 43 additions & 9 deletions

File tree

doc/BUILD.md

Lines changed: 43 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,38 @@
33
Build process is now covered in series of independent github actions. Here is
44
brief but comprehensive guide to create new build using these actions.
55

6+
## Version format
7+
8+
Version consists of four parts separated by dots:
9+
10+
```
11+
{MAJOR}.{MINOR}.{PATCH}.{REVISION}rc{RCVERSION}
12+
```
13+
14+
Example: `2.14.0.1rc1`
15+
616
## 1. Pull request for release candidate
717

18+
**TL;DR**: Just run the `dispatch_1_rc_pullrequest` action with no parameters.
19+
Only provide the version parameter if you need to bump the MAJOR or MINOR version.
20+
821
First step is creating pull request for new version. In this pull request
922
Pipefile.lock is frozen (and released again in next commit) and VERSION number
1023
is increased.
1124

1225
Pull request can and should be created with `dispatch_1_rc_pullrequest` github
13-
action. It has one parameter that should be kept empty usually. Only in case
14-
that the version should be increased (should be aligned with 3scale) the
15-
version should be defined in X.Y.Z form, e.g. 2.14.0, 2.13.1 etc.
26+
action. It accepts an optional version parameter.
27+
28+
### Version parameter behavior
29+
30+
**Custom version provided** (dot-separated numbers, e.g. `2.14` or `2.14.0`):
31+
- If exactly two numbers are given (e.g. `2.14`), PATCH is automatically set to `0`, resulting in `2.14.0`.
32+
- There is no limit on the number of parts otherwise.
33+
- The action searches existing git tags to find the next available REVISION for that version, and sets RCVERSION to the lowest unused value (numbering starts at `1`).
34+
35+
**No version provided**:
36+
- Version is read from the `VERSION` file (first three fields: MAJOR.MINOR.PATCH).
37+
- REVISION is determined as the highest existing value found in git tags.
1638

1739
RC pull request is created by this action. PR should go through standard
1840
review process, it always contains 2 commits, first with version increase and
@@ -24,12 +46,22 @@ After the review the PR should be merged.
2446

2547
## 2. Create pre-release
2648

27-
This is done automatically for first release 'rc1'. For next rc builds (rc2,
28-
rc3, ...) automation does not work and the release must be created manually
29-
(meaning standard github release)
49+
This is done automatically for the first release candidate (`rc1`). For
50+
subsequent rc builds (`rc2`, `rc3`, ...) automation does not work and the
51+
release must be created manually on GitHub.
52+
53+
### Manual pre-release
54+
55+
Manual pre-release can be done via this command:
56+
57+
```bash
58+
git log --no-merges --pretty=oneline \
59+
| grep 'v[0-9.]*rc[0-9]*' \
60+
| head -1 \
61+
| (read COMMIT MSG; echo gh release create "v${MSG##*-v}" -p --generate-notes --target $COMMIT)
62+
```
63+
It finds the most recent ```rc``` commit and generates a pre-release from it.
3064

31-
When manual, the release must be created from correct commit **not** from HEAD,
32-
that commit is named by the rc version and it must be pre-release.
3365

3466
## 3. Build & Push
3567

@@ -48,7 +80,9 @@ should be used. One possible method to test it is this:
4880
`pull=1` is important, also version in the output of the tests should be
4981
verified.
5082

51-
'smoke' is minimum that should be executed to verify the image
83+
'smoke' is minimum that should be executed to verify the image.
84+
85+
Alternatively, you can run the Jenkins pipeline with the new RC image from quay.io.
5286

5387
## 5. Release & Push
5488

0 commit comments

Comments
 (0)