From d39a00331c1ecf03454fa8f586c67f3f6dae2f49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=99=9F=20Wu=20Sheng?= Date: Fri, 27 Dec 2024 14:30:42 +0800 Subject: [PATCH] [BREAKING CHANGE] Simplified the release process (#12903) --- docs/en/changes/changes.md | 5 + docs/en/guides/How-to-release.md | 99 ++++--------------- docs/en/setup/backend/backend-docker.md | 12 ++- ...urce_release.sh => create_release_tars.sh} | 6 +- 4 files changed, 38 insertions(+), 84 deletions(-) rename tools/releasing/{create_source_release.sh => create_release_tars.sh} (92%) diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md index 72f963ee75..7ed9b20197 100644 --- a/docs/en/changes/changes.md +++ b/docs/en/changes/changes.md @@ -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 @@ -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) diff --git a/docs/en/guides/How-to-release.md b/docs/en/guides/How-to-release.md index e57ceefe70..3c50201f19 100644 --- a/docs/en/guides/How-to-release.md +++ b/docs/en/guides/How-to-release.md @@ -3,52 +3,21 @@ 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`. - -``` - -... - - - - apache.snapshots.https - - - - - - apache.releases.https - - - - ... - - -``` - -## 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. ```bash export RELEASE_VERSION=x.y.z # (example: RELEASE_VERSION=10.1.0) export NEXT_RELEASE_VERSION=x.y.z # (example: NEXT_RELEASE_VERSION=10.2.0) +export PRODUCT_NAME="apache-skywalking-apm" +export SOURCE_FILE="dist/${PRODUCT_NAME}-${RELEASE_VERSION}.tar.gz" +export TARGET_DIR="tools/releasing" ``` - Create a new folder for the new release. @@ -76,42 +45,34 @@ 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 +mv "$SOURCE_FILE" "$TARGET_DIR/" ``` -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 first as `apache-skywalking-apm-x.y.z.tar.gz` in the `{PROJECT_ROOT}/dist` directory, and +then moved to the `tools/releasing` directory. -```bash -MAVEN_GPG_PASSPHRASE= ./mvnw flatten:flatten install deploy -DskipTests -``` -- 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 +## Build the source code package, sign the source code package and binary package ```bash cd tools/releasing -bash create_source_release.sh +bash create_release_tars.sh ``` This script takes care of the following things: 1. Use `v` + `RELEASE_VERSION` as tag to clone the codes. 1. Complete `git submodule init/update`. 1. Exclude all unnecessary files in the target source tar, such as `.git`, `.github`, and `.gitmodules`. See the script for more details. -1. Execute `gpg` and `shasum 512`. +1. Execute `gpg` and `shasum 512` for source tar and binary tar. `apache-skywalking-apm-x.y.z-src.tgz` and files ending with `.asc` and `.sha512` may be found in the `tools/releasing` folder. ## 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 @@ -130,15 +91,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/`. @@ -148,7 +100,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 @@ -172,10 +123,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 @@ -206,7 +153,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. @@ -231,15 +177,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 `dev@skywalking.apache.org`, `announce@apache.org`. 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 `dev@skywalking.apache.org`, `announce@apache.org`. The sender should use the Apache email account. ``` Mail title: [ANNOUNCE] Apache SkyWalking x.y.z released diff --git a/docs/en/setup/backend/backend-docker.md b/docs/en/setup/backend/backend-docker.md index 1bfc2a4e35..4ecadbdfc3 100644 --- a/docs/en/setup/backend/backend-docker.md +++ b/docs/en/setup/backend/backend-docker.md @@ -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 @@ -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 diff --git a/tools/releasing/create_source_release.sh b/tools/releasing/create_release_tars.sh similarity index 92% rename from tools/releasing/create_source_release.sh rename to tools/releasing/create_release_tars.sh index ec91df641e..e2d5de71e5 100755 --- a/tools/releasing/create_source_release.sh +++ b/tools/releasing/create_release_tars.sh @@ -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} @@ -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 @@ -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}.tar.gz shasum -a 512 ${PRODUCT_NAME}-src.tgz > ${PRODUCT_NAME}-src.tgz.sha512 +shasum -a 512 ${PRODUCT_NAME}.tar.gz > ${PRODUCT_NAME}.tar.gz.sha512