Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BREAKING CHANGE] Simplified the release process #12903

Merged
merged 6 commits into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/en/changes/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
* **Warning** If there are custom query plugins for our Elasticsearch indices, this change could break them as
sort queries and aggregation queries which used the unexpected fields are being blocked.
* [Breaking Change] Rename `debugging-query` module to `status-query` module. Relative exposed APIs are **UNCHANGED**.
* [Breaking Change] All jars of the `skywalking-oap-server` are no longer published through maven central. We will only
publish the source tar and binary tar to the website download page, and docker images to docker hub.
* **Warning** If you are using the `skywalking-oap-server` as a dependency in your project, you need to download the
source tar from the website and publish them to your private maven repository.

#### OAP Server

Expand Down Expand Up @@ -69,5 +73,6 @@
* Improve configuration-vocabulary documentation.
* Add `Get Effective TTL Configurations` API documentation.
* Add Status APIs docs.
* Simplified the release process with removing maven central publish relative processes.

All issues and pull requests are [here](https://github.com/apache/skywalking/milestone/224?closed=1)
88 changes: 13 additions & 75 deletions docs/en/guides/How-to-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,12 @@ Apache SkyWalking release guide
If you're a committer, you can learn how to release SkyWalking in The Apache Way and start the voting process by reading this document.


## Set up your development environment
Follow the steps in the [Apache maven deployment environment document](http://www.apache.org/dev/publishing-maven-artifacts.html#dev-env)
to set gpg tool and encrypt passwords.
## Prerequisites
Add your GPG public key into the [SkyWalking GPG KEYS](https://dist.apache.org/repos/dist/release/skywalking/KEYS) file.
- If you are a PMC member, use your Apache ID and password to log in this svn, and update the file. **Don't override the existing file.**
- If you are a committer, please ask a PMC member to help you.

Use the following block as a template and place it in `~/.m2/settings.xml`.

```
<settings>
...
<servers>
<!-- To publish a snapshot of some part of Maven -->
<server>
<id>apache.snapshots.https</id>
<username> <!-- YOUR APACHE LDAP USERNAME --> </username>
<password> <!-- YOUR APACHE LDAP PASSWORD (encrypted) --> </password>
</server>
<!-- To stage a release of some part of Maven -->
<server>
<id>apache.releases.https</id>
<username> <!-- YOUR APACHE LDAP USERNAME --> </username>
<password> <!-- YOUR APACHE LDAP PASSWORD (encrypted) --> </password>
</server>
...
</servers>
</settings>
```

## Add your GPG public key
1. Add your GPG public key into the [SkyWalking GPG KEYS](https://dist.apache.org/repos/dist/release/skywalking/KEYS) file.
If you are a committer, use your Apache ID and password to log in this svn, and update the file. **Don't override the existing file.**
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
Apache maven staging repository checklist.

## Test your settings
This step is only for testing purpose. If your env is correctly set, you don't need to check every time.
```
./mvnw clean install -Pall (this will build artifacts, sources and sign)
```

## Prepare for the release
## Tag for the release

- Set the version number that you are about to release.

Expand Down Expand Up @@ -76,24 +42,14 @@ git tag v${RELEASE_VERSION}
git push origin v${RELEASE_VERSION}
```

## Stage the release
## Build the binary package

```bash
./mvnw flatten:flatten install deploy -DskipTests
./mvnw install package -DskipTests
```

This command will build, sign, and deploy the release to the Apache staging repository.
You should be prompted for your GPG passphrase during the deployment process.
If no prompt is present, you can set the passphrase in the environment variable `MAVEN_GPG_PASSPHRASE`:
The release will be packaged locally as `apache-skywalking-apm-x.y.z.tar.gz` in the `{PROJECT_ROOT}/dist` directory.

```bash
MAVEN_GPG_PASSPHRASE=<your-gpg-passphrase> ./mvnw flatten:flatten install deploy -DskipTests
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GPG related is not needed anymore, it was for maven verification. Now we will only sign the final tar.

```

- The release will be automatically inserted into a temporary staging repository.

`apache-skywalking-apm-x.y.z.tar.gz` with its `.asc` size could be found in https://repository.apache.org/ staging repo.
Create shasum through `shasum -a 512 apache-skywalking-apm-x.y.z.tar.gz > apache-skywalking-apm-x.y.z.tar.gz.sha512`

## Build and sign the source code package
```bash
Expand All @@ -111,7 +67,7 @@ This script takes care of the following things:

## Start the next iteration

Once the release is deployed to the staging repositories, you can start updating the version to the next number and open a pull request.
Once the binary and source packages are created, you can start updating the version to the next number and open a pull request.

```bash
# Update the version to the next snapshot version still in the same branch, such as 10.1.0-release
Expand All @@ -130,15 +86,6 @@ git push
gh pr create --fill # If you have gh cli installed and configured, or open the pull request in https://github.com/apache/skywalking/pulls
```

## Locate and download the distribution package in Apache Nexus Staging repositories
1. Use your Apache ID to log in to `https://repository.apache.org/`.
1. Go to `https://repository.apache.org/#stagingRepositories`.
1. Search `skywalking` and find your staging repository.
1. Close the repository and wait for all checks to pass. In this step, your GPG KEYS will be checked. See the [set PGP document](#add-your-gpg-public-key),
if you haven't done it before.
1. Go to `{REPO_URL}/org/apache/skywalking/apache-skywalking-apm/x.y.z`.
1. Download `.tar.gz` and `.zip` and files ending with `.asc` and `.sha1`.


## Upload to Apache svn
1. Use your Apache ID to log in to `https://dist.apache.org/repos/dist/dev/skywalking/`.
Expand All @@ -148,7 +95,6 @@ if you haven't done it before.
* See Section "Build and sign the source code package" for more details
1. Upload the distribution package to the folder with files ending with `.asc` and `.sha512`.
* Package name: `apache-skywalking-bin-x.y.z.tar.gz`.
* See Section "Locate and download the distribution package in Apache Nexus Staging repositories" for more details.
* Create a `.sha512` package: `shasum -a 512 file > file.sha512`

## Call a vote in dev
Expand All @@ -172,10 +118,6 @@ Release Candidate:
- sha512xxxxyyyzzz apache-skywalking-apm-x.x.x-src.tgz
- sha512xxxxyyyzzz apache-skywalking-apm-bin-x.x.x.tar.gz

Maven 2 staging repository:

* https://repository.apache.org/content/repositories/xxxx/org/apache/skywalking/

Release Tag :

* (Git Tag) vx.y.z
Expand Down Expand Up @@ -206,7 +148,6 @@ Voting will start now (xxxx date) and will remain open for at least 72 hours, Re
All PMC members and committers should check these before casting +1 votes.

1. Features test.
1. All artifacts in staging repository are published with `.asc`, `.md5`, and `*sha1` files.
1. Source code and distribution package (`apache-skywalking-x.y.z-src.tar.gz`, `apache-skywalking-bin-x.y.z.tar.gz`, `apache-skywalking-bin-x.y.z.zip`)
are found in `https://dist.apache.org/repos/dist/dev/skywalking/x.y.z` with `.asc` and `.sha512`.
1. `LICENSE` and `NOTICE` are in the source code and distribution package.
Expand All @@ -231,15 +172,12 @@ enter your apache password
....

```
2. Release in the nexus staging repo.
3. Public download source and distribution tar/zip are located in `http://www.apache.org/dyn/closer.cgi/skywalking/x.y.z/xxx`.
2. Public download source and distribution tar/zip with asc and sha512 are located in `http://www.apache.org/dyn/closer.cgi/skywalking/x.y.z/xxx`.
The Apache mirror path is the only release information that we publish.
4. Public asc and sha512 are located in `https://www.apache.org/dist/skywalking/x.y.z/xxx`.
5. Public KEYS point to `https://www.apache.org/dist/skywalking/KEYS`.
6. Update the website download page. http://skywalking.apache.org/downloads/ . Add a new download source, distribution, sha512, asc, and document
3. Update the website download page. http://skywalking.apache.org/downloads/ . Add a new download source, distribution, sha512, asc, and document
links. The links can be found following rules (3) to (6) above.
7. Add a release event on the website homepage and event page. Announce the public release with changelog or key features.
8. Send ANNOUNCE email to `[email protected]`, `[email protected]`. The sender should use the Apache email account.
4. Add a release event on the website homepage and event page. Announce the public release with changelog or key features.
5. Send ANNOUNCE email to `[email protected]`, `[email protected]`. The sender should use the Apache email account.
```
Mail title: [ANNOUNCE] Apache SkyWalking x.y.z released

Expand Down
12 changes: 8 additions & 4 deletions docs/en/setup/backend/backend-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Start the storage, OAP and Booster UI with docker-compose

As a quick start, you can use our one-liner script to start ElasticSearch or [BanyanDB](https://skywalking.apache.org/docs/skywalking-banyandb/next/readme/) as the storage, OAP server and Booster UI, please make sure you have installed Docker.
The versions of the OAP and BanyanDB images are the latest release versions.

**Linux, macOS, Windows (WSL)**
```shell
Expand All @@ -24,24 +25,27 @@ docker compose --project-name=skywalking-quickstart down
## Start a `standalone` container with `H2` storage

```shell
docker run --name oap --restart always -d apache/skywalking-oap-server:9.7.0
export RELEASE_VERSION=x.y.z
docker run --name oap --restart always -d apache/skywalking-oap-server:${RELEASE_VERSION}
```

## Start a `standalone` container with BanyanDB as storage, whose address is `banyandb:17912`

```shell
docker run --name oap --restart always -d -e SW_STORAGE=banyandb -e SW_STORAGE_BANYANDB_TARGETS=banyandb:17912 apache/skywalking-oap-server:9.7.0
export RELEASE_VERSION=x.y.z
docker run --name oap --restart always -d -e SW_STORAGE=banyandb -e SW_STORAGE_BANYANDB_TARGETS=banyandb:17912 apache/skywalking-oap-server:${RELEASE_VERSION}
```

## Start a `standalone` container with ElasticSearch 7 as storage, whose address is `elasticsearch:9200`

```shell
docker run --name oap --restart always -d -e SW_STORAGE=elasticsearch -e SW_STORAGE_ES_CLUSTER_NODES=elasticsearch:9200 apache/skywalking-oap-server:9.7.0
export RELEASE_VERSION=x.y.z
docker run --name oap --restart always -d -e SW_STORAGE=elasticsearch -e SW_STORAGE_ES_CLUSTER_NODES=elasticsearch:9200 apache/skywalking-oap-server:${RELEASE_VERSION}
```

# Configuration

We could set up environment variables to configure this image. They are defined in [backend-setup](https://skywalking.apache.org/docs/main/next/en/setup/backend/backend-setup/).
We could set up environment variables to configure this image. They are defined in [backend-setup](backend-setup.md).

# Extend image

Expand Down
6 changes: 4 additions & 2 deletions tools/releasing/create_source_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# This script relies on few environment variables to determine source code package
# behavior, those variables are:
# RELEASE_VERSION -- The version of this source package.
# For example: RELEASE_VERSION=5.0.0-alpha
# For example: RELEASE_VERSION=10.0.0


RELEASE_VERSION=${RELEASE_VERSION}
Expand All @@ -32,7 +32,7 @@ echo "Source tag "${TAG_NAME}

if [ "$RELEASE_VERSION" == "" ]; then
echo "RELEASE_VERSION environment variable not found, Please setting the RELEASE_VERSION."
echo "For example: export RELEASE_VERSION=5.0.0-alpha"
echo "For example: export RELEASE_VERSION=10.0.0"
exit 1
fi

Expand Down Expand Up @@ -75,5 +75,7 @@ tar czf ${PRODUCT_NAME}-src.tgz \
${PRODUCT_NAME}

gpg --armor --detach-sig ${PRODUCT_NAME}-src.tgz
gpg --armor --detach-sig ${PRODUCT_NAME}.tgz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file name is create_source_release.sh, but these two lines are signing binary package, what do you think moving these two lines to the release doc or renaming this script file?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer rename the script file.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kezhenxu94 I updated the docs a little bit more, to move binary into releasing folder.


shasum -a 512 ${PRODUCT_NAME}-src.tgz > ${PRODUCT_NAME}-src.tgz.sha512
shasum -a 512 ${PRODUCT_NAME}.tgz > ${PRODUCT_NAME}.tgz.sha512
Loading