This repository has been archived by the owner on Jul 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Showing
13 changed files
with
196 additions
and
9 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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Check PR | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
- labeled | ||
- unlabeled | ||
branches: | ||
- main | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: '11' | ||
java-package: jdk | ||
|
||
- id: bump | ||
uses: zwaldowski/match-label-action@v1 | ||
with: | ||
allowed: major,minor,patch | ||
|
||
- uses: zwaldowski/semver-release-action@v2 | ||
with: | ||
dry_run: true | ||
bump: ${{ steps.bump.outputs.match }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
comment: | ||
runs-on: ubuntu-latest | ||
if: always() | ||
steps: | ||
- uses: technote-space/workflow-conclusion-action@v2 | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
|
||
- name: Comment PR | ||
if: env.WORKFLOW_CONCLUSION == 'failure' | ||
uses: thollander/[email protected] | ||
with: | ||
message: "Please apply one of the following labels to the PR: 'patch', 'minor', 'major'." | ||
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 |
---|---|---|
@@ -0,0 +1,99 @@ | ||
name: Pre-Release | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
- labeled | ||
- unlabeled | ||
|
||
jobs: | ||
generate-version: | ||
runs-on: ubuntu-latest | ||
|
||
outputs: | ||
version: ${{ steps.out.outputs.version }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- id: bump | ||
uses: zwaldowski/match-label-action@v1 | ||
with: | ||
allowed: major,minor,patch | ||
|
||
- uses: zwaldowski/semver-release-action@v2 | ||
with: | ||
dry_run: true | ||
bump: ${{ steps.bump.outputs.match }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Get PR Number | ||
id: pr_number | ||
run: echo "::set-output name=nr::$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')" | ||
|
||
- name: Set version output | ||
id: out | ||
run: echo "::set-output name=version::$(echo ${VERSION}-PRE-${{ steps.pr_number.outputs.nr }})" | ||
|
||
deploy: | ||
|
||
needs: [ "generate-version" ] | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Fetch history | ||
run: git fetch --prune --unshallow | ||
|
||
- name: Configure Git | ||
run: | | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
# See https://github.com/helm/chart-releaser-action/issues/6 | ||
- name: Install Helm | ||
run: | | ||
curl -fsSLo get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | ||
chmod 700 get_helm.sh | ||
./get_helm.sh | ||
# prepare yaml parser | ||
- uses: actions/setup-go@v4 | ||
- name: Install yq | ||
run: | | ||
go install github.com/mikefarah/yq/v4@latest | ||
yq --version | ||
- name: Generate Chart.yaml | ||
run: | | ||
./generate.sh ${{ needs.generate-version.outputs.version }} | ||
- name: Install releaser | ||
run: | | ||
wget https://github.com/helm/chart-releaser/releases/download/v1.6.0/chart-releaser_1.6.0_linux_amd64.tar.gz | ||
tar -xvzf chart-releaser_1.6.0_linux_amd64.tar.gz | ||
./cr package charts/data-space-connector | ||
./cr upload --owner ${GITHUB_REPOSITORY_OWNER} --git-repo data-space-connector --packages-with-index --token ${{ secrets.GITHUB_TOKEN }} --push --skip-existing | ||
./cr index --owner ${GITHUB_REPOSITORY_OWNER} --git-repo data-space-connector --packages-with-index --index-path . --token ${{ secrets.GITHUB_TOKEN }} --push | ||
git-release: | ||
needs: ["generate-version","deploy"] | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- uses: "marvinpinto/action-automatic-releases@latest" | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
automatic_release_tag: ${{ needs.generate-version.outputs.version }} | ||
prerelease: true | ||
title: ${{ needs.generate-version.outputs.version }} | ||
files: | | ||
LICENSE |
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,5 +1,5 @@ | ||
apiVersion: v2 | ||
name: mongo-db | ||
name: mongodb | ||
description: Chart holder for argo-cd | ||
|
||
type: application | ||
|
File renamed without changes.
File renamed without changes.
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,5 +1,5 @@ | ||
apiVersion: v2 | ||
name: vcverifier | ||
name: verifier | ||
description: Chart holder for argo-cd | ||
|
||
type: application | ||
|
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,5 +1,5 @@ | ||
apiVersion: v2 | ||
name: vcwaltid | ||
name: walt-id | ||
description: Chart holder for argo-cd | ||
|
||
type: application | ||
|
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,11 @@ | ||
apiVersion: v2 | ||
name: fiware-platform | ||
description: Helm chart to deploy the FIWARE Data pace Connector | ||
name: data-space-connector | ||
description: Helm chart to deploy the FIWARE Data Space Connector | ||
type: application | ||
version: 1.0.0 | ||
maintainers: | ||
- name: Dennis Wendland | ||
email: [email protected] | ||
|
||
- name: Stefan Wiedemann | ||
email: [email protected] | ||
dependencies: [] |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# move to a charts folder | ||
mkdir charts | ||
cp -r data-space-connector charts/ | ||
|
||
dscChartFolder=charts/data-space-connector | ||
cp -R applications/. $dscChartFolder/charts/ | ||
|
||
|
||
|
||
for f in $(find $dscChartFolder/charts -name 'Chart.yaml'); do | ||
name=$(yq eval .name $f); | ||
version=$(yq eval .version $f); | ||
yq eval -i '.dependencies += {"name":"'$name'","version":"'$version'", "repository":"file://./charts/'$name'"}' $dscChartFolder/Chart.yaml | ||
done | ||
echo \ >> $dscChartFolder/values.yaml | ||
echo \ >> $dscChartFolder/values.yaml | ||
echo '#Sub-Chart configuration configuration' >> $dscChartFolder/values.yaml | ||
for dir in $dscChartFolder/charts/*/; do | ||
chartsFile=${dir}Chart.yaml | ||
valuesFile=${dir}values.yaml | ||
name=$(yq e '.name' $chartsFile) | ||
|
||
echo \ >> $dscChartFolder/values.yaml | ||
echo $name: >> $dscChartFolder/values.yaml | ||
cat $valuesFile | sed 's/^/ /' >> $dscChartFolder/values.yaml | ||
|
||
helm dependency build ${dir} | ||
done | ||
# fix values in the chart yaml | ||
version="${1:=0.0.0}" | ||
yq e -i '.version = "'$version'"' $dscChartFolder/Chart.yaml | ||
|