|
1 | 1 | # Maintainer Notes |
2 | 2 |
|
3 | | -## Update Dependency Versions |
| 3 | +Shell scripts to build and release are located int the `tools` directory. |
4 | 4 |
|
5 | | -Use the [Versions Maven Plugin](https://www.mojohaus.org/versions-maven-plugin/index.html). Rules are configured in `version-rules.xml`. |
| 5 | +## Build a pre-release |
| 6 | +___ |
6 | 7 |
|
| 8 | +**Pre-release builds are not source controlled (no branch, no tag)** |
| 9 | + |
| 10 | +Command |
| 11 | + |
| 12 | +```shell |
| 13 | +./tools/build-and-copy.sh <version> <destination directory> |
7 | 14 | ``` |
8 | | -./mvnw versions:use-next-releases |
| 15 | + |
| 16 | +Example |
| 17 | + |
| 18 | +```shell |
| 19 | +./tools/build-and-copy.sh 0.20.0-ALPHA-1 "/tmp/" |
9 | 20 | ``` |
10 | 21 |
|
11 | | -## Release |
| 22 | +The jars will be located in `/tmp` |
| 23 | + |
| 24 | +## Build and stage |
| 25 | +___ |
| 26 | + |
| 27 | +Release builds are source controlled. |
12 | 28 |
|
| 29 | +- Creates a `release-<version>` branch |
| 30 | +- Creates a `<version>` tag |
| 31 | +- Pushes the branch and tag to GitHub |
| 32 | +- Stages the release to Maven Central |
| 33 | + |
| 34 | +### Step 1 |
| 35 | + |
| 36 | +Command |
| 37 | + |
| 38 | +```shell |
| 39 | +./tools/build-and-stage.sh <version> |
13 | 40 | ``` |
14 | | -./mvnw release:prepare -DreleaseVersion=0.18.0 -DdevelopmentVersion=0.18.1-SNAPSHOT |
15 | | -./mvnw release:perform -DreleaseVersion=0.18.0 -DdevelopmentVersion=0.18.1-SNAPSHOT |
| 41 | + |
| 42 | +Example |
| 43 | + |
| 44 | +```shell |
| 45 | +./tools/build-and-stage.sh 0.20.0 |
16 | 46 | ``` |
17 | 47 |
|
18 | | -`release:prepare` does Github tags and commits, while `release:perform` signs the artifacts and uploads them to the staging repositoring on [https://oss.sonatype.org](https://oss.sonatype.org). |
| 48 | +### Step 2 |
19 | 49 |
|
20 | | -Download the artifacts from the staging repository [https://oss.sonatype.org/#stagingRepositories](https://oss.sonatype.org/#stagingRepositories) and verify them manually: |
| 50 | +Download the staged artifacts from Maven Central and run the integration test suite. |
21 | 51 |
|
22 | | -```sh |
23 | | -# agent |
24 | | -/usr/lib/jvm/java-8-openjdk/bin/java -javaagent:/home/fabian/Downloads/jmx_prometheus_javaagent-0.18.0.jar=12345:./integration_tests/smoke_tests/src/request/resources/config.yml -jar integration_tests/jmx_example_application/target/jmx_example_application.jar |
25 | | -/usr/lib/jvm/java-11-openjdk/bin/java -javaagent:/home/fabian/Downloads/jmx_prometheus_javaagent-0.18.0.jar=12345:./integration_tests/smoke_tests/src/request/resources/config.yml -jar integration_tests/jmx_example_application/target/jmx_example_application.jar |
26 | | -/usr/lib/jvm/java-17-openjdk/bin/java -javaagent:/home/fabian/Downloads/jmx_prometheus_javaagent-0.18.0.jar=12345:./integration_tests/smoke_tests/src/request/resources/config.yml -jar integration_tests/jmx_example_application/target/jmx_example_application.jar |
| 52 | +Example |
27 | 53 |
|
28 | | -# standalone |
29 | | -java -Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -jar integration_tests/jmx_example_application/target/jmx_example_application.jar |
| 54 | +```shell |
| 55 | +/home/dhoard/Downloads/jmx_prometheus_javaagent-0.20.0.jar |
| 56 | +/home/dhoard/Downloads/jmx_prometheus_httpserver-0.20.0.jar |
| 57 | +``` |
| 58 | + |
| 59 | +Command |
| 60 | + |
| 61 | +```shell |
| 62 | +./tools/patch-and-run-integration-test-suite.sh <javaagent.jar> <httpserver.jar> |
| 63 | +``` |
| 64 | + |
| 65 | +Example |
30 | 66 |
|
31 | | -/usr/lib/jvm/java-8-openjdk/bin/java -jar ~/Downloads/jmx_prometheus_httpserver-0.18.0.jar 9000 ./integration_tests/smoke_tests/src/request/resources/config-httpserver.yml |
32 | | -/usr/lib/jvm/java-11-openjdk/bin/java -jar ~/Downloads/jmx_prometheus_httpserver-0.18.0.jar 9000 ./integration_tests/smoke_tests/src/request/resources/config-httpserver.yml |
33 | | -/usr/lib/jvm/java-17-openjdk/bin/java -jar ~/Downloads/jmx_prometheus_httpserver-0.18.0.jar 9000 ./integration_tests/smoke_tests/src/request/resources/config-httpserver.yml |
| 67 | +```shell |
| 68 | +./tools/patch-and-run-integration-test-suite.sh /home/dhoard/Downloads/jmx_prometheus_javaagent-0.20.0.jar /home/dhoard/Downloads/jmx_prometheus_httpserver-0.20.0.jar |
34 | 69 | ``` |
35 | 70 |
|
36 | | -If everything looks good, click `Close` to trigger Sonatype's verification, then click `Release`. |
| 71 | +### Step 3 |
| 72 | + |
| 73 | +If the integration test suite in Step 2 passes, on Maven Central... |
| 74 | + |
| 75 | +- Click `Close` to trigger Sonatype's verification |
| 76 | +- Once closed, click `Release` |
| 77 | + |
| 78 | + |
| 79 | +### Step 4 |
| 80 | + |
| 81 | +Verify the files are available via Maven Central (Maven) |
| 82 | + |
| 83 | +Create a GitHub release |
0 commit comments