Skip to content

Commit e036471

Browse files
WeltraumschafZero3141
authored andcommitted
#53 Update releasedoc to latest
Signed-off-by: Sven Strittmatter <sven.strittmatter@iteratec.com>
1 parent 24ec79a commit e036471

File tree

7 files changed

+40
-16
lines changed

7 files changed

+40
-16
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ To run a local build clone this repo and just invoke the following command in th
3636
mvn clean install
3737
```
3838

39+
## Release
40+
41+
The release process is [documented](docs/release.md) in a separate file.
42+
3943
## Supported DefectDojo Versions
4044

4145
The client is supposed to be compatible with DefectDojo 1.10 and later, older version of DefectDojo might still work, but are not officially supported.

docs/release.md

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,42 @@ Here we describe all the ceremonial stuff necessary to publish a Java library to
44

55
## How to Perform a Release
66

7-
The release process consists of one main tasks:
8-
9-
1. Build the release on GitHub
10-
11-
### Build the Release on GitHub
12-
13-
1. Go to the [release page](https://github.com/secureCodeBox/defectdojo-client-java/releases) and click "Draft a new release".
14-
2. Create a tag for the release (e.g. "1.0.0", for testing you can add a pre-release identifier like "1.0.0-alpha").
15-
1. Click "Choose tag".
16-
2. Type in tag name (e.g. "1.0.0").
17-
3. Click "Create new tag..."
18-
3. Click "Generate release notes"
19-
4. Select either
20-
- "Set as a pre-release" if you have a pre-release identifier in the version (e.g. "1.0.0-alpha").
21-
- or else "Set as the latest release"
22-
5. Click "Publish release"
7+
The whole release process is automated by a [GitHub action workflow](https://github.com/secureCodeBox/defectdojo-client-java/actions) which utilizes the [Maven release plugin](https://maven.apache.org/maven-release/maven-release-plugin/). Since we need the possibility to set custom versions (e.g. 2.0.0-beta) we can not use a simple one-push-button solution. Instead, we utilize en event triggered workflow to achieve this. The release process is as following:
8+
9+
First go to the "Actions" tab and select the "Publish Release" workflow:
10+
11+
![](release_01_select-workflow.png)
12+
13+
Then click the "Run workflow" button:
14+
15+
![](release_02_run-workflow.png)
16+
17+
For an ordinary release simply click the green "Run workflow" button and leave the optional text input fields blank:
18+
19+
![](release_03_trigger-workflow.png)
20+
21+
Now a "Publish Release" workflow run should appear in the list of runs:
22+
23+
![](release_04_running-workflow.png)
24+
25+
## Custom Release Version
26+
27+
Typically, a release by Maven simply means:
28+
29+
- Remove the "-SNAPSHOT" qualifier from the version in the `pom.xml`. E.g. "1.0.0-SNAPSHOT" will become "1.0.0".
30+
- Build everything, make a commit with this version and tag this version.
31+
- Upload the resulting artifacts to [Sonatype Nexus](https://oss.sonatype.org/) and stage them.
32+
- Increment to next development version in `pom.xml`. In this example "1.0.1-SNAPSHOT".
33+
- Build everything and make a commit.
34+
35+
In the case you want to publish a custom release, e.g. a "1.0.2-beta", it is necessary to pass it to Maven. For this purpose we introduced the two optional text inputs:
36+
37+
1. _Custom version_: Here you add the version with a custom qualifier. E.g. for the development version "1.0.2-SNAPSHOT" and a beta release, it is "1.0.2-beta".
38+
2. _Next development version_: Since Maven simply increments the last number of the semantic version and appends "-SNAPSHOT", automatic increment is not sufficient here because it will end in something like "1.0.2-beta-SNAPSHOT". So you must specify the next development version by hand. In this example still "1.0.2-SNAPSHOT".
39+
40+
![](release_05_custom-version.png)
41+
42+
### Additional Information About the Release Process
2343

2444
After the first release a [bot created the Maven Central sync][ossrh-jira-issue]:
2545

65.3 KB
Loading

docs/release_02_run-workflow.png

41.3 KB
Loading
25.5 KB
Loading
28.6 KB
Loading

docs/release_05_custom-version.png

27.2 KB
Loading

0 commit comments

Comments
 (0)