-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from paullatzelsperger/release/0.5.0-test1
Release version 0.5.0-test1
- Loading branch information
Showing
20 changed files
with
178 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,56 +38,46 @@ jobs: | |
pull-requests: write | ||
steps: | ||
- uses: actions/[email protected] | ||
- | ||
name: Create release branch | ||
- name: Create release branch | ||
run: git checkout -b release/${{ github.event.inputs.version }} | ||
- | ||
name: Update changelog | ||
- name: Update changelog | ||
uses: thomaseizinger/[email protected] | ||
with: | ||
tag: ${{ github.event.inputs.version }} | ||
- | ||
name: Initialize mandatory git config | ||
- name: Initialize mandatory git config | ||
run: | | ||
git config user.name "eclipse-tractusx-bot" | ||
git config user.email "[email protected]" | ||
- | ||
uses: ./.github/actions/setup-java | ||
- | ||
name: Bump version in gradle.properties | ||
- uses: ./.github/actions/setup-java | ||
- name: Bump version in gradle.properties | ||
run: |- | ||
# replace the project's (default) version, could be overwritten later with the -Pversion=... flag | ||
sed -i 's/version=.*/version=${{ github.event.inputs.version }}/g' gradle.properties | ||
# replace the project's (default) version, could be overwritten later with the -Pversion=... flag | ||
sed -i 's/version=.*/version=${{ github.event.inputs.version }}/g' gradle.properties | ||
env: | ||
GITHUB_PACKAGE_USERNAME: ${{ github.actor }} | ||
GITHUB_PACKAGE_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | ||
- | ||
name: Bump version in /charts | ||
- name: Bump version in /charts | ||
uses: mikefarah/[email protected] | ||
with: | ||
cmd: |- | ||
find charts -name Chart.yaml -maxdepth 3 | xargs -n1 yq -i '.appVersion = "${{ github.event.inputs.version }}" | .version = "${{ github.event.inputs.version }}"' | ||
- | ||
name: Update Chart READMEs | ||
- name: Update Chart READMEs | ||
uses: addnab/docker-run-action@v3 | ||
with: | ||
image: jnorwood/helm-docs:v1.10.0 | ||
options: -v ${{ github.workspace }}/charts:/helm-docs | ||
run: | | ||
helm-docs --log-level debug | ||
- | ||
name: Commit changelog and manifest files | ||
- name: Commit changelog and manifest files | ||
id: make-commit | ||
run: | | ||
git add CHANGELOG.md gradle.properties $(find charts -name Chart.yaml) $(find charts -name README.md) | ||
git commit --message "Prepare release ${{ github.event.inputs.version }}" | ||
echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT | ||
- | ||
name: Push new branch | ||
- name: Push new branch | ||
run: git push origin release/${{ github.event.inputs.version }} | ||
- | ||
name: Create pull request | ||
- name: Create pull request | ||
uses: thomaseizinger/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,41 +41,35 @@ jobs: | |
helm-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
############## | ||
### Set-Up ### | ||
############## | ||
- | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
- | ||
name: helm (setup) | ||
uses: azure/[email protected] | ||
with: | ||
version: v3.8.1 | ||
- | ||
name: python (setup) | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.7 | ||
- | ||
name: chart-testing (setup) | ||
uses: helm/[email protected] | ||
##################### | ||
### Chart Testing ### | ||
##################### | ||
- | ||
name: chart-testing (list-changed) | ||
id: list-changed | ||
run: | | ||
changed=$(ct list-changed --config ct.yaml --target-branch main) | ||
if [[ -n "$changed" ]]; then | ||
echo "changed=true" >> $GITHUB_OUTPUT | ||
fi | ||
- | ||
name: chart-testing (lint) | ||
if: steps.list-changed.outputs.changed == 'true' | ||
run: | | ||
ct lint \ | ||
--config ct.yaml \ | ||
--all | ||
############## | ||
### Set-Up ### | ||
############## | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
- name: helm (setup) | ||
uses: azure/[email protected] | ||
with: | ||
version: v3.8.1 | ||
- name: python (setup) | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.7 | ||
- name: chart-testing (setup) | ||
uses: helm/[email protected] | ||
##################### | ||
### Chart Testing ### | ||
##################### | ||
- name: chart-testing (list-changed) | ||
id: list-changed | ||
run: | | ||
changed=$(ct list-changed --config ct.yaml --target-branch main) | ||
if [[ -n "$changed" ]]; then | ||
echo "changed=true" >> $GITHUB_OUTPUT | ||
fi | ||
- name: chart-testing (lint) | ||
if: steps.list-changed.outputs.changed == 'true' | ||
run: | | ||
ct lint \ | ||
--config ct.yaml \ | ||
--all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,24 +36,21 @@ jobs: | |
outputs: | ||
RELEASE_VERSION: ${{ steps.release-version.outputs.RELEASE_VERSION }} | ||
steps: | ||
- | ||
name: Extract version from branch name (for release branches) | ||
- name: Extract version from branch name (for release branches) | ||
if: startsWith(github.event.pull_request.head.ref, 'release/') | ||
run: | | ||
BRANCH_NAME="${{ github.event.pull_request.head.ref }}" | ||
VERSION=${BRANCH_NAME#release/} | ||
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV | ||
- | ||
name: Extract version from branch name (for hotfix branches) | ||
- name: Extract version from branch name (for hotfix branches) | ||
if: startsWith(github.event.pull_request.head.ref, 'hotfix/') | ||
run: | | ||
BRANCH_NAME="${{ github.event.pull_request.head.ref }}" | ||
VERSION=${BRANCH_NAME#hotfix/} | ||
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV | ||
- | ||
name: Output release version | ||
- name: Output release version | ||
id: release-version | ||
run: | | ||
echo "RELEASE_VERSION=${{ env.RELEASE_VERSION }}" >> $GITHUB_OUTPUT | ||
|
@@ -62,6 +59,8 @@ jobs: | |
maven-release: | ||
name: Publish extension's release version to maven repository | ||
needs: [ release-version ] | ||
# TODO: remove | ||
continue-on-error: true | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
|
@@ -94,6 +93,8 @@ jobs: | |
docker-release: | ||
name: Publish Docker images | ||
runs-on: ubuntu-latest | ||
# TODO: remove | ||
continue-on-error: true | ||
needs: [ release-version ] | ||
permissions: | ||
contents: write | ||
|
@@ -102,12 +103,12 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
variant: [{dir: edc-controlplane, img: edc-runtime-memory}, | ||
{dir: edc-controlplane, img: edc-controlplane-memory-hashicorp-vault}, | ||
{dir: edc-controlplane, img: edc-controlplane-postgresql-hashicorp-vault}, | ||
{dir: edc-controlplane, img: edc-controlplane-postgresql-azure-vault}, | ||
{dir: edc-dataplane, img: edc-dataplane-azure-vault}, | ||
{dir: edc-dataplane, img: edc-dataplane-hashicorp-vault}] | ||
variant: [ { dir: edc-controlplane, img: edc-runtime-memory }, | ||
{ dir: edc-controlplane, img: edc-controlplane-memory-hashicorp-vault }, | ||
{ dir: edc-controlplane, img: edc-controlplane-postgresql-hashicorp-vault }, | ||
{ dir: edc-controlplane, img: edc-controlplane-postgresql-azure-vault }, | ||
{ dir: edc-dataplane, img: edc-dataplane-azure-vault }, | ||
{ dir: edc-dataplane, img: edc-dataplane-hashicorp-vault } ] | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
|
@@ -129,28 +130,26 @@ jobs: | |
name: Publish new helm release | ||
needs: [ release-version ] | ||
runs-on: ubuntu-latest | ||
# TODO: remove | ||
continue-on-error: true | ||
permissions: | ||
contents: write | ||
packages: write | ||
pages: write | ||
|
||
if: github.event.pull_request.merged == true && needs.release-version.outputs.RELEASE_VERSION | ||
steps: | ||
- | ||
name: Export RELEASE_VERSION env | ||
- name: Export RELEASE_VERSION env | ||
run: | | ||
echo "RELEASE_VERSION=${{ needs.release-version.outputs.RELEASE_VERSION }}" >> $GITHUB_ENV | ||
- | ||
uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
- | ||
name: Install Helm | ||
- name: Install Helm | ||
uses: azure/[email protected] | ||
with: | ||
version: v3.8.1 | ||
- | ||
name: Package helm, update index.yaml and push to gh-pages | ||
- name: Package helm, update index.yaml and push to gh-pages | ||
run: | | ||
# Prepare git env | ||
git config user.name "eclipse-tractusx-bot" | ||
|
@@ -183,17 +182,14 @@ jobs: | |
pull-requests: write | ||
if: github.event.pull_request.merged == true && needs.release-version.outputs.RELEASE_VERSION | ||
steps: | ||
- | ||
name: Export RELEASE_VERSION env | ||
- name: Export RELEASE_VERSION env | ||
run: | | ||
echo "RELEASE_VERSION=${{ needs.release-version.outputs.RELEASE_VERSION }}" >> $GITHUB_ENV | ||
- | ||
uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
# 0 to fetch the full history due to upcoming merge of releases into main branch | ||
fetch-depth: 0 | ||
- | ||
name: Create Release Tag | ||
- name: Create Release Tag | ||
id: create_release_tag | ||
run: | | ||
# Prepare git env | ||
|
@@ -207,22 +203,16 @@ jobs: | |
# Create & push tag | ||
git tag --force ${{ env.RELEASE_VERSION }} | ||
git push --force origin ${{ env.RELEASE_VERSION }} | ||
- | ||
name: Create Github Release | ||
id: create_release | ||
uses: thomaseizinger/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Create GitHub Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
target_commitish: ${{ github.event.pull_request.merge_commit_sha }} | ||
tag_name: ${{ env.RELEASE_VERSION }} | ||
name: ${{ env.RELEASE_VERSION }} | ||
draft: false | ||
prerelease: false | ||
- | ||
uses: ./.github/actions/setup-java | ||
- | ||
name: Merge releases back into main and set new snapshot version | ||
generateReleaseNotes: true | ||
tag: ${{ env.RELEASE_VERSION }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
makeLatest: true | ||
removeArtifacts: true | ||
- uses: ./.github/actions/setup-java | ||
- name: Merge releases back into main and set new snapshot version | ||
if: github.event.pull_request.base.ref == 'releases' | ||
run: | | ||
# Prepare git env | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.