forked from boschresearch/catena-x-edc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
861afa0
commit b90b2ba
Showing
25 changed files
with
510 additions
and
278 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 |
---|---|---|
|
@@ -8,6 +8,9 @@ on: | |
- develop | ||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+' | ||
release: | ||
types: | ||
- released | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
@@ -17,15 +20,15 @@ jobs: | |
runs-on: ubuntu-latest | ||
outputs: | ||
CXNG_GHCR_PAT: ${{ steps.secret-presence.outputs.CXNG_GHCR_PAT }} | ||
VERACODE_ID: ${{ steps.secret-presence.outputs.VERACODE_ID }} | ||
VERACODE_SECRET_KEY: ${{ steps.secret-presence.outputs.VERACODE_SECRET_KEY }} | ||
ORG_VERACODE_API_ID: ${{ steps.secret-presence.outputs.ORG_VERACODE_API_ID }} | ||
ORG_VERACODE_API_KEY: ${{ steps.secret-presence.outputs.ORG_VERACODE_API_KEY }} | ||
steps: | ||
- name: Check whether secrets exist | ||
id: secret-presence | ||
run: | | ||
[ ! -z "${{ secrets.CXNG_GHCR_PAT }}" ] && echo "::set-output name=CXNG_GHCR_PAT::true" | ||
[ ! -z "${{ secrets.VERACODE_ID }}" ] && echo "::set-output name=VERACODE_ID::true" | ||
[ ! -z "${{ secrets.VERACODE_SECRET_KEY }}" ] && echo "::set-output name=VERACODE_SECRET_KEY::true" | ||
[ ! -z "${{ secrets.ORG_VERACODE_API_ID }}" ] && echo "::set-output name=ORG_VERACODE_API_ID::true" | ||
[ ! -z "${{ secrets.ORG_VERACODE_API_KEY }}" ] && echo "::set-output name=ORG_VERACODE_API_KEY::true" | ||
exit 0 | ||
##################### | ||
|
@@ -99,7 +102,7 @@ jobs: | |
name: Veracode Upload And Scan | ||
uses: veracode/[email protected] | ||
if: | | ||
needs.secret-presence.outputs.VERACODE_ID && needs.secret-presence.outputs.VERACODE_SECRET_KEY && contains(' | ||
needs.secret-presence.outputs.ORG_VERACODE_API_ID && needs.secret-presence.outputs.ORG_VERACODE_API_KEY && contains(' | ||
refs/heads/develop | ||
refs/heads/release/ | ||
refs/tags/ | ||
|
@@ -108,10 +111,10 @@ jobs: | |
with: | ||
appname: 'product-edc/edc-dataplane' | ||
createprofile: true | ||
version: ${{ github.ref }} | ||
version: ${{ github.ref }}-${{ github.sha }} | ||
filepath: edc-dataplane/target/edc-dataplane.jar | ||
vid: ${{ secrets.VERACODE_ID }} | ||
vkey: ${{ secrets.VERACODE_SECRET_KEY }} | ||
vid: ${{ secrets.ORG_VERACODE_API_ID }} | ||
vkey: ${{ secrets.ORG_VERACODE_API_KEY }} | ||
|
||
################################# | ||
### edc-controlplane-memory ### | ||
|
@@ -184,7 +187,7 @@ jobs: | |
name: Veracode Upload And Scan | ||
uses: veracode/[email protected] | ||
if: | | ||
needs.secret-presence.outputs.VERACODE_ID && needs.secret-presence.outputs.VERACODE_SECRET_KEY && contains(' | ||
needs.secret-presence.outputs.ORG_VERACODE_API_ID && needs.secret-presence.outputs.ORG_VERACODE_API_KEY && contains(' | ||
refs/heads/develop | ||
refs/heads/release/ | ||
refs/tags/ | ||
|
@@ -193,10 +196,10 @@ jobs: | |
with: | ||
appname: 'product-edc/edc-controlplane-memory' | ||
createprofile: true | ||
version: ${{ github.ref }} | ||
version: ${{ github.ref }}-${{ github.sha }} | ||
filepath: edc-controlplane/edc-controlplane-memory/target/edc-controlplane-memory.jar | ||
vid: ${{ secrets.VERACODE_ID }} | ||
vkey: ${{ secrets.VERACODE_SECRET_KEY }} | ||
vid: ${{ secrets.ORG_VERACODE_API_ID }} | ||
vkey: ${{ secrets.ORG_VERACODE_API_KEY }} | ||
|
||
################################# | ||
### edc-controlplane-cosmosdb ### | ||
|
@@ -269,7 +272,7 @@ jobs: | |
name: Veracode Upload And Scan | ||
uses: veracode/[email protected] | ||
if: | | ||
needs.secret-presence.outputs.VERACODE_ID && needs.secret-presence.outputs.VERACODE_SECRET_KEY && contains(' | ||
needs.secret-presence.outputs.ORG_VERACODE_API_ID && needs.secret-presence.outputs.ORG_VERACODE_API_KEY && contains(' | ||
refs/heads/develop | ||
refs/heads/release/ | ||
refs/tags/ | ||
|
@@ -279,9 +282,9 @@ jobs: | |
appname: 'product-edc/edc-controlplane-cosmosdb' | ||
createprofile: true | ||
filepath: edc-controlplane/edc-controlplane-cosmosdb/target/edc-controlplane-cosmosdb.jar | ||
version: ${{ github.ref }} | ||
vid: ${{ secrets.VERACODE_ID }} | ||
vkey: ${{ secrets.VERACODE_SECRET_KEY }} | ||
version: ${{ github.ref }}-${{ github.sha }} | ||
vid: ${{ secrets.ORG_VERACODE_API_ID }} | ||
vkey: ${{ secrets.ORG_VERACODE_API_KEY }} | ||
|
||
################################### | ||
### edc-controlplane-postgresql ### | ||
|
@@ -354,7 +357,7 @@ jobs: | |
name: Veracode Upload And Scan | ||
uses: veracode/[email protected] | ||
if: | | ||
needs.secret-presence.outputs.VERACODE_ID && needs.secret-presence.outputs.VERACODE_SECRET_KEY && contains(' | ||
needs.secret-presence.outputs.ORG_VERACODE_API_ID && needs.secret-presence.outputs.ORG_VERACODE_API_KEY && contains(' | ||
refs/heads/develop | ||
refs/heads/release/ | ||
refs/tags/ | ||
|
@@ -364,6 +367,6 @@ jobs: | |
appname: 'product-edc/edc-controlplane-postgresql' | ||
createprofile: true | ||
filepath: edc-controlplane/edc-controlplane-postgresql/target/edc-controlplane-postgresql.jar | ||
version: ${{ github.ref }} | ||
vid: ${{ secrets.VERACODE_ID }} | ||
vkey: ${{ secrets.VERACODE_SECRET_KEY }} | ||
version: ${{ github.ref_name }}-${{ github.sha }} | ||
vid: ${{ secrets.ORG_VERACODE_API_ID }} | ||
vkey: ${{ secrets.ORG_VERACODE_API_KEY }} |
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 |
---|---|---|
|
@@ -9,15 +9,25 @@ on: | |
- closed | ||
|
||
jobs: | ||
release: | ||
name: Publish new release | ||
secret-presence: | ||
name: Determine secret presence | ||
runs-on: ubuntu-latest | ||
if: github.event.pull_request.merged == true | ||
outputs: | ||
CXNG_RELEASE_PAT: ${{ steps.secret-presence.outputs.CXNG_RELEASE_PAT }} | ||
steps: | ||
- name: Check whether secrets exist | ||
id: secret-presence | ||
run: | | ||
[ ! -z "${{ secrets.CXNG_RELEASE_PAT }}" ] && echo "::set-output name=CXNG_RELEASE_PAT::true" | ||
exit 0 | ||
release-version: | ||
name: Determine release version | ||
runs-on: ubuntu-latest | ||
outputs: | ||
RELEASE_VERSION: ${{ steps.release-version.outputs.RELEASE_VERSION }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
# 0 to fetch the full history due to upcoming merge of main into develop branch | ||
fetch-depth: 0 | ||
- | ||
name: Extract version from branch name (for release branches) | ||
if: startsWith(github.event.pull_request.head.ref, 'release/') | ||
|
@@ -34,12 +44,35 @@ jobs: | |
VERSION=${BRANCH_NAME#hotfix/} | ||
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV | ||
- | ||
name: Output release version | ||
id: release-version | ||
run: | | ||
echo "::set-output name=RELEASE_VERSION::${{ env.RELEASE_VERSION }}" | ||
github-release: | ||
name: Publish new github release | ||
needs: [ secret-presence, release-version ] | ||
runs-on: ubuntu-latest | ||
if: github.event.pull_request.merged == true && needs.secret-presence.outputs.CXNG_RELEASE_PAT && needs.release-version.outputs.RELEASE_VERSION | ||
steps: | ||
- | ||
name: Export RELEASE_VERSION env | ||
run: | | ||
echo "RELEASE_VERSION=${{ needs.release-version.outputs.RELEASE_VERSION }}" >> $GITHUB_ENV | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
# 0 to fetch the full history due to upcoming merge of main into develop branch | ||
fetch-depth: 0 | ||
- | ||
name: Create Release Tag | ||
id: create_release_tag | ||
run: | | ||
# Prepare git env | ||
git config user.name "GitHub actions" | ||
git config user.email noreply@github.com | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected].github.com" | ||
# informative | ||
git branch -a | ||
|
@@ -50,9 +83,10 @@ jobs: | |
git push --force origin ${{ env.RELEASE_VERSION }} | ||
- | ||
name: Create Github Release | ||
id: create_release | ||
uses: thomaseizinger/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.CXNG_RELEASE_PAT }} | ||
with: | ||
target_commitish: ${{ github.event.pull_request.merge_commit_sha }} | ||
tag_name: ${{ env.RELEASE_VERSION }} | ||
|
@@ -90,3 +124,45 @@ jobs: | |
git commit --message "Introduce new snapshot version $SNAPSHOT_VERSION" | ||
git push origin develop | ||
helm-release: | ||
name: Publish new helm release | ||
needs: [ release-version ] | ||
runs-on: ubuntu-latest | ||
if: github.event.pull_request.merged == true && needs.release-version.outputs.RELEASE_VERSION | ||
steps: | ||
- | ||
name: Export RELEASE_VERSION env | ||
run: | | ||
echo "RELEASE_VERSION=${{ needs.release-version.outputs.RELEASE_VERSION }}" >> $GITHUB_ENV | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- | ||
name: Install Helm | ||
uses: azure/setup-helm@v1 | ||
with: | ||
version: v3.8.1 | ||
- | ||
name: Package helm, update index.yaml and push to gh-pages | ||
run: | | ||
# Prepare git env | ||
git config user.name "GitHub actions" | ||
git config user.email [email protected] | ||
# Package all charts | ||
find -name Chart.yaml | xargs -n1 dirname | xargs -n1 helm package -u -d helm-charts | ||
git checkout gh-pages || git checkout -b gh-pages | ||
git pull --rebase origin gh-pages | ||
# Generate helm repo index.yaml | ||
helm repo index . --merge index.yaml --url https://${GITHUB_REPOSITORY_OWNER}.github.io/${GITHUB_REPOSITORY#*/}/ | ||
# Commit and push to gh-pages | ||
git add index.yaml helm-charts | ||
git commit -s -m "Release ${{ env.RELEASE_VERSION }}" | ||
git push origin gh-pages |
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
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
--- | ||
apiVersion: v2 | ||
name: edc-controlplane | ||
description: EDC Control-Plane | ||
description: >- | ||
EDC Control-Plane - The Eclipse DataSpaceConnector administration layer with responsibility of resource management and govern contracts and data transfers | ||
home: https://github.com/catenax-ng/product-edc/deployment/helm/edc-controlplane | ||
type: application | ||
appVersion: "0.0.1" | ||
version: 0.0.1 | ||
appVersion: "0.0.2" | ||
version: 0.0.2 | ||
maintainers: [] |
Oops, something went wrong.