From 9b3268982b03b4ae2d9b0d64cd7cf01596b59084 Mon Sep 17 00:00:00 2001 From: Mathias Brunkow Moser Date: Fri, 17 Feb 2023 10:16:17 +0100 Subject: [PATCH 1/7] Added version deployment --- .github/workflows/publish-consumer-backend-docker-images.yml | 4 ++-- .github/workflows/publish-consumer-ui-docker-images.yml | 4 ++-- charts/consumer-backend/Chart.yaml | 4 ++-- charts/consumer-backend/values.yaml | 2 -- charts/consumer-ui/Chart.yaml | 4 ++-- charts/consumer-ui/values.yaml | 2 -- entrypoint.sh | 2 +- src/services/service.const.js | 1 - 8 files changed, 9 insertions(+), 14 deletions(-) diff --git a/.github/workflows/publish-consumer-backend-docker-images.yml b/.github/workflows/publish-consumer-backend-docker-images.yml index ea4ac8f..d770887 100644 --- a/.github/workflows/publish-consumer-backend-docker-images.yml +++ b/.github/workflows/publish-consumer-backend-docker-images.yml @@ -22,7 +22,7 @@ name: "Publish Consumer Backend Docker Images" on: push: - branches: [ "main", "develop" ] + branches: [ "main", "develop", hotfix/deployment ] # Publish semver tags as releases. # tags: [ 'v*.*.*' ] @@ -82,5 +82,5 @@ jobs: with: context: consumer-backend/productpass push: true - tags: ${{ steps.meta.outputs.tags }} + tags: ${{ steps.meta.outputs.tags }}, ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/publish-consumer-ui-docker-images.yml b/.github/workflows/publish-consumer-ui-docker-images.yml index 1ea8c15..b91b15e 100644 --- a/.github/workflows/publish-consumer-ui-docker-images.yml +++ b/.github/workflows/publish-consumer-ui-docker-images.yml @@ -22,7 +22,7 @@ name: "Publish Consumer UI Docker Images" on: push: - branches: [ "main", "develop" ] + branches: [ "main", "develop", hotfix/deployment ] # Publish semver tags as releases. # tags: [ 'v*.*.*' ] @@ -72,5 +72,5 @@ jobs: uses: docker/build-push-action@v3 with: push: true - tags: ${{ steps.meta.outputs.tags }} + tags: ${{ steps.meta.outputs.tags }}, ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest labels: ${{ steps.meta.outputs.labels }} diff --git a/charts/consumer-backend/Chart.yaml b/charts/consumer-backend/Chart.yaml index d2b3760..2941790 100644 --- a/charts/consumer-backend/Chart.yaml +++ b/charts/consumer-backend/Chart.yaml @@ -29,11 +29,11 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.9 +version: 0.2.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "0.4.2" +appVersion: "v0.4.2" diff --git a/charts/consumer-backend/values.yaml b/charts/consumer-backend/values.yaml index 6d53a41..a410149 100644 --- a/charts/consumer-backend/values.yaml +++ b/charts/consumer-backend/values.yaml @@ -24,8 +24,6 @@ namespace: product-material-pass image: repository: ghcr.io/catenax-ng/product-battery-passport-consumer-app/product-pass-consumer-backend pullPolicy: Always - # Overrides the image tag whose default is the chart appVersion. - tag: placeholder imagePullSecrets: [] nameOverride: "consumer-backend" diff --git a/charts/consumer-ui/Chart.yaml b/charts/consumer-ui/Chart.yaml index 0f16d2f..5b50555 100644 --- a/charts/consumer-ui/Chart.yaml +++ b/charts/consumer-ui/Chart.yaml @@ -29,10 +29,10 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.9 +version: 0.2.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "0.4.2" +appVersion: "v0.4.2" diff --git a/charts/consumer-ui/values.yaml b/charts/consumer-ui/values.yaml index dd9808d..cd6e4da 100644 --- a/charts/consumer-ui/values.yaml +++ b/charts/consumer-ui/values.yaml @@ -22,8 +22,6 @@ namespace: product-material-pass image: repository: ghcr.io/catenax-ng/product-battery-passport-consumer-app/consumer-ui pullPolicy: Always - # Overrides the image tag whose default is the chart appVersion. - tag: placeholder imagePullSecrets: [] nameOverride: "consumer-ui" diff --git a/entrypoint.sh b/entrypoint.sh index f97216a..f7c5ff4 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -22,7 +22,7 @@ do sed -i 's|VUE_APP_CLIENT_ID|'${VUE_APP_CLIENT_ID}'|g' $file sed -i 's|VUE_APP_CLIENT_SECRET|'${VUE_APP_CLIENT_SECRET}'|g' $file sed -i 's|X_API_KEY|'${X_API_KEY}'|g' $file - sed -i 's|APP_BACK|'${BACKEND}'|g' $file + sed -i 's|APP_BACK|'${APP_BACKEND}'|g' $file sed -i 's|APP_VER|'${VERSION}'|g' $file sed -i 's|APP_API_TIMEOUT|'${API_TIMEOUT}'|g' $file sed -i 's|APP_API_DELAY|'${API_DELAY}'|g' $file diff --git a/src/services/service.const.js b/src/services/service.const.js index f4d7ac0..72ca5dd 100644 --- a/src/services/service.const.js +++ b/src/services/service.const.js @@ -98,4 +98,3 @@ else { // for local run } export {TWIN_REGISTRY_URL, AAS_PROXY_URL, MOCK_AUTH_URL, GOOGLE_CHART_API_URL, DUMMY_SERVICE, INIT_OPTIONS, REDIRECT_URI, CX_REGISTRY_URL, SERVER_URL, API_KEY, CLIENT_CREDENTIALS, IDP_URL, BACKEND, VERSION, API_TIMEOUT, API_DELAY, API_MAX_RETRIES}; - From 7a350a78ae28876d2a312263d38b9ec06ce8eb8e Mon Sep 17 00:00:00 2001 From: Mathias Brunkow Moser Date: Fri, 17 Feb 2023 10:20:46 +0100 Subject: [PATCH 2/7] Updated entrypoint --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index f7c5ff4..f97216a 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -22,7 +22,7 @@ do sed -i 's|VUE_APP_CLIENT_ID|'${VUE_APP_CLIENT_ID}'|g' $file sed -i 's|VUE_APP_CLIENT_SECRET|'${VUE_APP_CLIENT_SECRET}'|g' $file sed -i 's|X_API_KEY|'${X_API_KEY}'|g' $file - sed -i 's|APP_BACK|'${APP_BACKEND}'|g' $file + sed -i 's|APP_BACK|'${BACKEND}'|g' $file sed -i 's|APP_VER|'${VERSION}'|g' $file sed -i 's|APP_API_TIMEOUT|'${API_TIMEOUT}'|g' $file sed -i 's|APP_API_DELAY|'${API_DELAY}'|g' $file From bda3aee9d2a8e57c9597771666c3e7f70138194c Mon Sep 17 00:00:00 2001 From: Mathias Brunkow Moser Date: Fri, 17 Feb 2023 10:24:55 +0100 Subject: [PATCH 3/7] Updated workflow --- .github/workflows/publish-consumer-backend-docker-images.yml | 2 +- .github/workflows/publish-consumer-ui-docker-images.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-consumer-backend-docker-images.yml b/.github/workflows/publish-consumer-backend-docker-images.yml index d770887..b98687c 100644 --- a/.github/workflows/publish-consumer-backend-docker-images.yml +++ b/.github/workflows/publish-consumer-backend-docker-images.yml @@ -82,5 +82,5 @@ jobs: with: context: consumer-backend/productpass push: true - tags: ${{ steps.meta.outputs.tags }}, ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest + tags: ${{ steps.meta.outputs.tags }}, ${{ env.REGISTRY }}/${{ github.repository }}/${{ env.IMAGE_NAME }}:latest labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/publish-consumer-ui-docker-images.yml b/.github/workflows/publish-consumer-ui-docker-images.yml index b91b15e..d610ccf 100644 --- a/.github/workflows/publish-consumer-ui-docker-images.yml +++ b/.github/workflows/publish-consumer-ui-docker-images.yml @@ -72,5 +72,5 @@ jobs: uses: docker/build-push-action@v3 with: push: true - tags: ${{ steps.meta.outputs.tags }}, ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest + tags: ${{ steps.meta.outputs.tags }}, ${{ env.REGISTRY }}/${{ github.repository }}/${{ env.IMAGE_NAME }}:latest labels: ${{ steps.meta.outputs.labels }} From 0fa0532c420a2458d9abc763a2e865309fdcc037 Mon Sep 17 00:00:00 2001 From: Mathias Brunkow Moser Date: Fri, 17 Feb 2023 10:31:44 +0100 Subject: [PATCH 4/7] Added tagged trigger for docker image workflow --- .../workflows/publish-consumer-backend-docker-images.yml | 3 ++- .github/workflows/publish-consumer-ui-docker-images.yml | 6 ++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-consumer-backend-docker-images.yml b/.github/workflows/publish-consumer-backend-docker-images.yml index b98687c..d0ac8d1 100644 --- a/.github/workflows/publish-consumer-backend-docker-images.yml +++ b/.github/workflows/publish-consumer-backend-docker-images.yml @@ -23,7 +23,8 @@ on: push: branches: [ "main", "develop", hotfix/deployment ] - + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' # Publish semver tags as releases. # tags: [ 'v*.*.*' ] diff --git a/.github/workflows/publish-consumer-ui-docker-images.yml b/.github/workflows/publish-consumer-ui-docker-images.yml index d610ccf..059a0c8 100644 --- a/.github/workflows/publish-consumer-ui-docker-images.yml +++ b/.github/workflows/publish-consumer-ui-docker-images.yml @@ -21,11 +21,9 @@ name: "Publish Consumer UI Docker Images" on: push: - branches: [ "main", "develop", hotfix/deployment ] - - # Publish semver tags as releases. - # tags: [ 'v*.*.*' ] + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' env: REGISTRY: ghcr.io From 2a05fe4ed14324f48bca0ddd27732ba455ace07e Mon Sep 17 00:00:00 2001 From: Mathias Brunkow Moser Date: Fri, 17 Feb 2023 13:55:48 +0100 Subject: [PATCH 5/7] Updated deployment workflow --- .github/workflows/publish-consumer-backend-docker-images.yml | 2 +- .github/workflows/publish-consumer-ui-docker-images.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-consumer-backend-docker-images.yml b/.github/workflows/publish-consumer-backend-docker-images.yml index d0ac8d1..024034f 100644 --- a/.github/workflows/publish-consumer-backend-docker-images.yml +++ b/.github/workflows/publish-consumer-backend-docker-images.yml @@ -22,7 +22,7 @@ name: "Publish Consumer Backend Docker Images" on: push: - branches: [ "main", "develop", hotfix/deployment ] + branches: [ "main", "develop" ] tags: - 'v[0-9]+.[0-9]+.[0-9]+' # Publish semver tags as releases. diff --git a/.github/workflows/publish-consumer-ui-docker-images.yml b/.github/workflows/publish-consumer-ui-docker-images.yml index 059a0c8..8d0dd71 100644 --- a/.github/workflows/publish-consumer-ui-docker-images.yml +++ b/.github/workflows/publish-consumer-ui-docker-images.yml @@ -21,7 +21,7 @@ name: "Publish Consumer UI Docker Images" on: push: - branches: [ "main", "develop", hotfix/deployment ] + branches: [ "main", "develop" ] tags: - 'v[0-9]+.[0-9]+.[0-9]+' From 5b6913ea56bcb0734e23513ed5295e5886259228 Mon Sep 17 00:00:00 2001 From: Mathias Moser <71728767+matbmoser@users.noreply.github.com> Date: Fri, 17 Feb 2023 13:59:45 +0100 Subject: [PATCH 6/7] Removed no necesary "v" in appVersion 1 --- charts/consumer-ui/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/consumer-ui/Chart.yaml b/charts/consumer-ui/Chart.yaml index 5b50555..bdced19 100644 --- a/charts/consumer-ui/Chart.yaml +++ b/charts/consumer-ui/Chart.yaml @@ -35,4 +35,4 @@ version: 0.2.1 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "v0.4.2" +appVersion: "0.4.2" From 037f5c3349587585f75f285e597ed230304fa473 Mon Sep 17 00:00:00 2001 From: Mathias Moser <71728767+matbmoser@users.noreply.github.com> Date: Fri, 17 Feb 2023 14:00:04 +0100 Subject: [PATCH 7/7] Removed no necesary "v" in appVersion 2 --- charts/consumer-backend/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/consumer-backend/Chart.yaml b/charts/consumer-backend/Chart.yaml index 2941790..631765b 100644 --- a/charts/consumer-backend/Chart.yaml +++ b/charts/consumer-backend/Chart.yaml @@ -35,5 +35,5 @@ version: 0.2.1 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "v0.4.2" +appVersion: "0.4.2"