tiagobento commented on code in PR #62: URL: https://github.com/apache/incubator-kie-website/pull/62#discussion_r4519615726
########## 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. Review Comment: Ok... We don't really need to hide `main` inside `drools` anymore, though. We should have a folder called '10.3.x+ stream' at the top-level, with a 'main' folder inside, containing the jobs of a release in the structure. Everything else that's there at the top level can be preserved for the time being, while we verify that `10.3.x+ stream` works. Once we have a release out, then I think we can delete all the old jobs from there. Once we remove the old jobs, we can dissolve the top-level `10.3.x+ stream` folder and make `main` and `10.3.x` be top-level as well. Hope it makes sense. -- 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]
