Skip to content

Commit 709dfef

Browse files
authored
Only publish toolkit to Maven Central, add unified release script (#805)
- Set maven.deploy.skip=true by default, override to false only in。apm-application-toolkit. Agent and plugins are distributed via download package and Docker images, not Maven Central. - Add tools/releasing/release.sh with two-step release flow: prepare-vote (preflight + prepare + stage + upload + vote email) vote-passed (promote + docker + announce email + cleanup). - Remove create_release.sh (logic merged into release.sh stage). - Update release-java-agent.md documentation.
1 parent e732a32 commit 709dfef

File tree

6 files changed

+692
-305
lines changed

6 files changed

+692
-305
lines changed

CHANGES.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ Release Notes.
2121
* Enhance test/plugin/run.sh to support extra Maven properties per version in support-version.list (format: version,key=value).
2222
* Add MariaDB 3.x plugin (all classes renamed in 3.x).
2323
* Extend Jedis 4.x plugin to support Jedis 5.x (fix witness method for 5.x compatibility).
24-
* Add Elasticsearch Java client (co.elastic.clients:elasticsearch-java) plugin for 7.x-9.x.
24+
* Add Elasticsearch Java client (co.elastic.clients:elasticsearch-java) plugin for 7.16.x-9.x.
25+
* Only publish `apm-application-toolkit` modules to Maven Central. Agent and plugins are distributed via download package and Docker images.
26+
* Add unified release script (`tools/releasing/release.sh`) with two-step flow: `prepare-vote` and `vote-passed`.
2527

2628
All issues and pull requests are [here](https://github.com/apache/skywalking/milestone/249?closed=1)
2729

apm-application-toolkit/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
<artifactId>apm-application-toolkit</artifactId>
2727
<packaging>pom</packaging>
2828

29+
<properties>
30+
<!-- Toolkit modules are the only artifacts published to Maven Central -->
31+
<maven.deploy.skip>false</maven.deploy.skip>
32+
</properties>
33+
2934
<modules>
3035
<module>apm-toolkit-log4j-1.x</module>
3136
<module>apm-toolkit-log4j-2.x</module>

docs/en/contribution/release-java-agent.md

Lines changed: 34 additions & 220 deletions
Original file line numberDiff line numberDiff line change
@@ -36,151 +36,47 @@ If you are a committer, use your Apache ID and password to log in this svn, and
3636
1. Upload your GPG public key to the public GPG site, such as [MIT's site](http://pgp.mit.edu:11371/). This site should be in the
3737
Apache maven staging repository checklist.
3838

39-
## Test your settings
40-
This step is only for testing purpose. If your env is correctly set, you don't need to check every time.
41-
```
42-
./mvnw clean install(this will build artifacts, sources and sign)
43-
```
44-
45-
## Prepare for the release
46-
```
47-
./mvnw release:clean
48-
./mvnw release:prepare -DautoVersionSubmodules=true -Pall
49-
```
50-
51-
- Set version number as x.y.z, and tag as **v**x.y.z (The version tag must start with **v**. You will find out why this is necessary in the next step.)
52-
53-
_You could do a GPG signature before preparing for the release. If you need to input the password to sign, and the maven doesn't provide you with the opportunity to do so, this may lead to failure of the release. To resolve this, you may run `gpg --sign xxx` in any file. This will allow it to remember the password for long enough to prepare for the release._
54-
55-
## Stage the release
56-
```
57-
./mvnw release:perform -DskipTests -Pall
58-
```
39+
## Release using the release script
5940

60-
- The release will be automatically inserted into a temporary staging repository.
41+
The release script `tools/releasing/release.sh` automates the full release workflow. The release is a **two-step process** with a vote in between.
6142

62-
## Build and sign the source code and binary package
43+
### Quick start
6344
```shell
64-
export RELEASE_VERSION=x.y.z (example: RELEASE_VERSION=5.0.0-alpha)
65-
cd tools/releasing
66-
bash create_release.sh
67-
```
68-
69-
This script takes care of the following things:
70-
1. Use `v` + `RELEASE_VERSION` as tag to clone the codes.
71-
2. Complete `git submodule init/update`.
72-
3. Exclude all unnecessary files in the target source tar, such as `.git`, `.github`, and `.gitmodules`. See the script for more details.
73-
4. Execute `gpg` and `shasum 512` for source code tar.
74-
5. Use maven package to build the agent tar.
75-
6. Execute `gpg` and `shasum 512` for binary tar.
76-
77-
`apache-skywalking-java-agent-x.y.z-src.tgz` and files ending with `.asc` and `.sha512` may be found in the `tools/releasing` folder.
78-
`apache-skywalking-java-agent-x.y.z.tgz` and files ending with `.asc` and `.sha512` may be found in the `tools/releasing/apache-skywalking-java-agent-x.y.z` folder.
79-
80-
81-
## Upload to Apache svn
82-
1. Use your Apache ID to log in to `https://dist.apache.org/repos/dist/dev/skywalking/java-agent/`.
83-
1. Create a folder and name it by the release version and round, such as: `x.y.z`
84-
1. Upload the source code package to the folder with files ending with `.asc` and `.sha512`.
85-
1. Upload the distribution package to the folder with files ending with `.asc` and `.sha512`.
45+
# Step 1: Build, stage, upload, and generate vote email
46+
./tools/releasing/release.sh prepare-vote x.y.z
8647

87-
## Make the internal announcements
88-
Send an announcement mail in dev mail list.
48+
# (send vote email to dev@skywalking.apache.org, wait 72h for vote to pass)
8949

50+
# Step 2: Promote, push Docker images, generate announce email, and clean up
51+
./tools/releasing/release.sh vote-passed [old_version_to_remove]
9052
```
91-
Mail title: [ANNOUNCE] SkyWalking Java Agent x.y.z test build available
92-
93-
Mail content:
94-
The test build of Java Agent x.y.z is available.
95-
96-
We welcome any comments you may have, and will take all feedback into
97-
account if a quality vote is called for this build.
98-
99-
Release notes:
100-
101-
* https://github.com/apache/skywalking-java/blob/master/changes/changes-x.y.z.md
10253

103-
Release Candidate:
54+
Run `./tools/releasing/release.sh` without arguments to see all available commands, including individual steps if you need to run them separately.
10455

105-
* https://dist.apache.org/repos/dist/dev/skywalking/java-agent/xxxx
106-
* sha512 checksums
56+
### Pre-flight checks
57+
Before starting, the script verifies:
58+
- Required tools are installed (git, gpg, svn, shasum, mvn, java, tar, gh)
59+
- GPG signing works **without password prompt** (critical for maven release)
60+
- Maven settings contain Apache server credentials
61+
- Git working tree is clean
10762

108-
Maven 2 staging repository:
109-
110-
* https://repository.apache.org/content/repositories/xxxx/org/apache/skywalking-java/
111-
112-
Release Tag :
113-
114-
* (Git Tag) x.y.z
115-
116-
Release CommitID :
117-
118-
* https://github.com/apache/skywalking-java/tree/(Git Commit ID)
119-
* Git submodule
120-
* apm-protocol/apm-network/src/main/proto: https://github.com/apache/skywalking-data-collect-protocol/tree/(Git Commit ID)
121-
122-
Keys to verify the Release Candidate :
123-
124-
* https://dist.apache.org/repos/dist/release/skywalking/KEYS
125-
126-
Guide to build the release from source :
127-
128-
> ./mvnw clean package
129-
130-
A vote regarding the quality of this test build will be initiated
131-
within the next couple of days.
63+
If GPG signing fails, configure gpg-agent to cache the passphrase:
13264
```
133-
134-
## Wait for at least 48 hours for test responses
135-
Any PMC member, committer or contributor can test the release features and provide feedback.
136-
Based on that, the PMC will decide whether to start the voting process.
137-
138-
## Call a vote in dev
139-
Call a vote in `dev@skywalking.apache.org`
140-
65+
# ~/.gnupg/gpg-agent.conf
66+
default-cache-ttl 86400
67+
max-cache-ttl 86400
14168
```
142-
Mail title: [VOTE] Release Apache SkyWalking Java Agent version x.y.z
143-
144-
Mail content:
145-
Hi All,
146-
This is a call for vote to release Apache SkyWalking Java Agent version x.y.z.
147-
148-
Release notes:
149-
150-
* https://github.com/apache/skywalking-java/blob/master/changes/changes-x.y.z.md
151-
152-
Release Candidate:
153-
154-
* https://dist.apache.org/repos/dist/dev/skywalking/java-agent/xxxx
155-
* sha512 checksums
156-
157-
Maven 2 staging repository:
69+
Then run `gpgconf --kill gpg-agent` and `gpg --sign /dev/null` to cache it.
15870

159-
* https://repository.apache.org/content/repositories/xxxx/org/apache/skywalking/
71+
### prepare-vote
72+
`prepare-vote` runs the following steps in sequence:
73+
1. **preflight** — verify tools and environment
74+
2. **prepare** — create `release/x.y.z` branch, run `mvn release:prepare` (creates tag `vx.y.z` with full CHANGES.md), then archive changelog and reset for next version, push branch and tag, create PR
75+
3. **stage** — run `mvn release:perform`, build source and binary tars with GPG signatures and sha512 checksums
76+
4. **upload** — upload to Apache SVN `dist/dev` (prompts for SVN credentials)
77+
5. **email vote** — print vote email template with pre-filled version, commit ID, submodule commit, and checksums
16078

161-
Release Tag :
162-
163-
* (Git Tag) x.y.z
164-
165-
Release CommitID :
166-
167-
* https://github.com/apache/skywalking-java/tree/(Git Commit ID)
168-
* Git submodule
169-
* apm-protocol/apm-network/src/main/proto: https://github.com/apache/skywalking-data-collect-protocol/tree/(Git Commit ID)
170-
171-
Keys to verify the Release Candidate :
172-
173-
* https://dist.apache.org/repos/dist/release/skywalking/KEYS
174-
175-
Guide to build the release from source :
176-
177-
> ./mvnw clean package
178-
179-
Voting will start now (xxxx date) and will remain open for at least 72 hours, Request all PMC members to give their vote.
180-
[ ] +1 Release this package.
181-
[ ] +0 No opinion.
182-
[ ] -1 Do not release this package because....
183-
```
79+
Copy the generated email and send it to `dev@skywalking.apache.org`. Voting remains open for at least 72 hours. At least 3 (+1 binding) PMC votes with more +1 than -1 are required.
18480

18581
## Vote Check
18682
All PMC members and committers should check these before casting +1 votes.
@@ -195,91 +91,9 @@ are found in `https://dist.apache.org/repos/dist/dev/skywalking/java-agent/x.y.z
19591
1. Build a distribution package from the source code package (`apache-skywalking-java-agent-x.y.z-src.tar.gz`).
19692
1. Check the Apache License Header. Run `docker run --rm -v $(pwd):/github/workspace apache/skywalking-eyes header check`. (No binaries in source codes)
19793

198-
199-
The voting process is as follows:
200-
1. All PMC member votes are +1 binding, and all other votes are +1 but non-binding.
201-
1. If you obtain at least 3 (+1 binding) votes with more +1 than -1 votes within 72 hours, the release will be approved.
202-
203-
204-
## Publish the release
205-
1. Move source codes tar and distribution packages to `https://dist.apache.org/repos/dist/release/skywalking/java-agent/`.
206-
```
207-
> export SVN_EDITOR=vim
208-
> svn mv https://dist.apache.org/repos/dist/dev/skywalking/java-agent/x.y.z https://dist.apache.org/repos/dist/release/skywalking/java-agent
209-
....
210-
enter your apache password
211-
....
212-
213-
```
214-
2. Release in the nexus staging repo.
215-
3. Public download source and distribution tar/zip are located in `http://www.apache.org/dyn/closer.cgi/skywalking/java-agent/x.y.z/xxx`.
216-
The Apache mirror path is the only release information that we publish.
217-
4. Public asc and sha512 are located in `https://www.apache.org/dist/skywalking/java-agent/x.y.z/xxx`.
218-
5. Public KEYS point to `https://www.apache.org/dist/skywalking/KEYS`.
219-
6. Update the website download page. http://skywalking.apache.org/downloads/ . Add a new download source, distribution, sha512, asc, and document
220-
links. The links can be found following rules (3) to (6) above.
221-
7. Add a release event on the website homepage and event page. Announce the public release with changelog or key features.
222-
8. Send ANNOUNCE email to `dev@skywalking.apache.org`, `announce@apache.org`. The sender should use the Apache email account.
223-
```
224-
Mail title: [ANNOUNCE] Apache SkyWalking Java Agent x.y.z released
225-
226-
Mail content:
227-
Hi all,
228-
229-
Apache SkyWalking Team is glad to announce the first release of Apache SkyWalking Java Agent x.y.z.
230-
231-
SkyWalking: APM (application performance monitor) tool for distributed systems,
232-
especially designed for microservices, cloud native and container-based (Docker, Kubernetes, Mesos) architectures.
233-
234-
The Java Agent for Apache SkyWalking, which provides the native tracing/metrics/logging abilities for Java projects.
235-
236-
This release contains a number of new features, bug fixes and improvements compared to
237-
version a.b.c(last release). The notable changes since x.y.z include:
238-
239-
(Highlight key changes)
240-
1. ...
241-
2. ...
242-
3. ...
243-
244-
Please refer to the change log for the complete list of changes:
245-
https://github.com/apache/skywalking-java/blob/master/changes/changes-x.y.z.md
246-
247-
Apache SkyWalking website:
248-
http://skywalking.apache.org/
249-
250-
Downloads:
251-
http://skywalking.apache.org/downloads/
252-
253-
Twitter:
254-
https://twitter.com/AsfSkyWalking
255-
256-
SkyWalking Resources:
257-
- GitHub: https://github.com/apache/skywalking-java
258-
- Issue: https://github.com/apache/skywalking/issues
259-
- Mailing list: dev@skywalkiing.apache.org
260-
261-
262-
- Apache SkyWalking Team
263-
```
264-
265-
## Release Docker images
266-
267-
```shell
268-
export SW_VERSION=x.y.z
269-
git clone --depth 1 --branch v$SW_VERSION https://github.com/apache/skywalking-java.git
270-
cd skywalking-java
271-
272-
curl -O https://dist.apache.org/repos/dist/release/skywalking/java-agent/$SW_VERSION/apache-skywalking-java-agent-$SW_VERSION.tgz
273-
tar -xzvf apache-skywalking-java-agent-$SW_VERSION.tgz
274-
275-
export NAME=skywalking-java-agent
276-
export HUB=apache
277-
export TAG=$SW_VERSION
278-
279-
make docker.push.alpine docker.push.java8 docker.push.java11 docker.push.java17 docker.push.java21 docker.push.java25
280-
```
281-
282-
## Clean up the old releases
283-
Once the latest release has been published, you should clean up the old releases from the mirror system.
284-
1. Update the download links (source, dist, asc, and sha512) on the website to the archive repo (https://archive.apache.org/dist/skywalking).
285-
2. Remove previous releases from https://dist.apache.org/repos/dist/release/skywalking/java-agent.
94+
## vote-passed
95+
After the vote passes, run `vote-passed` which executes:
96+
1. **promote** — move packages from `dist/dev` to `dist/release` in Apache SVN (prompts for SVN credentials), then release the Nexus staging repository at https://repository.apache.org and update the website download page
97+
2. **docker** — build and push all Docker image variants (alpine, java8, java11, java17, java21, java25)
98+
3. **email announce** — print announcement email template. Copy and send to `dev@skywalking.apache.org` and `announce@apache.org`
99+
4. **cleanup** (optional) — if old version is provided, remove it from `dist/release`. Update download page links to point to `https://archive.apache.org/dist/skywalking`

pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@
131131
<jmh.version>1.33</jmh.version>
132132
<gmaven-plugin.version>1.5</gmaven-plugin.version>
133133
<checkstyle.fails.on.error>true</checkstyle.fails.on.error>
134+
<!-- Only publish toolkit modules to Maven Central; agent/plugins are distributed via package -->
135+
<maven.deploy.skip>true</maven.deploy.skip>
134136
<maven-docker-plugin.version>0.46.0</maven-docker-plugin.version>
135137
</properties>
136138

tools/releasing/create_release.sh

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

0 commit comments

Comments
 (0)