Skip to content

Commit

Permalink
refactor: rename git branches (#218)
Browse files Browse the repository at this point in the history
* refactor: update branch names and references in our documentation

* publish packages to tractus-x
  • Loading branch information
paullatzelsperger committed Apr 15, 2023
1 parent 406e137 commit da6afe0
Show file tree
Hide file tree
Showing 23 changed files with 77 additions and 73 deletions.
1 change: 1 addition & 0 deletions .github/actions/publish-docker-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ runs:
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{raw}}
type=match,pattern=\d.\d.\d
type=raw,value=latest,enable={{is_default_branch}}
type=sha
###############################
Expand Down
16 changes: 8 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ version: 2
updates:
# Maven
-
package-ecosystem: "maven"
target-branch: develop
package-ecosystem: "gradle"
target-branch: main
directory: /
labels:
- "dependabot"
Expand All @@ -15,7 +15,7 @@ updates:
# Github Actions
-
package-ecosystem: "github-actions"
target-branch: develop
target-branch: main
directory: /
labels:
- "dependabot"
Expand All @@ -26,7 +26,7 @@ updates:
# Docker
-
package-ecosystem: "docker"
target-branch: develop
target-branch: main
directory: ./edc-controlplane/edc-controlplane-postgresql-hashicorp-vault/src/main/docker/
labels:
- "dependabot"
Expand All @@ -35,7 +35,7 @@ updates:
interval: "daily"
-
package-ecosystem: "docker"
target-branch: develop
target-branch: main
directory: ./edc-controlplane/edc-controlplane-postgresql/src/main/docker/
labels:
- "dependabot"
Expand All @@ -44,7 +44,7 @@ updates:
interval: "daily"
-
package-ecosystem: "docker"
target-branch: develop
target-branch: main
directory: ./edc-controlplane/edc-controlplane-memory/src/main/docker/
labels:
- "dependabot"
Expand All @@ -53,7 +53,7 @@ updates:
interval: "daily"
-
package-ecosystem: "docker"
target-branch: develop
target-branch: main
directory: ./edc-dataplane/edc-dataplane-azure-vault/src/main/docker/
labels:
- "dependabot"
Expand All @@ -62,7 +62,7 @@ updates:
interval: "daily"
-
package-ecosystem: "docker"
target-branch: develop
target-branch: main
directory: ./edc-dataplane/edc-dataplane-hashicorp-vault/src/main/docker/
labels:
- "dependabot"
Expand Down
23 changes: 12 additions & 11 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ on:
push:
branches:
- main
- develop
- releases
tags:
- '[0-9]+.[0-9]+.[0-9]+'
release:
Expand All @@ -44,7 +44,8 @@ on:


concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# cancel only running jobs on pull requests
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -136,9 +137,9 @@ jobs:
packages: write
needs: [ secret-presence, build-controlplane, build-dataplane, build-extensions ]

# do not run on PR branches, do not run on main
# do not run on PR branches, do not run on releases
if: |
needs.secret-presence.outputs.GPG_PASSPHRASE && needs.secret-presence.outputs.GPG_PRIVATE_KEY && github.event_name != 'pull_request' && github.ref != 'refs/heads/main'
needs.secret-presence.outputs.GPG_PASSPHRASE && needs.secret-presence.outputs.GPG_PRIVATE_KEY && github.event_name != 'pull_request' && github.ref != 'refs/heads/releases'
steps:
# Set-Up
- name: Checkout
Expand All @@ -152,17 +153,17 @@ jobs:
cache: 'gradle'
- name: Import GPG Key
uses: crazy-max/ghaction-import-gpg@v5
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}

# publish snapshots
- name: Publish snapshot versions
run: |-
echo "Publishing Version $(grep -e "version" gradle.properties | cut -f2 -d"=") to Github Packages"
./gradlew publishAllPublicationsToGitHubPackagesRepository
env:
#REPO: ${{ github.repository }}
REPO: "catenax-ng/product-edc"
GITHUB_PACKAGE_USERNAME: ${{ secrets.TEMP_GHPKG_USER }}
GITHUB_PACKAGE_PASSWORD: ${{ secrets.TEMP_GHPKG_PASSWORD }}
REPO: ${{ github.repository }}
GITHUB_PACKAGE_USERNAME: ${{ github.actor }}
GITHUB_PACKAGE_PASSWORD: ${{ secrets.GITHUB_TOKEN }}

5 changes: 3 additions & 2 deletions .github/workflows/business-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@ on:
- 'docs/**'
- '**/*.md'
branches:
- develop
- releases
- release/**
- main
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# cancel only running jobs on pull requests
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/draft-new-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
head: release/${{ github.event.inputs.version }}
base: main
base: releases
title: Release version ${{ github.event.inputs.version }}
reviewers: ${{ github.actor }}
body: |-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/helm-chart-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:
paths:
- 'charts/**'
branches:
- main
- releases
workflow_dispatch:

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/helm-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
push:
branches:
- main
- develop
- releases
tags:
- '[0-9]+.[0-9]+.[0-9]+'
paths-ignore:
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
name: chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --config ct.yaml --target-branch develop)
changed=$(ct list-changed --config ct.yaml --target-branch main)
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/kics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: "KICS"

on:
push:
branches: [main, master, develop]
branches: [main, releases]
pull_request:
branches: [main, master, develop]
branches: [main, releases]
workflow_dispatch:

schedule:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/publish-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ on:
default: "tractusx"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# cancel only running jobs on pull requests
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
Expand Down
29 changes: 14 additions & 15 deletions .github/workflows/publish-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: "Publish new release"
on:
pull_request:
branches:
- main
- releases
- support/*
types:
- closed
Expand Down Expand Up @@ -67,18 +67,17 @@ jobs:
- name: Import GPG Key
uses: crazy-max/ghaction-import-gpg@v5
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}

- name: Publish release version
run: |
echo "Publishing Version $(grep -e "version" gradle.properties | cut -f2 -d"=") to Github Packages"
./gradlew publishAllPublicationsToGithubPackagesRepository
env:
#REPO: ${{ github.repository }}
REPO: "catenax-ng/product-edc"
GITHUB_PACKAGE_USERNAME: ${{ secrets.TEMP_GHPKG_USER }}
GITHUB_PACKAGE_PASSWORD: ${{ secrets.TEMP_GHPKG_PASSWORD }}
REPO: ${{ github.repository }}
GITHUB_PACKAGE_USERNAME: ${{ github.actor }}
GITHUB_PACKAGE_PASSWORD: ${{ secrets.GITHUB_TOKEN }}

# Release: Helm Charts
helm-release:
Expand Down Expand Up @@ -128,7 +127,7 @@ jobs:
git push origin gh-pages
# Release: GitHub tag & release; Merges back main into develop; Starts a new development cycle;
# Release: GitHub tag & release; Merges back releases into main; Starts a new development cycle;
github-release:
name: Publish new github release
needs: [ release-version ]
Expand All @@ -148,7 +147,7 @@ jobs:
name: Checkout
uses: actions/[email protected]
with:
# 0 to fetch the full history due to upcoming merge of main into develop branch
# 0 to fetch the full history due to upcoming merge of releases into main branch
fetch-depth: 0
-
name: Create Release Tag
Expand Down Expand Up @@ -185,15 +184,15 @@ jobs:
distribution: 'temurin'
cache: 'gradle'
-
name: Merge main back into develop and set new snapshot version
if: github.event.pull_request.base.ref == 'main'
name: Merge releases back into main and set new snapshot version
if: github.event.pull_request.base.ref == 'releases'
run: |
# Prepare git env
git config user.name "GitHub actions"
git config user.email [email protected]
# Merge main into develop
git checkout develop && git merge -X theirs main --no-commit --no-ff
# Merge releases into main
git checkout main && git merge -X theirs releases --no-commit --no-ff
# Extract release version
IFS=. read -r RELEASE_VERSION_MAJOR RELEASE_VERSION_MINOR RELEASE_VERSION_PATCH<<<"${{ env.RELEASE_VERSION }}"
Expand All @@ -204,8 +203,8 @@ jobs:
# Persist the "version" in the gradle.properties
sed -i "s/version=.*/version=$SNAPSHOT_VERSION/g" gradle.properties
# Commit and push to origin develop
# Commit and push to origin main
git add gradle.properties
git commit --message "Introduce new snapshot version $SNAPSHOT_VERSION"
git push origin develop
git push origin main
4 changes: 2 additions & 2 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
workflows: ["Build"]
branches:
- main
- develop
- releases
- release/*
- hotfix/*
tags:
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
if: always()
uses: aquasecurity/trivy-action@master
with:
image-ref: "ghcr.io/${{ github.repository }}/${{ matrix.image }}:sha-${{ needs.git-sha7.outputs.value }}"
image-ref: "tractusx/${{ matrix.image }}:sha-${{ needs.git-sha7.outputs.value }}"
format: "sarif"
output: "trivy-results-${{ matrix.image }}.sarif"
exit-code: "1"
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
push:
branches:
- main
- develop
- releases
tags:
- '[0-9]+.[0-9]+.[0-9]+'
release:
Expand All @@ -39,6 +39,7 @@ on:
workflow_dispatch:

concurrency:
# cancel older running jobs on the same branch
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ spec:
## DATA PLANE ##
################

# see extension https://github.com/eclipse-tractusx/tractusx-edc/tree/develop/edc-extensions/dataplane-selector-configuration
# see extension https://github.com/eclipse-tractusx/tractusx-edc/tree/main/edc-extensions/dataplane-selector-configuration
- name: "EDC_DATAPLANE_SELECTOR_DEFAULTPLANE_URL"
value: {{ include "txdc.dataplane.url.control" . }}/transfer
- name: "EDC_DATAPLANE_SELECTOR_DEFAULTPLANE_SOURCETYPES"
Expand Down Expand Up @@ -276,7 +276,7 @@ spec:
###########

{{- if .Values.vault.hashicorp.enabled }}
# see extension https://github.com/eclipse-tractusx/tractusx-edc/tree/develop/edc-extensions/hashicorp-vault
# see extension https://github.com/eclipse-tractusx/tractusx-edc/tree/main/edc-extensions/hashicorp-vault
- name: "EDC_VAULT_HASHICORP_URL"
value: {{ .Values.vault.hashicorp.url | required ".Values.vault.hashicorp.url is required" | quote }}
- name: "EDC_VAULT_HASHICORP_TOKEN"
Expand Down Expand Up @@ -317,7 +317,7 @@ spec:
## DATA ENCRYPTION ##
#####################

# see extension https://github.com/eclipse-tractusx/tractusx-edc/tree/develop/edc-extensions/data-encryption
# see extension https://github.com/eclipse-tractusx/tractusx-edc/tree/main/edc-extensions/data-encryption
- name: "EDC_DATA_ENCRYPTION_KEYS_ALIAS"
value: {{ .Values.vault.secretNames.transferProxyTokenEncryptionAesKey | quote }}
- name: "EDC_DATA_ENCRYPTION_ALGORITHM"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ spec:
###########

{{- if .Values.vault.hashicorp.enabled }}
# see extension https://github.com/eclipse-tractusx/tractusx-edc/tree/develop/edc-extensions/hashicorp-vault
# see extension https://github.com/eclipse-tractusx/tractusx-edc/tree/main/edc-extensions/hashicorp-vault
- name: "EDC_VAULT_HASHICORP_URL"
value: {{ .Values.vault.hashicorp.url | required ".Values.vault.hashicorp.url is required" | quote }}
- name: "EDC_VAULT_HASHICORP_TOKEN"
Expand Down
Loading

0 comments on commit da6afe0

Please sign in to comment.