Skip to content

Commit

Permalink
Release version 0.0.2 (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
denisneuling authored May 20, 2022
1 parent 861afa0 commit b90b2ba
Show file tree
Hide file tree
Showing 25 changed files with 510 additions and 278 deletions.
43 changes: 23 additions & 20 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
- develop
tags:
- '[0-9]+.[0-9]+.[0-9]+'
release:
types:
- released
pull_request:
branches:
- '*'
Expand All @@ -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
#####################
Expand Down Expand Up @@ -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/
Expand All @@ -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 ###
Expand Down Expand Up @@ -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/
Expand All @@ -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 ###
Expand Down Expand Up @@ -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/
Expand All @@ -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 ###
Expand Down Expand Up @@ -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/
Expand All @@ -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 }}
96 changes: 86 additions & 10 deletions .github/workflows/publish-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/')
Expand All @@ -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
Expand All @@ -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 }}
Expand Down Expand Up @@ -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
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.0.2] - 2022-05-20

## [0.0.1] - 2022-05-13

[Unreleased]: https://github.com/catenax-ng/product-edc/compare/0.0.1...HEAD
[Unreleased]: https://github.com/catenax-ng/product-edc/compare/0.0.2...HEAD

[0.0.2]: https://github.com/catenax-ng/product-edc/compare/0.0.1...0.0.2

[0.0.1]: https://github.com/catenax-ng/product-edc/compare/a02601306fed39a88a3b3b18fae98b80791157b9...0.0.1
8 changes: 8 additions & 0 deletions deployment/helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,11 @@
Chart linting is performed using [helm's CT tool](https://github.com/helm/chart-testing).

Configuration files for [CT](../../ct.yaml), [Yamale](../../chart_schema.yaml) and [Yamllint](../../lintconf.yaml) have been provided.

# Generate Chart Readme's

To generate chart README.md files from its respective values.yaml file we use the [helm-docs tool](https://github.com/norwoodj/helm-docs):

```shell
docker run --rm --volume "$(pwd):/helm-docs" -u $(id -u) jnorwood/helm-docs:latest
```
7 changes: 4 additions & 3 deletions deployment/helm/edc-controlplane/Chart.yaml
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: []
Loading

0 comments on commit b90b2ba

Please sign in to comment.