From baeaa9a6810e2ab7d71006aeb9c0910fe8649c04 Mon Sep 17 00:00:00 2001 From: Auri Munoz Date: Tue, 25 Jun 2024 18:26:06 +0200 Subject: [PATCH] Apply the quarkus version to all of our existing templates and ensure that the quarkus-version label is properly set in the catalog-info.yaml --- .../skeletons/catalog-info/catalog-info.yaml | 2 +- .../manifests/helm/deploy/templates/_helpers.tpl | 1 + .../quarkus-chatbot/manifests/helm/deploy/values.yaml | 1 + .../quarkus-chatbot/skeletons/catalog-info/catalog-info.yaml | 2 +- locations/templates/quarkus-chatbot/template.yaml | 4 +++- locations/templates/quarkus-quickstart/template.yaml | 3 ++- .../manifests/helm/deploy/templates/_helpers.tpl | 1 + .../quarkus-rest-client/manifests/helm/deploy/values.yaml | 1 + .../skeletons/catalog-info/catalog-info.yaml | 2 +- locations/templates/quarkus-rest-client/template.yaml | 2 +- 10 files changed, 13 insertions(+), 6 deletions(-) diff --git a/locations/templates/quarkus-application/skeletons/catalog-info/catalog-info.yaml b/locations/templates/quarkus-application/skeletons/catalog-info/catalog-info.yaml index 023753a..11e3b73 100644 --- a/locations/templates/quarkus-application/skeletons/catalog-info/catalog-info.yaml +++ b/locations/templates/quarkus-application/skeletons/catalog-info/catalog-info.yaml @@ -30,7 +30,7 @@ metadata: github.com/project-slug: ${{ values.orgName }}/${{ values.repoName }} # See: topology annotation: https://github.com/janus-idp/backstage-plugins/tree/main/plugins/topology app.kubernetes.io/name: quarkus - app.quarkus.io/quarkus-version: "${{ quarkusVersion }}" + app.quarkus.io/quarkus-version: ${{ values.quarkusVersion }} tags: - java - quarkus diff --git a/locations/templates/quarkus-chatbot/manifests/helm/deploy/templates/_helpers.tpl b/locations/templates/quarkus-chatbot/manifests/helm/deploy/templates/_helpers.tpl index 338a8f9..132719c 100644 --- a/locations/templates/quarkus-chatbot/manifests/helm/deploy/templates/_helpers.tpl +++ b/locations/templates/quarkus-chatbot/manifests/helm/deploy/templates/_helpers.tpl @@ -65,6 +65,7 @@ Selector labels {{- define "quarkus-template.selectorLabels" -}} app.kubernetes.io/name: {{ include "quarkus-template.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} +app.quarkus.io/quarkus-version: {{ .Values.app.quarkusVersion }} {{- end }} {{/* diff --git a/locations/templates/quarkus-chatbot/manifests/helm/deploy/values.yaml b/locations/templates/quarkus-chatbot/manifests/helm/deploy/values.yaml index a4ada8c..f0a3620 100644 --- a/locations/templates/quarkus-chatbot/manifests/helm/deploy/values.yaml +++ b/locations/templates/quarkus-chatbot/manifests/helm/deploy/values.yaml @@ -6,6 +6,7 @@ app: version: ${{ values.version }} namespace: ${{ values.appNamespace }} database: ${{ values.database }} + quarkusVersion: ${{ values.quarkusVersion }} git: repo: ${{ values.git_repo }} diff --git a/locations/templates/quarkus-chatbot/skeletons/catalog-info/catalog-info.yaml b/locations/templates/quarkus-chatbot/skeletons/catalog-info/catalog-info.yaml index d62db57..2337d18 100644 --- a/locations/templates/quarkus-chatbot/skeletons/catalog-info/catalog-info.yaml +++ b/locations/templates/quarkus-chatbot/skeletons/catalog-info/catalog-info.yaml @@ -30,7 +30,7 @@ metadata: github.com/project-slug: ${{ values.orgName }}/${{ values.repoName }} # See: topology annotation: https://github.com/janus-idp/backstage-plugins/tree/main/plugins/topology app.kubernetes.io/name: quarkus - app.quarkus.io/quarkus-version: "${{ quarkusVersion }}" + app.quarkus.io/quarkus-version: ${{ values.quarkusVersion }} tags: - java - quarkus diff --git a/locations/templates/quarkus-chatbot/template.yaml b/locations/templates/quarkus-chatbot/template.yaml index b854f33..d6422b4 100644 --- a/locations/templates/quarkus-chatbot/template.yaml +++ b/locations/templates/quarkus-chatbot/template.yaml @@ -228,7 +228,7 @@ spec: default: test1 steps: - - id: template + - id: quarkus-app-create name: Generating the Source Code Component action: quarkus:app:create input: @@ -362,6 +362,8 @@ spec: virtualMachineName: ${{ parameters.virtualMachineName }} virtualMachineNamespace: ${{ parameters.virtualMachineNamespace }} native: ${{ parameters.native }} + version: ${{ parameters.version }} + quarkusVersion: ${{ parameters.quarkusVersion}} - id: publish name: Publishing to Code Source Repository - Github diff --git a/locations/templates/quarkus-quickstart/template.yaml b/locations/templates/quarkus-quickstart/template.yaml index 8c4c62b..008c6f1 100644 --- a/locations/templates/quarkus-quickstart/template.yaml +++ b/locations/templates/quarkus-quickstart/template.yaml @@ -141,7 +141,7 @@ spec: type: string description: The namespace for deploying resources steps: - - id: template + - id: quarkus-quickstart-clone name: Generating the Source Code Component action: quarkus:quickstart:clone input: @@ -151,6 +151,7 @@ spec: version: ${{ parameters.version }} quickstartName: ${{ parameters.quickstartName }} additionalProperties: ${{ parameters.additionalProperties }} + quarkusVersion: ${{ parameters.quarkusVersion }} - id: ciTemplate name: Generating the CI Component action: fetch:template diff --git a/locations/templates/quarkus-rest-client/manifests/helm/deploy/templates/_helpers.tpl b/locations/templates/quarkus-rest-client/manifests/helm/deploy/templates/_helpers.tpl index 338a8f9..132719c 100644 --- a/locations/templates/quarkus-rest-client/manifests/helm/deploy/templates/_helpers.tpl +++ b/locations/templates/quarkus-rest-client/manifests/helm/deploy/templates/_helpers.tpl @@ -65,6 +65,7 @@ Selector labels {{- define "quarkus-template.selectorLabels" -}} app.kubernetes.io/name: {{ include "quarkus-template.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} +app.quarkus.io/quarkus-version: {{ .Values.app.quarkusVersion }} {{- end }} {{/* diff --git a/locations/templates/quarkus-rest-client/manifests/helm/deploy/values.yaml b/locations/templates/quarkus-rest-client/manifests/helm/deploy/values.yaml index a4ada8c..f0a3620 100644 --- a/locations/templates/quarkus-rest-client/manifests/helm/deploy/values.yaml +++ b/locations/templates/quarkus-rest-client/manifests/helm/deploy/values.yaml @@ -6,6 +6,7 @@ app: version: ${{ values.version }} namespace: ${{ values.appNamespace }} database: ${{ values.database }} + quarkusVersion: ${{ values.quarkusVersion }} git: repo: ${{ values.git_repo }} diff --git a/locations/templates/quarkus-rest-client/skeletons/catalog-info/catalog-info.yaml b/locations/templates/quarkus-rest-client/skeletons/catalog-info/catalog-info.yaml index d62db57..2337d18 100644 --- a/locations/templates/quarkus-rest-client/skeletons/catalog-info/catalog-info.yaml +++ b/locations/templates/quarkus-rest-client/skeletons/catalog-info/catalog-info.yaml @@ -30,7 +30,7 @@ metadata: github.com/project-slug: ${{ values.orgName }}/${{ values.repoName }} # See: topology annotation: https://github.com/janus-idp/backstage-plugins/tree/main/plugins/topology app.kubernetes.io/name: quarkus - app.quarkus.io/quarkus-version: "${{ quarkusVersion }}" + app.quarkus.io/quarkus-version: ${{ values.quarkusVersion }} tags: - java - quarkus diff --git a/locations/templates/quarkus-rest-client/template.yaml b/locations/templates/quarkus-rest-client/template.yaml index 8ea7be5..4b44d2f 100644 --- a/locations/templates/quarkus-rest-client/template.yaml +++ b/locations/templates/quarkus-rest-client/template.yaml @@ -226,7 +226,7 @@ spec: default: test1 steps: - - id: template + - id: quarkus-app-create name: Generating the Source Code Component action: quarkus:app:create input: