Kusuma04-dev commented on code in PR #62: URL: https://github.com/apache/incubator-kie-website/pull/62#discussion_r4492533570
########## docs/community/devs/release-procedure.md: ########## @@ -0,0 +1,528 @@ +--- +id: release-procedure +title: Release Procedure +sidebar_position: 1 +--- + +This document describes how to perform an Apache KIE release. It covers the repositories involved, how branches and tags are named, and every step from creating a release candidate to publishing the final release. + +:::note +Starting with **10.3**, all Java components (Drools, OptaPlanner, Kogito Runtimes, and Kogito Apps) were merged into a single repository called `incubator-kie`. This means the release process is now a **two-repo** workflow (one command or Jenkins job per repository) instead of the multi-repo process used in 10.2. +::: + +--- + +## Overview + +A KIE release involves two repositories: + +| Repository | What it contains | Language / tooling | +|---|---|---| +| [`incubator-kie`](https://github.com/apache/incubator-kie) | Drools, OptaPlanner, jBPM, Kogito | Java / Maven | +| [`incubator-kie-tools`](https://github.com/apache/incubator-kie-tools) | VS Code extensions, Chrome extensions, web apps like KIE Sandbox, container images, Helm charts | Node.js / Go / pnpm | + +All release scripts live inside each repository: +- **`incubator-kie`**: [`script/release/`](https://github.com/apache/incubator-kie/tree/main/script/release/) — each script supports `--dry-run`. See the [`README.md`](https://github.com/apache/incubator-kie/blob/main/script/release/README.md) there for the per-script reference. +- **`incubator-kie-tools`**: [`scripts/release/`](https://github.com/apache/incubator-kie-tools/tree/main/scripts/release/) — see the [`README.md`](https://github.com/apache/incubator-kie-tools/blob/main/scripts/release/README.md) there for details. + +This page is the **single source of truth** for the release procedure. The `RELEASING.md` files in both repositories only point here. + +### Who can run a release + +A release is run by an Apache KIE **Release Manager (RM)**, a PPMC member or a committer designated by the PPMC. Running the Jenkins jobs requires: + +- Permission to trigger jobs in the Apache KIE Jenkins instance. +- Write access to `apache/incubator-kie` and `apache/incubator-kie-tools` (to push stream branches and tags). +- Your GPG key in the [Apache KIE KEYS file](https://downloads.apache.org/incubator/kie/KEYS) when you sign locally. +- An ASF account with access to `repository.apache.org` (Nexus) and `dist.apache.org` (SVN) to close/release the staging repository and move artifacts. + +### Credentials used by the Jenkins jobs + +These are configured in Jenkins, not typed in by the RM. Running locally needs the equivalent values in your environment. + +| Credential | Used by | Local equivalent | +|---|---|---| +| Maven `settings.xml` with the `apache.releases.https` server (Config File Provider, default id `kie-release-authn-settings`) | `incubator-kie` release job | `MAVEN_SETTINGS=/path/to/settings.xml` | +| GPG signing key (secret file, default id `GPG_KEY_FILE`) and optional passphrase | `incubator-kie` release job; `incubator-kie-tools` release-candidate job | Your local GPG agent, or `MAVEN_GPG_PASSPHRASE` | +| GitHub push credential (username/password) | Pushing stream branches and tags in both repositories | SSH key or token with push access | +| ASF SVN staging credential (id `kie-svn-credentials`) | `incubator-kie-tools` release-candidate job (upload to `dist/dev`) | `svn` with your ASF account | +| npm token, VS Code Marketplace PAT, Chrome Web Store tokens, Docker Hub and Helm registry credentials, GitHub token | `incubator-kie-tools` release-publish job | `NPM_TOKEN`, `VSCE_PAT`, `CHROME_*`, `DOCKER_*`, `HELM_*`, `GITHUB_TOKEN` | + +### Where the output goes + +| Output | Location | +|---|---| +| Java artifacts (JARs, POMs, sources, Javadocs) | Nexus staging repository `orgapachekie-XXXX` at [repository.apache.org](https://repository.apache.org) | +| Tools RC artifacts, signatures and checksums | `https://dist.apache.org/repos/dist/dev/incubator/kie/<rc-version>/` | +| Release tags | `X.Y.Z-rcN` and `X.Y.Z` in each repository | +| Tools public artifacts | npm, VS Code Marketplace, Chrome Web Store, Docker Hub, GitHub Release | + +### Jenkins jobs + +| Repository | Jenkinsfile | Purpose | +|---|---|---| +| `incubator-kie` | `.ci/jenkins/Jenkinsfile.ci-image-build` | Builds and pushes the CI builder Docker image (`apache/incubator-kie-kogito-ci-build:<IMAGE_TAG>`) for the release stream | +| `incubator-kie` | `.ci/jenkins/Jenkinsfile.103xplus.release-candidate` | Stream branch cut (optional), RC tag, build, deploy to Nexus staging | +| `incubator-kie` | `.ci/jenkins/Jenkinsfile.103xplus.release-promote` | Tag official release and create GitHub Release for `incubator-kie` | +| `incubator-kie-tools` | `.ci/jenkins/Jenkinsfile.103xplus.release-candidate` | Stream branch cut (optional), RC tag, build, sign, upload to SVN `dist/dev` | +| `incubator-kie-tools` | `.ci/jenkins/Jenkinsfile.103xplus.release-promote` | Tag official release and create GitHub Release for `incubator-kie-tools` | +| `incubator-kie-tools` | `.ci/jenkins/Jenkinsfile.103xplus.release-publish` | Publish to public registries (npm, VS Code Marketplace, Docker Hub, etc.) | + +--- + +## 1. Repositories & Requirements + +### `incubator-kie` + +| Item | Value | +|---|---| +| Stream branch | `10.3.x` | +| RC tag | `10.3.0-rc1` | +| Final tag | `10.3.0` | +| Build command | `./script/release/release-all.sh --version 10.3.0 --tag 10.3.0-rc1 --skip-tests` | +| Deploy command | add `--deploy --push-tag` to the build command | +| Produced artifacts | JARs, POMs, sources, and Javadocs deployed to Apache Nexus Staging | +| Update version | `./script/release/01-update-version.sh <version>` *(automated by `release-all.sh`)* | + +For the exact toolchain versions required (JDK, Maven, Docker), see the [`README.md`](https://github.com/apache/incubator-kie/blob/main/script/release/README.md) in `script/release/`. + +### `incubator-kie-tools` +| Item | Value | +|---|---| +| Stream branch | `10.3.x` | +| RC tag | `10.3.0-rc1` | +| Final tag | `10.3.0` | +| Build command (RC) | `./scripts/release/release-all.sh 10.3.0 --rc` | +| Publish command | `./scripts/release/release-all.sh 10.3.0 --publish` | +| Produced artifacts | VS Code extensions (`.vsix`), Chrome extensions, web app ZIPs, NPM packages ZIP, Sources ZIP, container image tarballs, Helm chart tarballs, upload-service binaries — all in `release-artifacts/` | + +For the exact toolchain versions required (Node.js, pnpm, Go, Bash, Docker), see the [`README.md`](https://github.com/apache/incubator-kie-tools/blob/main/scripts/release/README.md) in `scripts/release/`. + +:::warning +`release-all.sh` does not fail when Docker is not running; it prints a warning and **skips the container images**. Before you sign and upload an RC, check that the container image tarballs are present in `release-artifacts/`. +::: + +--- + +## 2. Branches & Tags + +### How branches and tags are named + +| Name format | Example | Purpose | +|---|---|---| +| `main` | `main` | Ongoing development | +| `X.Y.x` | `10.3.x` | Stream branch for a minor release series | +| `X.Y.Z-rcN` | `10.3.0-rc1` | Release candidate tag | +| `X.Y.Z` | `10.3.0` | Final release tag | + +### Version numbers on branches + +- **`main`** always runs `999-SNAPSHOT` (Java) or `0.0.0` (Tools) — a placeholder version that is never released. +- **Stream branch (`10.3.x`)** runs `10.3.999-SNAPSHOT` (Java) or `10.3.999` (Tools) — again a placeholder, never released. +- **RC and final tags** point to a temporary commit where the version is set to the exact release version (e.g. `10.3.0`). That temporary commit is created locally and immediately deleted after tagging — only the tag is pushed. + +### Git timeline diagram + +``` +main: ---c-------c---c---c----------------------------------> main + v999-SNAPSHOT + | + '----D---c---c---c---c-------------------------> 10.3.x + | | v 10.3.999-SNAPSHOT + | | + | '--R--> tag 10.3.0-rc2 ✅ + | tag 10.3.0 + | + '--R--> tag 10.3.0-rc1 ❌ (vote failed) +``` + +**Diagram key:** + +| Symbol | Meaning | +|---|---| +| `c` | Regular commit | +| `D` | Dev-version commit — sets version to `X.Y.999-SNAPSHOT` on the stream branch | +| `R` | Release commit — sets version to exact release version (e.g. `10.3.0`) on a temporary local branch, tagged, then discarded | +| `✅` | Vote passed | +| `❌` | Vote failed — a new RC is needed | + +--- + +## 3. Release Steps + +The recommended way to run a release is via Jenkins. Each step below describes the Jenkins approach first, followed by the equivalent local commands. + +--- + +### Step 1 — Prepare for a New Minor Series + +> **When:** Once per minor release series, before creating the first RC. +> **Example:** Preparing for `10.3.0` before any RC exists. + +#### 1a. Duplicate the Jenkins folder from `10.3.x` + +For new release streams, duplicate the `10.3.x` folder (or the previous stream folder) in Jenkins for the new stream series (copy the folder and its jobs, then point the jobs at the stream branch). Run all Jenkins jobs for the release from that stream folder. + +Do this once per minor series. Patch releases (`10.3.1`, ...) reuse the same folder. + +#### 1b. Build the CI Builder Image + +Before triggering the `incubator-kie` `release-candidate` job, trigger `.ci/jenkins/Jenkinsfile.ci-image-build` to build and publish the CI builder Docker image: +- `IMAGE_TAG`: set to the release stream (e.g. `10.3.x-latest` or `10.3.x`). + +Ensure the image tag is built and pushed before starting the release candidate pipeline. + + +### Step 2 — Build & Stage a Release Candidate + +> **When:** Each time you create a new RC (e.g. `10.3.0-rc1`, `10.3.0-rc2`). + +This step builds all artifacts, signs them, and uploads them to staging for community verification. + +#### Job Parameters + +Trigger the `release-candidate` Jenkins job for both repositories. Set only the parameters below; all other parameters keep their default values (the branch is always `main`, then `10.3.x`): + +| Run | `incubator-kie` | `incubator-kie-tools` | +|---|---|---| +| **First RC of a new minor** (`10.3.0-rc1`) | `RELEASE_VERSION=10.3.0`<br/>`TAG_NAME=10.3.0-rc1`<br/>`CREATE_STREAM_BRANCH=true` | `RELEASE_VERSION=10.3.0`<br/>`TAG_NAME=10.3.0-rc1`<br/>`CREATE_STREAM_BRANCH=true`<br/>`UPDATE_STREAM_VERSION=true` | +| **Later RC** (`10.3.0-rc2`) | `RELEASE_VERSION=10.3.0`<br/>`TAG_NAME=10.3.0-rc2` | `RELEASE_VERSION=10.3.0`<br/>`TAG_NAME=10.3.0-rc2` | +| **Patch** (`10.3.1-rc1`) | `RELEASE_VERSION=10.3.1`<br/>`TAG_NAME=10.3.1-rc1` | `RELEASE_VERSION=10.3.1`<br/>`TAG_NAME=10.3.1-rc1` | + +:::warning +Set `CREATE_STREAM_BRANCH=true` (and `UPDATE_STREAM_VERSION=true` for `incubator-kie-tools`) **only** for the very first RC of a new minor (`10.3.0-rc1`). The job fails if `10.3.x` already exists. For `rc2`, patch releases, and all later runs, leave them `false`. +::: + +On the first RC run, the job creates `10.3.x` from `main`, sets the development version (`10.3.999`; `10.3.999-SNAPSHOT` for `incubator-kie`), pushes the branch, and builds the RC on it, all in the same build. Later runs build from `10.3.x`, which the job derives from `RELEASE_VERSION`. + +#### 2a. `incubator-kie` + +**Via Jenkins:** +Trigger `Jenkinsfile.103xplus.release-candidate` with the parameters for your run from the table above. + +**Locally:** +```bash +git checkout 10.3.x && git pull + +# Dry run — builds everything locally, no remote changes +./script/release/release-all.sh \ + --version 10.3.0 \ + --tag 10.3.0-rc1 \ + --skip-tests \ + 2>&1 | tee /tmp/kie-release-run.log + +# Real run — creates the RC commit, pushes the tag, and deploys to Nexus staging +MAVEN_SETTINGS=/path/to/settings.xml \ +MAVEN_GPG_PASSPHRASE=<your-gpg-passphrase> \ +./script/release/release-all.sh \ + --version 10.3.0 \ + --tag 10.3.0-rc1 \ + --skip-tests \ + --deploy \ + --push-tag \ + 2>&1 | tee /tmp/kie-release-run.log +``` + +#### 2b. Close the Nexus staging repository + +After Step 2a (Java deploy) succeeds: +1. Go to [repository.apache.org](https://repository.apache.org) → **Staging Repositories**. +2. Find your `orgapachekie-XXXX` repository. +3. Click **Close**. +4. Copy the staging repository URL — you will need it in the voting email. + +If the deploy failed part-way, **Drop** the partial staging repository instead of closing it (see [Troubleshooting](#6-troubleshooting)). + +#### 2c. `incubator-kie-tools` + +**Via Jenkins:** +Trigger `Jenkinsfile.103xplus.release-candidate` with the parameters for your run from the table above. + +Jenkins builds, signs, and uploads all artifacts to Apache SVN Dev Dist at: +`https://dist.apache.org/repos/dist/dev/incubator/kie/10.3.0-rc1/` + +**Locally:** +```bash +git checkout 10.3.x && git pull +pnpm bootstrap + +# Step 1 — Build all RC artifacts into release-artifacts/ +./scripts/release/release-all.sh 10.3.0 --rc 2>&1 | tee release-10.3.0-rc.log + +# Step 2 — Sign each artifact +cd release-artifacts +for f in *; do + gpg --no-tty --batch --pinentry-mode loopback --output "${f}.asc" --detach-sig "${f}" + sha512sum "${f}" > "${f}.sha512" +done + +# Step 3 — Upload to Apache SVN Dev Dist +svn import . https://dist.apache.org/repos/dist/dev/incubator/kie/10.3.0-rc1 \ + -m "Apache KIE 10.3.0-rc1 artifacts" +``` + +#### Artifacts staged in SVN Dev Dist + +<details> +<summary><b>Full artifact list (click to expand)</b></summary> + +**VS Code Extensions (`.vsix`)** +- `apache-kie-10.3.0-incubating-bpmn-vscode-extension.vsix` +- `apache-kie-10.3.0-incubating-business-automation-bundle-vscode-extension.vsix` +- `apache-kie-10.3.0-incubating-dmn-vscode-extension.vsix` +- `apache-kie-10.3.0-incubating-drl-vscode-extension.vsix` +- `apache-kie-10.3.0-incubating-extended-services-vscode-extension.vsix` +- `apache-kie-10.3.0-incubating-kogito-bundle-vscode-extension.vsix` +- `apache-kie-10.3.0-incubating-pmml-vscode-extension.vsix` + +**Chrome Extensions (`.zip`)** +- `apache-kie-10.3.0-incubating-business-automation-chrome-extension.zip` +- `apache-kie-10.3.0-incubating-business-automation-chrome-extension-editors.zip` + +**Web Apps, Accelerators, NPM Packages & Sources (`.zip`)** +- `apache-kie-10.3.0-incubating-sandbox-webapp.zip` +- `apache-kie-10.3.0-incubating-sandbox-accelerator-quarkus.zip` +- `apache-kie-10.3.0-incubating-tools-npm-packages.zip` +- `apache-kie-10.3.0-incubating-sources.zip` Review Comment: there will be no java-sources.zip -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
