From c431105ec38548ca8537d4ebd0b848281b3bd97a Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Sat, 20 Jan 2024 11:45:42 +0100 Subject: [PATCH 01/15] chore: add Changelog.md --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..6cd58bc --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,5 @@ +# Changelog + +All notable changes to this Policy-Hub repository will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). From 3197ab81fe0b0ec270163ce6ad0f0c16f4ec3d57 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Sat, 20 Jan 2024 13:35:02 +0100 Subject: [PATCH 02/15] chore(release): add release please for automated changelog creation using simple release-type as helm isn't working due to bug --- .github/workflows/release-please.yml | 39 ++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/release-please.yml diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..da03ba5 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,39 @@ +############################################################### +# Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License, Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0. +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 +############################################################### + +name: Release Please + +on: + push: + branches: + - dev + - release/v*.*.*-RC* +permissions: + contents: write + pull-requests: write + +jobs: + prepare-release: + runs-on: ubuntu-latest + steps: + - uses: google-github-actions/release-please-action@v4 + name: Prepare release + with: + target-branch: ${{ github.ref_name }} + release-type: simple From f082551005b46ebdab408bc76bd368e2b2c6b137 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Sat, 20 Jan 2024 13:35:37 +0100 Subject: [PATCH 03/15] chore: add version txt --- version.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 version.txt diff --git a/version.txt b/version.txt new file mode 100644 index 0000000..7d41c11 --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +0.1.0-RC1 \ No newline at end of file From 46ed27d2ebcc678ac69b4b611f34b3c620e33be7 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Sat, 20 Jan 2024 13:37:36 +0100 Subject: [PATCH 04/15] chore: update release please --- .github/workflows/release-please.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index da03ba5..65bc19d 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -22,8 +22,7 @@ name: Release Please on: push: branches: - - dev - - release/v*.*.*-RC* + - release/v*.*.*-* permissions: contents: write pull-requests: write From 5bc67e8f59ca552b08568e5bf2ac82743db1e59d Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Sat, 20 Jan 2024 13:38:49 +0100 Subject: [PATCH 05/15] chore: update changelog --- CHANGELOG.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cd58bc..825c32f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1 @@ # Changelog - -All notable changes to this Policy-Hub repository will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). From 2cb2ed5b0598f8444129cdf394b64f45117468aa Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Mon, 22 Jan 2024 09:10:04 +0100 Subject: [PATCH 06/15] chore: trigger release please at branches with pattern v*.*.* --- .github/workflows/release-please.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 65bc19d..1d3d67c 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -22,7 +22,9 @@ name: Release Please on: push: branches: - - release/v*.*.*-* + - 'v*.*.*' + workflow_dispatch: + permissions: contents: write pull-requests: write From 25364d1de3f63b5b90e8be29e63aa0583ea9a795 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Mon, 22 Jan 2024 09:10:42 +0100 Subject: [PATCH 07/15] chore: remove not needed release release-candidate workflow --- .../workflows/release_release_candidate.yml | 136 ------------------ 1 file changed, 136 deletions(-) delete mode 100644 .github/workflows/release_release_candidate.yml diff --git a/.github/workflows/release_release_candidate.yml b/.github/workflows/release_release_candidate.yml deleted file mode 100644 index 69ae9ae..0000000 --- a/.github/workflows/release_release_candidate.yml +++ /dev/null @@ -1,136 +0,0 @@ -############################################################### -# Copyright (c) 2021, 2023 Contributors to the Eclipse Foundation -# -# See the NOTICE file(s) distributed with this work for additional -# information regarding copyright ownership. -# -# This program and the accompanying materials are made available under the -# terms of the Apache License, Version 2.0 which is available at -# https://www.apache.org/licenses/LICENSE-2.0. -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -# SPDX-License-Identifier: Apache-2.0 -############################################################### - -name: Release RC - -on: - push: - tags: - - 'v*.*.*-RC*' - workflow_dispatch: - -env: - IMAGE_NAMESPACE: "tractusx" - IMAGE_NAME_SERVICE: "policy-hub-service" - IMAGE_NAME_MIGRATIONS: "policy-hub-migrations" - -jobs: - policy-hub-service-release: - runs-on: ubuntu-latest - permissions: - contents: read - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Login to DockerHub - if: github.event_name != 'pull_request' - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_HUB_USER }} - password: ${{ secrets.DOCKER_HUB_TOKEN }} - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Docker meta - id: meta - uses: docker/metadata-action@v4 - with: - images: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME_SERVICE }} - tags: | - type=raw,value=latest - type=raw,value=${{ github.ref_name }} - - - name: Build and push Docker image - uses: docker/build-push-action@v4 - with: - context: . - file: docker/Dockerfile-policy-hub-service - platforms: linux/amd64, linux/arm64 - pull: true - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - - # https://github.com/peter-evans/dockerhub-description - - name: Update Docker Hub description - if: github.event_name != 'pull_request' - uses: peter-evans/dockerhub-description@v3 - with: - username: ${{ secrets.DOCKER_HUB_USER }} - password: ${{ secrets.DOCKER_HUB_TOKEN }} - repository: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME_SERVICE }} - readme-filepath: "./docker/notice-policy-hub-service.md" - - policy-hub-migrations-release: - runs-on: ubuntu-latest - permissions: - contents: read - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Login to DockerHub - if: github.event_name != 'pull_request' - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_HUB_USER }} - password: ${{ secrets.DOCKER_HUB_TOKEN }} - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Docker meta - id: meta - uses: docker/metadata-action@v4 - with: - images: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME_MIGRATIONS }} - tags: | - type=raw,value=latest - type=raw,value=${{ github.ref_name }} - - - name: Build and push Docker image - uses: docker/build-push-action@v4 - with: - context: . - file: docker/Dockerfile-policy-hub-migrations - platforms: linux/amd64, linux/arm64 - pull: true - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - - # https://github.com/peter-evans/dockerhub-description - - name: Update Docker Hub description - if: github.event_name != 'pull_request' - uses: peter-evans/dockerhub-description@v3 - with: - username: ${{ secrets.DOCKER_HUB_USER }} - password: ${{ secrets.DOCKER_HUB_TOKEN }} - repository: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME_MIGRATIONS }} - readme-filepath: "./docker/notice-policy-hub-migrations.md" From 933f42cf16fb48b3b69693058e84af4f3fccb1e8 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Mon, 22 Jan 2024 09:11:54 +0100 Subject: [PATCH 08/15] chore: trigger release workflow also on tags with v*.*.*-RC* pattern --- .github/workflows/release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 514f54c..78ead14 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,6 @@ on: push: tags: - 'v*.*.*' - - '!v*.*.*-RC*' workflow_dispatch: env: From a5bf7e57d4c166408d108b61d1b16db8f1e2d7f5 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Mon, 22 Jan 2024 09:23:05 +0100 Subject: [PATCH 09/15] chore: fix release candidate workflow --- .github/workflows/release_candidate.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release_candidate.yml b/.github/workflows/release_candidate.yml index 051da24..09ee23e 100644 --- a/.github/workflows/release_candidate.yml +++ b/.github/workflows/release_candidate.yml @@ -59,8 +59,8 @@ jobs: with: images: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME_SERVICE }} tags: | - type=raw,value=latest - type=raw,value=${{ github.ref_name }} + type=raw,value=rc + type=raw,value=${{ github.sha }} - name: Build and push Docker image uses: docker/build-push-action@v4 @@ -111,8 +111,8 @@ jobs: with: images: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME_MIGRATIONS }} tags: | - type=raw,value=latest - type=raw,value=${{ github.ref_name }} + type=raw,value=rc + type=raw,value=${{ github.sha }} - name: Build and push Docker image uses: docker/build-push-action@v4 From 2d8764723c1b5a07ab3a0952b5a02ed24c857b50 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Mon, 22 Jan 2024 09:28:24 +0100 Subject: [PATCH 10/15] chore: remove version.txt --- version.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 version.txt diff --git a/version.txt b/version.txt deleted file mode 100644 index 7d41c11..0000000 --- a/version.txt +++ /dev/null @@ -1 +0,0 @@ -0.1.0-RC1 \ No newline at end of file From eb07248631d03fa7184542a496db00b7efd5fd05 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Mon, 22 Jan 2024 09:29:02 +0100 Subject: [PATCH 11/15] chore: empty Changelog.md --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 825c32f..e69de29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1 +0,0 @@ -# Changelog From d8eb6e41e3fc37daddb4f7b6127e274a866ed44a Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Mon, 22 Jan 2024 14:14:39 +0100 Subject: [PATCH 12/15] chore: add chart releaser workflow --- .github/workflows/chart-release.yaml | 63 ++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/chart-release.yaml diff --git a/.github/workflows/chart-release.yaml b/.github/workflows/chart-release.yaml new file mode 100644 index 0000000..35bca98 --- /dev/null +++ b/.github/workflows/chart-release.yaml @@ -0,0 +1,63 @@ +############################################################### +# Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License, Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0. +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 +############################################################### + +name: Release Chart + +on: + workflow_dispatch: + push: + paths: + - 'charts/**' + branches: + - main + +jobs: + release: + # depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions + # see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token + permissions: + contents: write + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Configure Git + run: | + git config user.name "$GITHUB_ACTOR" + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + + - name: Install Helm + uses: azure/setup-helm@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Update helm dependencies for policy-hub + run: | + cd charts/policy-hub + helm repo add bitnami https://charts.bitnami.com/bitnami + helm dependency update + + - name: Run chart-releaser + uses: helm/chart-releaser-action@v1.4.1 + env: + CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + CR_SKIP_EXISTING: "true" From b6edf5250b0c2c132634d91aead38bd48feccf19 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Mon, 22 Jan 2024 16:15:03 +0100 Subject: [PATCH 13/15] chore: restructure documentation --- .../architecture/Architecture Constraints.md | 0 .../architecture/Context and scope.md | 0 .../architecture/Development Concept.md | 0 .../architecture/Requirements.md | 0 .../architecture/Solution strategy.md | 0 .../architecture/Whitebox Overall System.md | 0 .../architecture/operational-concept.md | 0 .../authentication/authentication.md | 0 .../database/db-view.md | 0 .../database/seeding.md | 0 .../dev-process}/Dev-flow_deploy-dev-env.md | 0 .../dev-process}/Dev-flow_git-diagram.md | 0 .../dev-process}/Enumeration Handling.md | 0 .../dev-process}/How to contribute.md | 0 .../release-process}/Release Process.md | 0 15 files changed, 0 insertions(+), 0 deletions(-) rename docs/{developer/Technical-Documentation => technical-documentation}/architecture/Architecture Constraints.md (100%) rename docs/{developer/Technical-Documentation => technical-documentation}/architecture/Context and scope.md (100%) rename docs/{developer/Technical-Documentation => technical-documentation}/architecture/Development Concept.md (100%) rename docs/{developer/Technical-Documentation => technical-documentation}/architecture/Requirements.md (100%) rename docs/{developer/Technical-Documentation => technical-documentation}/architecture/Solution strategy.md (100%) rename docs/{developer/Technical-Documentation => technical-documentation}/architecture/Whitebox Overall System.md (100%) rename docs/{developer/Technical-Documentation => technical-documentation}/architecture/operational-concept.md (100%) rename docs/{developer/Technical-Documentation => technical-documentation}/authentication/authentication.md (100%) rename docs/{developer/Technical-Documentation => technical-documentation}/database/db-view.md (100%) rename docs/{developer/Technical-Documentation => technical-documentation}/database/seeding.md (100%) rename docs/{developer/Technical-Documentation/Dev-Process => technical-documentation/dev-process}/Dev-flow_deploy-dev-env.md (100%) rename docs/{developer/Technical-Documentation/Dev-Process => technical-documentation/dev-process}/Dev-flow_git-diagram.md (100%) rename docs/{developer/Technical-Documentation/Dev-Process => technical-documentation/dev-process}/Enumeration Handling.md (100%) rename docs/{developer/Technical-Documentation/Dev-Process => technical-documentation/dev-process}/How to contribute.md (100%) rename docs/{ => technical-documentation/release-process}/Release Process.md (100%) diff --git a/docs/developer/Technical-Documentation/architecture/Architecture Constraints.md b/docs/technical-documentation/architecture/Architecture Constraints.md similarity index 100% rename from docs/developer/Technical-Documentation/architecture/Architecture Constraints.md rename to docs/technical-documentation/architecture/Architecture Constraints.md diff --git a/docs/developer/Technical-Documentation/architecture/Context and scope.md b/docs/technical-documentation/architecture/Context and scope.md similarity index 100% rename from docs/developer/Technical-Documentation/architecture/Context and scope.md rename to docs/technical-documentation/architecture/Context and scope.md diff --git a/docs/developer/Technical-Documentation/architecture/Development Concept.md b/docs/technical-documentation/architecture/Development Concept.md similarity index 100% rename from docs/developer/Technical-Documentation/architecture/Development Concept.md rename to docs/technical-documentation/architecture/Development Concept.md diff --git a/docs/developer/Technical-Documentation/architecture/Requirements.md b/docs/technical-documentation/architecture/Requirements.md similarity index 100% rename from docs/developer/Technical-Documentation/architecture/Requirements.md rename to docs/technical-documentation/architecture/Requirements.md diff --git a/docs/developer/Technical-Documentation/architecture/Solution strategy.md b/docs/technical-documentation/architecture/Solution strategy.md similarity index 100% rename from docs/developer/Technical-Documentation/architecture/Solution strategy.md rename to docs/technical-documentation/architecture/Solution strategy.md diff --git a/docs/developer/Technical-Documentation/architecture/Whitebox Overall System.md b/docs/technical-documentation/architecture/Whitebox Overall System.md similarity index 100% rename from docs/developer/Technical-Documentation/architecture/Whitebox Overall System.md rename to docs/technical-documentation/architecture/Whitebox Overall System.md diff --git a/docs/developer/Technical-Documentation/architecture/operational-concept.md b/docs/technical-documentation/architecture/operational-concept.md similarity index 100% rename from docs/developer/Technical-Documentation/architecture/operational-concept.md rename to docs/technical-documentation/architecture/operational-concept.md diff --git a/docs/developer/Technical-Documentation/authentication/authentication.md b/docs/technical-documentation/authentication/authentication.md similarity index 100% rename from docs/developer/Technical-Documentation/authentication/authentication.md rename to docs/technical-documentation/authentication/authentication.md diff --git a/docs/developer/Technical-Documentation/database/db-view.md b/docs/technical-documentation/database/db-view.md similarity index 100% rename from docs/developer/Technical-Documentation/database/db-view.md rename to docs/technical-documentation/database/db-view.md diff --git a/docs/developer/Technical-Documentation/database/seeding.md b/docs/technical-documentation/database/seeding.md similarity index 100% rename from docs/developer/Technical-Documentation/database/seeding.md rename to docs/technical-documentation/database/seeding.md diff --git a/docs/developer/Technical-Documentation/Dev-Process/Dev-flow_deploy-dev-env.md b/docs/technical-documentation/dev-process/Dev-flow_deploy-dev-env.md similarity index 100% rename from docs/developer/Technical-Documentation/Dev-Process/Dev-flow_deploy-dev-env.md rename to docs/technical-documentation/dev-process/Dev-flow_deploy-dev-env.md diff --git a/docs/developer/Technical-Documentation/Dev-Process/Dev-flow_git-diagram.md b/docs/technical-documentation/dev-process/Dev-flow_git-diagram.md similarity index 100% rename from docs/developer/Technical-Documentation/Dev-Process/Dev-flow_git-diagram.md rename to docs/technical-documentation/dev-process/Dev-flow_git-diagram.md diff --git a/docs/developer/Technical-Documentation/Dev-Process/Enumeration Handling.md b/docs/technical-documentation/dev-process/Enumeration Handling.md similarity index 100% rename from docs/developer/Technical-Documentation/Dev-Process/Enumeration Handling.md rename to docs/technical-documentation/dev-process/Enumeration Handling.md diff --git a/docs/developer/Technical-Documentation/Dev-Process/How to contribute.md b/docs/technical-documentation/dev-process/How to contribute.md similarity index 100% rename from docs/developer/Technical-Documentation/Dev-Process/How to contribute.md rename to docs/technical-documentation/dev-process/How to contribute.md diff --git a/docs/Release Process.md b/docs/technical-documentation/release-process/Release Process.md similarity index 100% rename from docs/Release Process.md rename to docs/technical-documentation/release-process/Release Process.md From 89e5f4e692f91cf151b001d1e334cf7f5333fc09 Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Mon, 22 Jan 2024 17:32:45 +0100 Subject: [PATCH 14/15] docs: update release process --- .../release-process/Release Process.md | 122 ++++++++++++------ 1 file changed, 82 insertions(+), 40 deletions(-) diff --git a/docs/technical-documentation/release-process/Release Process.md b/docs/technical-documentation/release-process/Release Process.md index 0eaf558..7f0668d 100644 --- a/docs/technical-documentation/release-process/Release Process.md +++ b/docs/technical-documentation/release-process/Release Process.md @@ -1,76 +1,118 @@ # Release Process -The release process for a new version can roughly be divided in the following steps: +The release process for a new version can roughly be divided into the following steps: -* Preparation -* Build of a versioned image -* Release of a new helm chart version -* Merge upstream to eclipse-tractusx +- [Preparations on the release branch](#preparations-on-the-release-branch) +- [Update CHANGELOG.md](#update-changelogmd) +- [Tag and build of versioned images](#tag-and-build-of-versioned-images) +- [Create releases from tags](#create-releases-from-tags) +- [Merge release branch](#merge-release-branch) +- [RC: provide successive RC branch and change base of open PRs](#rc-provide-successive-rc-branch-and-change-base-of-open-prs) -The process builds on the development flow which takes place within the forks from eclipse-tractusx, located in the catenax-ng organization. +The process builds on the development flow which, usually, takes place within forks and leads to merged pull pull requests in the repositories of the eclipse-tractusx organization. -## Preparation +For assigning and incrementing **version** numbers [Semantic Versioning](https://semver.org) is followed. -It's recommended to do step 1-3 in one preparatory pull request to main, or dev respectively. +## Preparations on the release branch -### 1. Update changelog file +Checking out from the dev branch (or main for portal-assets) a release branch (release/{to be released version} e.g. release/v1.2.0, or respectively release/v1.2.0-RC1 for a release candidate). +On the release branch the following steps are executed: -The changelog file tracks all notable changes since the last released version. -During development every developer should extend the changelog under the 'Unreleased' section when raising a pull request to main or dev. -Once a new version is ready to be released, the changelog of the version gets finalized and the release version gets set for the, up to then, unreleased changes. -In the released version, the changelog is structured as following: +### 1. Aggregate migrations + +Migrations should be **aggregated in the case of releasing a new version**, in order to not release the entire history of migrations which accumulate during the development process. + +Once a version has been released, migrations **mustn't be aggregated** in order to ensure upgradeability this also applies to **release candidates > RC1 and hotfixes**. +Be aware that migrations coming release branches for release candidates or from hotfix branches, will **need to be incorporated into dev and main**. -* Changes -* Features -* Technical Support -* Bug Fixes +### 2. Version bump -In case of breaking change, the breaking change will get highlighted with a breaking change tag => ![Tag](https://img.shields.io/static/v1?label=&message=BreakingChange&color=yellow&style=flat) +The version needs to be updated in the `src` directory within the 'Directory.Build.props' file. -### 2. Update dependencies file +Bump helm chart and image version (also for argocd-app-templates, needed for consortia-environments). -In order to have an up-to-date list, of the used third-party libraries, the dependencies file needs to be updated. +Example for commit message: -This can be done by running the following statement: +_release: bump version for vx.x.x_ + +### 3. Update README (on chart level) + +Use [helm-docs](https://github.com/norwoodj/helm-docs) (gotemplate driven) for updating the README file. ```bash -dotnet list src package --include-transitive > DEPENDENCIES-PREP -cat DEPENDENCIES-PREP | grep ">" | grep -Pv "\s(Org|Microsoft|NuGet|System|runtime|docker|Docker|NETStandard)" | sed -E -e "s/\s+> ([a-zA-Z\.\-]+).+\s([0-9]+\.[0-9]+\.[0-9]+)\s*/nuget\/nuget\/\-\/\1\/\2/g" > DEPENDENCIES -awk -i inplace '!seen[$0]++' DEPENDENCIES +helm-docs --chart-search-root [charts-dir] --sort-values-order file ``` -Only commit the updated dependencies file, not the 'DEPENDENCIES-PREP' file. +Example for commit message: + +_release: update readme for vx.x.x_ + +## Update CHANGELOG.md + +The changelog file tracks all notable changes since the last released version. +Once a new version is ready to be released, the changelog gets automatically created by triggering the [release-please workflow](../../../.github/workflows/release-please.yml). + +Please see: + +- [How release please works](https://github.com/google-github-actions/release-please-action/tree/v4.0.2?tab=readme-ov-file#how-release-please-works) +- [How do I change the version number?](https://github.com/googleapis/release-please/tree/v16.7.0?tab=readme-ov-file#how-do-i-change-the-version-number) +- [How can I fix release notes?](https://github.com/googleapis/release-please/tree/v16.7.0?tab=readme-ov-file#how-can-i-fix-release-notes) + +## Tag and build of versioned images -### 3. Version bump +It's important to pull the latest state of the release branch locally. +Then create and push a tag for the released version. +The push of the tag triggers the [release workflow](../../../.github/workflows/release.yml) which creates the versioned image/s. -To update the version please adjust the version in the `src` directory within the `Directory.Build.props` file. +Example for tag: -TODO (EG): we might add something here +_v0.1.0_ -### 4. Merge from dev into main branch +Examples for tag messages: -The merge from dev into main, via pull request, needs to happen before releasing. +_Version 0.1.0: Policy-Hub for the Catena-X_ -## Build of a versioned image +## Create releases from tags -It's important to pull the latest state from main of every repository. -Then a tag for the released version (e.g. v0.10.0) needs to be created and pushed. -The push of the tag triggers the release workflow action (available in every repository) which creates the versioned image/s. +Create the release from the tag available in repository. -## Release of a new helm chart version +Examples for release messages: -TODO (EG): depending on our process we need to add something here +_Version 0.1.0: Policy-Hub for the Catena-X_ -## Merge upstream to eclipse-tractusx +## Merge release branch -Once a new version has been released, it should be merged upstream to eclipse-tractusx and tagged. +The release branch must be is merged into main. +Afterwards, main into dev. +Those merges need to happen via PRs. + +Example for PR titles: + +_release(1.2.0): merge release into main_ + +_release(1.2.0): merge main to dev_ + +Be aware that merge into main trigger the workflow with the [helm-chart releaser](../../../.github/workflows/chart-release.yaml). + +Besides the official chart itself, there is also created a 'policy-hub-x.x.x' tag. +This tag is used to install (with the convenience of the argocd-app-templates) or upgrade the version via AgroCD on the consortia K8s clusters. + +## RC: provide successive RC branch and change base of open PRs + +During a release candidate phase, checkout the successive 'RC' branch and push it to the server, so that it can it used for further bugfixes. + +Example: + +```bash +git checkout tags/v0.1.0-RC2 -b release/v0.1.0-RC3 +``` -- https://github.com/eclipse-tractusx/policy-hub +Also make sure to change the base of all open pull requests still pointing to the previous 'RC' branch to the newly pushed 'RC' branch. ## NOTICE This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). - SPDX-License-Identifier: Apache-2.0 -- SPDX-FileCopyrightText: 2021-2023 Contributors to the Eclipse Foundation +- SPDX-FileCopyrightText: 2021-2024 Contributors to the Eclipse Foundation - Source URL: https://github.com/eclipse-tractusx/policy-hub From 870a5f229db671b767bcff455af0b21c2b3b09be Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Mon, 22 Jan 2024 20:10:02 +0100 Subject: [PATCH 15/15] chore: fix docs --- .../release-process/Release Process.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/technical-documentation/release-process/Release Process.md b/docs/technical-documentation/release-process/Release Process.md index 7f0668d..a2256d4 100644 --- a/docs/technical-documentation/release-process/Release Process.md +++ b/docs/technical-documentation/release-process/Release Process.md @@ -9,13 +9,13 @@ The release process for a new version can roughly be divided into the following - [Merge release branch](#merge-release-branch) - [RC: provide successive RC branch and change base of open PRs](#rc-provide-successive-rc-branch-and-change-base-of-open-prs) -The process builds on the development flow which, usually, takes place within forks and leads to merged pull pull requests in the repositories of the eclipse-tractusx organization. +The process builds on the development flow which, usually, takes place within forks and leads to merged pull requests in the repositories of the eclipse-tractusx organization. For assigning and incrementing **version** numbers [Semantic Versioning](https://semver.org) is followed. ## Preparations on the release branch -Checking out from the dev branch (or main for portal-assets) a release branch (release/{to be released version} e.g. release/v1.2.0, or respectively release/v1.2.0-RC1 for a release candidate). +Checking out from the dev branch a release branch (release/{to be released version} e.g. release/v1.2.0, or respectively release/v1.2.0-RC1 for a release candidate). On the release branch the following steps are executed: ### 1. Aggregate migrations @@ -70,7 +70,7 @@ _v0.1.0_ Examples for tag messages: -_Version 0.1.0: Policy-Hub for the Catena-X_ +_Version 0.1.0: Policy-Hub for Catena-X_ ## Create releases from tags @@ -78,11 +78,11 @@ Create the release from the tag available in repository. Examples for release messages: -_Version 0.1.0: Policy-Hub for the Catena-X_ +_Version 0.1.0: Policy-Hub for Catena-X_ ## Merge release branch -The release branch must be is merged into main. +The release branch must be merged into main. Afterwards, main into dev. Those merges need to happen via PRs. @@ -99,7 +99,7 @@ This tag is used to install (with the convenience of the argocd-app-templates) o ## RC: provide successive RC branch and change base of open PRs -During a release candidate phase, checkout the successive 'RC' branch and push it to the server, so that it can it used for further bugfixes. +During a release candidate phase, checkout the successive 'RC' branch and push it to the server, so that it can be used for further bugfixes. Example: