From 52b3613db89ca8d52661b645b36a307fcbf4538c Mon Sep 17 00:00:00 2001 From: Evelyn Gurschler Date: Mon, 17 Jun 2024 18:07:41 +0200 Subject: [PATCH] chore(dev-flow): maintain latest changes in main branch (#177) get rid of the dev branch https://github.com/eclipse-tractusx/portal/issues/243 --- .github/dependabot.yml | 3 - .github/workflows/chart-test.yml | 2 +- .../credential-expiry-app-docker.yml | 4 +- .github/workflows/dependencies.yml | 2 +- .github/workflows/kics.yml | 2 +- .github/workflows/migrations-docker.yml | 6 +- .github/workflows/processes-worker-docker.yml | 4 +- .github/workflows/release.yml | 4 +- .github/workflows/service-docker.yml | 4 +- .github/workflows/sonarcloud.yml | 6 +- .../{trivy-dev.yml => trivy-main.yml} | 29 ++-- .github/workflows/trivy.yml | 21 ++- .github/workflows/unit.tests-formatting.yml | 4 +- DEPENDENCIES | 2 +- .../argocd-app-templates/appsetup-dev.yaml | 2 +- .../appsetup-upgrade.yaml | 38 ----- consortia/environments/values-dev.yaml | 8 +- .../dev-process/Dev-flow_deploy-dev-env.md | 2 +- .../dev-process/Dev-flow_git-diagram.md | 152 +++++------------- .../dev-process/How to contribute.md | 79 ++++----- .../release-process/Release Process.md | 9 +- 21 files changed, 139 insertions(+), 244 deletions(-) rename .github/workflows/{trivy-dev.yml => trivy-main.yml} (94%) delete mode 100644 consortia/argocd-app-templates/appsetup-upgrade.yaml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f1c70b06..b9434152 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -23,7 +23,6 @@ updates: # NuGet - package-ecosystem: "nuget" - target-branch: dev directory: / labels: - "dependabot" @@ -42,7 +41,6 @@ updates: # Github Actions - package-ecosystem: "github-actions" - target-branch: dev directory: / labels: - "dependabot" @@ -56,7 +54,6 @@ updates: # Docker - package-ecosystem: "docker" - target-branch: dev directory: ./docker/ labels: - "dependabot" diff --git a/.github/workflows/chart-test.yml b/.github/workflows/chart-test.yml index f84f1d32..5ef60cac 100644 --- a/.github/workflows/chart-test.yml +++ b/.github/workflows/chart-test.yml @@ -23,7 +23,7 @@ on: push: paths: - 'charts/ssi-credential-issuer/**' - branches: [main, dev, release-candidate] + branches: [main] pull_request: paths: - 'charts/ssi-credential-issuer/**' diff --git a/.github/workflows/credential-expiry-app-docker.yml b/.github/workflows/credential-expiry-app-docker.yml index db78b27c..84a28df1 100644 --- a/.github/workflows/credential-expiry-app-docker.yml +++ b/.github/workflows/credential-expiry-app-docker.yml @@ -30,7 +30,7 @@ on: - 'docker/Dockerfile-credential-expiry-app' branches: - - 'dev' + - 'main' workflow_dispatch: env: @@ -66,7 +66,7 @@ jobs: with: images: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }} tags: | - type=raw,value=dev + type=raw,value=main type=raw,value=${{ github.sha }} - name: Build and push Docker image diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index f9d4e5a0..aabc0c1a 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -21,7 +21,7 @@ name: Check Dependencies on: push: - branches: [main, dev] + branches: [main] pull_request: types: [opened, synchronize, reopened] workflow_dispatch: diff --git a/.github/workflows/kics.yml b/.github/workflows/kics.yml index 6af04cbc..cb588c13 100644 --- a/.github/workflows/kics.yml +++ b/.github/workflows/kics.yml @@ -21,7 +21,7 @@ name: "KICS" on: push: - branches: [main, dev] + branches: [main] # pull_request: # The branches below must be a subset of the branches above # branches: [main, dev] diff --git a/.github/workflows/migrations-docker.yml b/.github/workflows/migrations-docker.yml index 1ee07010..c480b46a 100644 --- a/.github/workflows/migrations-docker.yml +++ b/.github/workflows/migrations-docker.yml @@ -19,7 +19,7 @@ name: Build Migrations Image -on: +on: push: paths: # service and transitive paths @@ -31,7 +31,7 @@ on: - 'docker/Dockerfile-credential-issuer-migrations' branches: - - 'dev' + - 'main' workflow_dispatch: env: @@ -67,7 +67,7 @@ jobs: with: images: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }} tags: | - type=raw,value=dev + type=raw,value=main type=raw,value=${{ github.sha }} - name: Build and push Docker image diff --git a/.github/workflows/processes-worker-docker.yml b/.github/workflows/processes-worker-docker.yml index 13bb638b..f59c9288 100644 --- a/.github/workflows/processes-worker-docker.yml +++ b/.github/workflows/processes-worker-docker.yml @@ -30,7 +30,7 @@ on: - 'docker/Dockerfile-credential-issuer-processes-worker' branches: - - 'dev' + - 'main' workflow_dispatch: env: @@ -66,7 +66,7 @@ jobs: with: images: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }} tags: | - type=raw,value=dev + type=raw,value=main type=raw,value=${{ github.sha }} - name: Build and push Docker image diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5cff5c07..465e3ad0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,9 @@ on: paths: - 'charts/**' branches: - - main + - 'main' + - 'release/v*.*.*' + jobs: release-helm-chart: diff --git a/.github/workflows/service-docker.yml b/.github/workflows/service-docker.yml index 409190e1..81748f4b 100644 --- a/.github/workflows/service-docker.yml +++ b/.github/workflows/service-docker.yml @@ -30,7 +30,7 @@ on: - 'docker/Dockerfile-credential-issuer-service' branches: - - 'dev' + - 'main' workflow_dispatch: env: @@ -66,7 +66,7 @@ jobs: with: images: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }} tags: | - type=raw,value=dev + type=raw,value=main type=raw,value=${{ github.sha }} - name: Build and push Docker image diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index da6edae3..22910322 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -20,7 +20,7 @@ name: Sonarcloud on: push: - branches: [main, dev] + branches: [main] paths: - 'src/**' pull_request: @@ -48,14 +48,14 @@ jobs: with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - name: Cache SonarCloud packages - uses: actions/cache@v4 + uses: actions/cache@c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 with: path: ~/sonar/cache key: ${{ runner.os }}-sonar restore-keys: ${{ runner.os }}-sonar - name: Cache SonarCloud scanner id: cache-sonar-scanner - uses: actions/cache@v4 + uses: actions/cache@c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 with: path: ./.sonar/scanner key: ${{ runner.os }}-sonar-scanner diff --git a/.github/workflows/trivy-dev.yml b/.github/workflows/trivy-main.yml similarity index 94% rename from .github/workflows/trivy-dev.yml rename to .github/workflows/trivy-main.yml index 18ae888e..de7a441c 100644 --- a/.github/workflows/trivy-dev.yml +++ b/.github/workflows/trivy-main.yml @@ -20,11 +20,11 @@ # Depending on the location of your Docker container # you need to change the path to the specific Docker registry. # -name: "Trivy Dev" +name: "Trivy Main" on: push: - branches: [ dev ] + branches: [main] # pull_request: # The branches below must be a subset of the branches above # branches: [ main, master ] @@ -89,16 +89,16 @@ jobs: uses: aquasecurity/trivy-action@b2933f565dbc598b29947660e66259e3c7bc8561 # v0.20.0 with: # Path to Docker image - image-ref: "${{ env.IMAGE_NAMESPACE }}/ssi-credential-issuer-service:dev" + image-ref: "${{ env.IMAGE_NAMESPACE }}/ssi-credential-issuer-service:main" format: "sarif" - output: "trivy-results3.sarif" + output: "trivy-results2.sarif" vuln-type: "os,library" - name: Upload Trivy scan results to GitHub Security tab if: always() uses: github/codeql-action/upload-sarif@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3.25.5 with: - sarif_file: "trivy-results3.sarif" + sarif_file: "trivy-results2.sarif" analyze-ssi-credential-issuer-migrations: runs-on: ubuntu-latest @@ -121,9 +121,9 @@ jobs: uses: aquasecurity/trivy-action@b2933f565dbc598b29947660e66259e3c7bc8561 # v0.20.0 with: # Path to Docker image - image-ref: "${{ env.IMAGE_NAMESPACE }}/ssi-credential-issuer-migrations:dev" + image-ref: "${{ env.IMAGE_NAMESPACE }}/ssi-credential-issuer-migrations:main" format: "sarif" - output: "trivy-results9.sarif" + output: "trivy-results3.sarif" vuln-type: "os,library" skip-dirs: "docs/" @@ -131,7 +131,7 @@ jobs: if: always() uses: github/codeql-action/upload-sarif@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3.25.5 with: - sarif_file: "trivy-results9.sarif" + sarif_file: "trivy-results3.sarif" analyze-ssi-credential-expiry-app: runs-on: ubuntu-latest @@ -154,9 +154,9 @@ jobs: uses: aquasecurity/trivy-action@b2933f565dbc598b29947660e66259e3c7bc8561 # v0.20.0 with: # Path to Docker image - image-ref: "${{ env.IMAGE_NAMESPACE }}/ssi-credential-expiry-app:dev" + image-ref: "${{ env.IMAGE_NAMESPACE }}/ssi-credential-expiry-app:main" format: "sarif" - output: "trivy-results9.sarif" + output: "trivy-results4.sarif" vuln-type: "os,library" skip-dirs: "docs/" @@ -164,7 +164,7 @@ jobs: if: always() uses: github/codeql-action/upload-sarif@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3.25.5 with: - sarif_file: "trivy-results9.sarif" + sarif_file: "trivy-results4.sarif" analyze-ssi-credential-issuer-processes-worker: runs-on: ubuntu-latest @@ -187,9 +187,9 @@ jobs: uses: aquasecurity/trivy-action@b2933f565dbc598b29947660e66259e3c7bc8561 # v0.20.0 with: # Path to Docker image - image-ref: "${{ env.IMAGE_NAMESPACE }}/ssi-credential-issuer-processes-worker:dev" + image-ref: "${{ env.IMAGE_NAMESPACE }}/ssi-credential-issuer-processes-worker:main" format: "sarif" - output: "trivy-results9.sarif" + output: "trivy-results5.sarif" vuln-type: "os,library" skip-dirs: "docs/" @@ -197,5 +197,4 @@ jobs: if: always() uses: github/codeql-action/upload-sarif@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3.25.5 with: - sarif_file: "trivy-results9.sarif" - \ No newline at end of file + sarif_file: "trivy-results5.sarif" diff --git a/.github/workflows/trivy.yml b/.github/workflows/trivy.yml index ffa039a0..f63af7ed 100644 --- a/.github/workflows/trivy.yml +++ b/.github/workflows/trivy.yml @@ -24,7 +24,7 @@ name: "Trivy Stable" on: push: - branches: [ main ] + branches: [main] # pull_request: # The branches below must be a subset of the branches above # branches: [ main, master ] @@ -92,14 +92,14 @@ jobs: # Path to Docker image image-ref: "${{ env.IMAGE_NAMESPACE }}/ssi-credential-issuer-service:latest" format: "sarif" - output: "trivy-results3.sarif" + output: "trivy-results2.sarif" vuln-type: "os,library" - name: Upload Trivy scan results to GitHub Security tab if: always() uses: github/codeql-action/upload-sarif@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3.25.5 with: - sarif_file: "trivy-results3.sarif" + sarif_file: "trivy-results2.sarif" analyze-ssi-credential-issuer-migrations: runs-on: ubuntu-latest @@ -124,14 +124,14 @@ jobs: # Path to Docker image image-ref: "${{ env.IMAGE_NAMESPACE }}/ssi-credential-issuer-migrations:latest" format: "sarif" - output: "trivy-results9.sarif" + output: "trivy-results3.sarif" vuln-type: "os,library" - name: Upload Trivy scan results to GitHub Security tab if: always() uses: github/codeql-action/upload-sarif@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3.25.5 with: - sarif_file: "trivy-results9.sarif" + sarif_file: "trivy-results3.sarif" analyze-ssi-credential-expiry-app: runs-on: ubuntu-latest @@ -156,15 +156,15 @@ jobs: # Path to Docker image image-ref: "${{ env.IMAGE_NAMESPACE }}/ssi-credential-expiry-app:latest" format: "sarif" - output: "trivy-results9.sarif" + output: "trivy-results4.sarif" vuln-type: "os,library" - name: Upload Trivy scan results to GitHub Security tab if: always() uses: github/codeql-action/upload-sarif@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3.25.5 with: - sarif_file: "trivy-results9.sarif" - + sarif_file: "trivy-results4.sarif" + analyze-ssi-credential-issuer-processes-worker: runs-on: ubuntu-latest permissions: @@ -188,12 +188,11 @@ jobs: # Path to Docker image image-ref: "${{ env.IMAGE_NAMESPACE }}/ssi-credential-issuer-processes-worker:latest" format: "sarif" - output: "trivy-results9.sarif" + output: "trivy-results5.sarif" vuln-type: "os,library" - name: Upload Trivy scan results to GitHub Security tab if: always() uses: github/codeql-action/upload-sarif@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3.25.5 with: - sarif_file: "trivy-results9.sarif" - \ No newline at end of file + sarif_file: "trivy-results5.sarif" diff --git a/.github/workflows/unit.tests-formatting.yml b/.github/workflows/unit.tests-formatting.yml index 8d2e8aa6..e1e71600 100644 --- a/.github/workflows/unit.tests-formatting.yml +++ b/.github/workflows/unit.tests-formatting.yml @@ -21,7 +21,7 @@ name: Unit-Tests and Formatting on: push: - branches: [main, dev] + branches: [main] paths: - 'src/**' pull_request: @@ -39,7 +39,7 @@ jobs: dotnet-version: ['8.0'] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Setup .NET Core SDK ${{ matrix.dotnet-version }} uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0 with: diff --git a/DEPENDENCIES b/DEPENDENCIES index 916f294e..f30dc2a4 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -7,7 +7,7 @@ nuget/nuget/-/Fare/2.1.1, MIT, approved, clearlydefined nuget/nuget/-/FluentAssertions/6.11.0, Apache-2.0 AND MIT, approved, #10061 nuget/nuget/-/Flurl.Signed/3.0.6, MIT, approved, #3501 nuget/nuget/-/Humanizer.Core/2.14.1, MIT, approved, #10060 -nuget/nuget/-/Json.More.Net/2.0.0, MIT, approved, clearlydefined +nuget/nuget/-/Json.More.Net/2.0.0, MIT AND OFL-1.1 AND CC-BY-SA-4.0, approved, #15173 nuget/nuget/-/JsonPointer.Net/4.0.0, MIT, approved, clearlydefined nuget/nuget/-/JsonSchema.Net/6.1.2, MIT AND OFL-1.1 AND CC-BY-SA-4.0, approved, #14591 nuget/nuget/-/Laraue.EfCoreTriggers.Common/8.0.3, MIT, approved, #13968 diff --git a/consortia/argocd-app-templates/appsetup-dev.yaml b/consortia/argocd-app-templates/appsetup-dev.yaml index 26edc4fa..ae606d6a 100644 --- a/consortia/argocd-app-templates/appsetup-dev.yaml +++ b/consortia/argocd-app-templates/appsetup-dev.yaml @@ -28,7 +28,7 @@ spec: source: path: charts/ssi-credential-issuer repoURL: 'https://github.com/eclipse-tractusx/ssi-credential-issuer.git' - targetRevision: dev + targetRevision: main plugin: env: - name: AVP_SECRET diff --git a/consortia/argocd-app-templates/appsetup-upgrade.yaml b/consortia/argocd-app-templates/appsetup-upgrade.yaml deleted file mode 100644 index 1b6c83fd..00000000 --- a/consortia/argocd-app-templates/appsetup-upgrade.yaml +++ /dev/null @@ -1,38 +0,0 @@ -############################################################### -# Copyright (c) 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 -############################################################### - -apiVersion: argoproj.io/v1alpha1 -kind: Application -metadata: - name: ssi-credential-issuer -spec: - destination: - namespace: product-portal - server: 'https://kubernetes.default.svc' - source: - path: charts/ssi-credential-issuer - repoURL: 'https://github.com/eclipse-tractusx/ssi-credential-issuer.git' - targetRevision: ssi-credential-issuer-1.0.0 - plugin: - env: - - name: AVP_SECRET - value: vault-secret - - name: helm_args - value: '-f values.yaml -f ../../consortia/environments/values-upgrade.yaml' - project: project-portal diff --git a/consortia/environments/values-dev.yaml b/consortia/environments/values-dev.yaml index 76741e77..0e38bfcd 100644 --- a/consortia/environments/values-dev.yaml +++ b/consortia/environments/values-dev.yaml @@ -43,7 +43,7 @@ ingress: issuer: image: - tag: "dev" + tag: "main" imagePullPolicy: "Always" swaggerEnabled: true credential: @@ -59,7 +59,7 @@ issuer: issuermigrations: image: - tag: "dev" + tag: "main" imagePullPolicy: "Always" logging: default: "Debug" @@ -68,7 +68,7 @@ issuermigrations: processesworker: image: - tag: "dev" + tag: "main" imagePullPolicy: "Always" logging: default: "Debug" @@ -84,7 +84,7 @@ processesworker: credentialExpiry: image: - tag: "dev" + tag: "main" imagePullPolicy: "Always" logging: default: "Debug" diff --git a/docs/technical-documentation/dev-process/Dev-flow_deploy-dev-env.md b/docs/technical-documentation/dev-process/Dev-flow_deploy-dev-env.md index 4bae9934..a41e4177 100644 --- a/docs/technical-documentation/dev-process/Dev-flow_deploy-dev-env.md +++ b/docs/technical-documentation/dev-process/Dev-flow_deploy-dev-env.md @@ -7,7 +7,7 @@ flowchart LR end subgraph eclipse-tractusx direction LR - D -- PR* to dev*--> SCI(ssi-credential-issuer**) + D -- PR* to main*--> SCI(ssi-credential-issuer**) click SCI "https://github.com/eclipse-tractusx/ssi-credential-issuer" end subgraph Argo CD - sync to k8s cluster diff --git a/docs/technical-documentation/dev-process/Dev-flow_git-diagram.md b/docs/technical-documentation/dev-process/Dev-flow_git-diagram.md index 3389eb43..a514fe5a 100644 --- a/docs/technical-documentation/dev-process/Dev-flow_git-diagram.md +++ b/docs/technical-documentation/dev-process/Dev-flow_git-diagram.md @@ -3,125 +3,61 @@ ```mermaid %%{init: { 'logLevel': 'debug', 'theme': 'base' } }%% gitGraph - commit id: "release: v1.0.0" tag:"1.0.0" - branch dev order: 1 - checkout dev - branch feature/feature1 order: 2 - commit id:"feat(function): add feature1" - checkout dev - branch bug/bug1 order: 3 - commit id: "fix(function): change bug1" - checkout dev - branch feature/feature2 order: 4 - commit id:"feat(function)!: enable feature2" - checkout bug/bug1 - commit id:"fix(function): refactor bug1" - checkout dev - merge bug/bug1 - checkout dev - branch feature/feature3 order: 5 - commit id:"feat(function): wip - enable feature3" - checkout dev - checkout feature/feature3 - commit id: "feat(function): enable feature3" - checkout dev - merge feature/feature3 + commit id: "chore: initial commit" + branch feature/feature1 order: 1 checkout feature/feature1 - commit id:"feat(function): enable feature1" - checkout dev + commit id:"feat(function): add feature1" + checkout main merge feature/feature1 - branch release/1.1.0 order: 6 - commit id: "release(1.1.0): aggregate migrations (backend)" - commit id: "release(1.1.0): update version, changelog..." tag: "1.1.0" + branch feature/feature2 order: 3 + checkout feature/feature2 + commit id:"feat(function)!: WIP enable feature2" + checkout main + branch bug/bug1 order: 2 + commit id: "fix(function): change bug1" checkout main - merge release/1.1.0 id: "1. merge into main" - checkout dev - merge main id: "2. merge main into dev" - checkout dev - branch feature/feature4 order: 7 - commit id: "feat(function): add feature4" + merge bug/bug1 checkout feature/feature2 - commit id: "feat(function)!: change feature2" - checkout dev + commit id:"feat(function)!: finalize feature2" + checkout main merge feature/feature2 - checkout feature/feature4 - commit id: "feat(function): change feature4" - checkout dev - merge feature/feature4 - branch release/1.2.0 order: 8 - commit id: "release(1.2.0-rc.1): prepare migration (backend)" - commit id: "release(1.2.0-rc.1): update version, changelog..." tag: "1.2.0-rc.1" + branch feature/feature3 order: 4 + commit id:"feat(function)!: WIP enable feature3" checkout main - merge release/1.2.0 - checkout dev - merge main - checkout release/1.2.0 - branch bug/bug2 order: 9 - commit id:"fix(function): change1 bug2" - checkout release/1.2.0 - branch bug/bug3 order: 10 - commit id:"fix(function): change bug3" - checkout release/1.2.0 - merge bug/bug3 - merge dev - checkout dev - branch feature/feature5 order: 11 - commit id: "feat(function): add feature5" + branch release/v1.0.0-rc.1 order: 5 + commit id: "build(v1.0.0-rc.1): bump version" tag: "v1.0.0-rc.1" + checkout main + merge release/v1.0.0-rc.1 + checkout release/v1.0.0-rc.1 + branch bug/bug2 order: 7 checkout bug/bug2 - commit id:"fix(function): change2 bug2" - checkout release/1.2.0 + commit id: "fix(function): change bug2" + checkout release/v1.0.0-rc.1 + branch release/v1.0.0-rc.2 order: 8 + checkout release/v1.0.0-rc.2 merge bug/bug2 - commit id: "release(1.2.0-rc.2): update version, changelog..." tag: "1.2.0-rc.2" + commit id: "build(v1.0.0-rc.2): bump version" tag: "v1.0.0-rc.2" checkout main - merge release/1.2.0 - checkout dev - merge main - checkout dev - branch feature/feature6 order: 12 - commit id: "feat(function): add feature for 1.4.0" - checkout feature/feature5 - commit id: "feat(function): change feature5" - checkout dev - merge feature/feature5 - branch release/1.3.0 order: 13 - commit id: "release(1.3.0): aggregate migrations (backend)" - commit id: "release(1.3.0): update version, changelog..." tag: "1.3.0" - checkout main - merge release/1.3.0 - checkout dev - merge main - checkout feature/feature6 - commit id: "feat(function): change feature for 1.4.0" - merge dev - checkout release/1.2.0 - branch bug/bug4 order: 14 - commit id:"fix(function): change1 bug4" - commit id:"fix(function): change2 bug4" - checkout release/1.2.0 - merge bug/bug4 - commit id: "release(1.2.0): update version, changelog..." tag: "1.2.0" + merge release/v1.0.0-rc.2 + checkout feature/feature3 + commit id:"feat(function)!: finalize feature3" checkout main - merge release/1.2.0 - checkout dev - merge main - checkout release/1.2.0 - branch hotfix/1.2.1 order: 15 - branch bug/bug5 order: 16 - commit id:"fix(function): change1 bug5" - checkout hotfix/1.2.1 - branch bug/bug6 order: 17 - commit id:"fix(function): change bug6" - checkout hotfix/1.2.1 - merge bug/bug6 - checkout bug/bug5 - commit id:"fix(function): change2 bug5" - checkout hotfix/1.2.1 - merge bug/bug5 - commit id: "hotfix(1.2.1): update version, changelog..." tag: "1.2.1" + merge feature/feature3 + checkout release/v1.0.0-rc.2 + branch release/v1.0.0 order: 8 + checkout release/v1.0.0 + commit id: "build(v1.0.0): bump version" tag: "v1.0.0" checkout main - merge hotfix/1.2.1 - checkout dev - merge main + merge release/v1.0.0 + checkout release/v1.0.0 + branch hotfix/v1.0.1 order: 9 + checkout hotfix/v1.0.1 + branch bug/bug3 order: 10 + checkout bug/bug3 + commit id: "fix(function): change bug3" + checkout hotfix/v1.0.1 + merge bug/bug3 + commit id: "build(v1.0.1): bump version" tag: "v1.0.1" ``` ## NOTICE diff --git a/docs/technical-documentation/dev-process/How to contribute.md b/docs/technical-documentation/dev-process/How to contribute.md index abdc91a4..fff04311 100644 --- a/docs/technical-documentation/dev-process/How to contribute.md +++ b/docs/technical-documentation/dev-process/How to contribute.md @@ -1,107 +1,110 @@ # Contribution details -To contribute to the ssi credential issuer as part of the open source community, please read the details defined below. +To contribute to the SSI Credential Issuer as part of the open source community, please read the details defined below. Besides a generic "how to", some commit and pull request (PR) guidelines are defined to ensure readability and make newly created PRs easier to review. Additionally, changelogs can get validated as well as written with more ease. Moreover, similar patterns are in use across the contributor community. **Content**: - [Commit How To](#how-to-contribute) -- [Commit and PR guidelines](#commit-and-pr-guidelines) +- [Commits, branches and pull requests guidelines](#commits-branches-and-pull-requests-guidelines) ## How To Contribute ### 1 Create a fork -Open github - "eclipse-tractusx" project and select the respective repository to which you want to contribute. +Open [GitHub - "eclipse-tractusx" project](https://github.com/eclipse-tractusx) and select the respective repository to which you want to contribute. [Create a fork of the respective repo](https://docs.github.com/en/get-started/quickstart/fork-a-repo). ### 2 Fork setup -Setup your fork by entering a name and make sure that you unselect the "main branch only" selection, in case the original repository has a dev and a main branch. +Setup your fork by entering a name and make sure that you unselect the "main branch only" selection, in case the upstream repository maintains release branches besides the main branch. -Click "Create fork" +Click "Create fork". ### 3 Commit With the newly created fork, you can now start to contribute. Create a new branch in your own fork and start to implement the planned changes or new features. -When the implementation is ready, create a PR against the original repository. +When the implementation is ready, create a PR against the upstream repository. The PR will get reviewed by the repository owners/official committers. -As part of the pr review, sonarcloud will run automatically, and unit tests (if configured) will get executed. The PR owner is responsible to check the results and fix possible findings. +As part of the PR review, checks will run automatically, and unit tests (if configured) will get executed. The PR owner is responsible to check the results and fix possible findings. -## Commit and PR guidelines +## Commits, branches and pull requests guidelines -### Commits +### Commits and branches The suggestion is to use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). -Here are some examples +Here are some examples: -Feature branch: +#### Feature branch ```mermaid %%{init: { 'logLevel': 'debug', 'theme': 'base' } }%% gitGraph - commit id: "release(1.0.0): merge in main" - branch dev order: 1 - checkout dev + commit id: "chore: initial commit" branch feature/feature1 order: 2 commit id:"feat(function): add feature1" commit id:"feat(function): enable feature1" + checkout main + merge feature/feature1 ``` -Bugfix branch: +#### Bugfix branch ```mermaid %%{init: { 'logLevel': 'debug', 'theme': 'base' } }%% gitGraph - commit id: "release(1.0.0): merge in main" - branch dev order: 1 - checkout dev - branch bug/bug1 order: 3 - commit id: "fix(function): change bug1" + commit id: "build(v0.1.0): merge in main" + branch bug/bug1 order: 2 + commit id: "fix(function): change bug" checkout bug/bug1 - commit id:"fix(function): refactor bug1" + commit id:"fix(function): refactor bug" + checkout main + merge bug/bug1 ``` -Release branch: +#### Release branch ```mermaid %%{init: { 'logLevel': 'debug', 'theme': 'base' } }%% gitGraph - commit id: "release: v1.0.0" - branch dev order: 1 - checkout dev - branch release/1.1.0 order: 2 - commit id: "release(1.1.0): aggregate migrations (backend)" - commit id: "release(1.1.0): update version, changelog..." tag: "1.1.0" + commit id: "build(v0.1.0): merge in main" + branch release/v1.0.0 order: 2 + commit id: "build(v1.0.0): bump version, changelog..." tag: "v1.0.0" + checkout main + merge release/v1.0.0 ``` -Hotfix branch: +#### Hotfix branch ```mermaid %%{init: { 'logLevel': 'debug', 'theme': 'base' } }%% gitGraph commit id: "release: v1.0.0" - branch dev order: 1 - checkout dev - branch release/1.1.0 order: 2 - commit id: "release(1.1.0): aggregate migrations (backend)" - commit id: "release(1.1.0): update version, changelog..." tag: "1.1.0" - checkout release/1.1.0 - branch hotfix/1.1.1 order: 3 - commit id: "hotfix(1.1.1): update version, changelog..." tag: "1.1.1" + branch release/v1.0.0 order: 2 + commit id: "build(v1.0.0): bump version, changelog..." tag: "v1.0.0" + checkout main + merge release/v1.0.0 + checkout release/v1.0.0 + branch hotfix/v1.0.1 order: 3 + checkout hotfix/v1.0.1 + commit id: "hotfix(v1.0.1): bump version, changelog..." tag: "v1.0.1" ``` ### PR title -The suggested naming convention is '{type}{(function)}: {short summary}' +The suggested naming convention is '{type}{(function)}: {short summary}'. ### PR description Add details to the change, fix or feature in the PR description. What was changed, why was it changed (e.g. which issue was fixed or which requirement was implemented), and how was it changed. +### Additional information + +Please refer to the [Development Flow](./Dev-flow_git-diagram.md). + ## NOTICE This work is licensed under the [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0). diff --git a/docs/technical-documentation/release-process/Release Process.md b/docs/technical-documentation/release-process/Release Process.md index 82f49aee..f21d8e73 100644 --- a/docs/technical-documentation/release-process/Release Process.md +++ b/docs/technical-documentation/release-process/Release Process.md @@ -11,13 +11,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 requests in the repositories of the eclipse-tractusx organization. +The process builds on the [Development Flow](../dev-process/Dev-flow_git-diagram.md) 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 a release branch (release/{to be released version} e.g. release/v1.2.0, or respectively release/v1.2.0-rc.1 for a release candidate). +Checking out from the main branch a release branch (release/{to be released version} e.g. release/v1.2.0, or respectively release/v1.2.0-rc.1 for a release candidate). On the release branch the following steps are executed: ### 1. Aggregate migrations @@ -25,7 +25,7 @@ On the release branch the following steps are executed: 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 > rc.1 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**. +Be aware that migrations coming release branches for release candidates or from hotfix branches, will **need to be incorporated into main**. ### 2. Version bump @@ -65,15 +65,12 @@ Please see: ## Merge release branch The release branch must be merged into main. -Afterwards, main into dev. Those merges need to happen via PRs. Example for PR titles: _build(1.2.0): merge release into main_ -_build(1.2.0): merge main to dev_ - > Be aware that the merge into main triggers the workflow with the [helm-chart releaser action](../../../.github/workflows/chart-release.yaml). > > The workflow creates a 'ssi-credential-issuer-x.x.x' tag and release. The release contains the new chart.