From f64f65b44a978467ffcbc18ab04c51450e3a8565 Mon Sep 17 00:00:00 2001 From: Shailesh Patil <53746241+mineme0110@users.noreply.github.com> Date: Tue, 16 Apr 2024 14:00:59 +0100 Subject: [PATCH] fix(mediator) : update deployment process using helm chart (#282) * fix release to use helm package Signed-off-by: mineme0110 * fix release to use helm package Signed-off-by: mineme0110 * corrected the Chart.yml with correct name Signed-off-by: mineme0110 * rename tag from prism to identus Signed-off-by: mineme0110 * deleetd the index.yml Signed-off-by: mineme0110 * updated the place holders Signed-off-by: mineme0110 * add helm to the release action Signed-off-by: mineme0110 --------- Signed-off-by: mineme0110 --- .github/workflows/release.yml | 4 ++++ infrastructure/charts/mediator/Chart.yaml | 4 ++-- infrastructure/charts/mediator/values.yaml | 5 +++-- package.json | 26 +++++++++++++++++++++- 4 files changed, 34 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0688a883..3900d38a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,6 +38,10 @@ jobs: uses: actions/setup-node@v3 with: node-version: "lts/*" + - name: Setup Helm + uses: azure/setup-helm@v3 + with: + version: "3.12.2" # default is latest (stable) - name: Setup yq - portable yaml processor uses: mikefarah/yq@v4.34.2 - name: Setup Scala.JS diff --git a/infrastructure/charts/mediator/Chart.yaml b/infrastructure/charts/mediator/Chart.yaml index 14a1c883..57f2801b 100644 --- a/infrastructure/charts/mediator/Chart.yaml +++ b/infrastructure/charts/mediator/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 -name: prism-node -description: A Helm chart for deploying prism-mediator +name: identus-mediator +description: A Helm chart for deploying identus-mediator # A chart can be either an 'application' or a 'library' chart. # # Application charts are a collection of templates that can be packaged into versioned archives diff --git a/infrastructure/charts/mediator/values.yaml b/infrastructure/charts/mediator/values.yaml index 0e9af852..d52ed43b 100644 --- a/infrastructure/charts/mediator/values.yaml +++ b/infrastructure/charts/mediator/values.yaml @@ -1,8 +1,9 @@ ingress: enabled: true + applicationUrls: - - chart-base-prism-mediator.atalaprism.io - platformIngressUrl: chart-base-platform-ingress.atalaprism.io + - chart-base-identus-mediator.atalaprism.io # these are place holder + platformIngressUrl: chart-base-platform-ingress.atalaprism.io # these are place holder cors: enabled: true allow_origins: "*" diff --git a/package.json b/package.json index dff2251c..26ef45fe 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "prerelease": "snapshot" } ], - "tagFormat": "prism-mediator-v${version}", + "tagFormat": "identus-mediator-v${version}", "plugins": [ "@semantic-release/commit-analyzer", "@semantic-release/release-notes-generator", @@ -44,6 +44,30 @@ "prepareCmd": "NODE_OPTIONS=--openssl-legacy-provider sbt -J-Xmx5120m \"release release-version ${nextRelease.version} next-version ${nextRelease.version}-SNAPSHOT with-defaults\"" } ], + [ + "@semantic-release/exec", + { + "prepareCmd": "yq eval -i '.appVersion = \"${nextRelease.version}\" | .version = \"${nextRelease.version}\"' ./infrastructure/charts/mediator/Chart.yaml" + } + ], + [ + "@semantic-release/exec", + { + "prepareCmd": "helm package -d infrastructure/charts -u infrastructure/charts/mediator" + } + ], + [ + "@semantic-release/exec", + { + "prepareCmd": "helm repo index --url \"https://raw.githubusercontent.com/input-output-hk/atala-prism-mediator/main/infrastructure/charts\" --merge index.yaml infrastructure/charts" + } + ], + [ + "@semantic-release/exec", + { + "prepareCmd": "yq -i -P infrastructure/charts/index.yaml" + } + ], [ "@semantic-release/exec", {