From 535d773cb9de0ee5a13f04114c2e51adf4a05a4f Mon Sep 17 00:00:00 2001 From: cmoulliard Date: Wed, 19 Jun 2024 11:49:14 +0200 Subject: [PATCH] Revert the template and test data to use github. Job will fail as tokens are not yet passed using github secrets Signed-off-by: cmoulliard --- .github/test-data/quarkus-app-3.11-db.json | 9 ++-- .../quarkus-application/template.yaml | 49 ++++++++----------- 2 files changed, 24 insertions(+), 34 deletions(-) diff --git a/.github/test-data/quarkus-app-3.11-db.json b/.github/test-data/quarkus-app-3.11-db.json index 4fc3d6c..c3bee07 100644 --- a/.github/test-data/quarkus-app-3.11-db.json +++ b/.github/test-data/quarkus-app-3.11-db.json @@ -23,13 +23,12 @@ "io.quarkus:quarkus-hibernate-validator" ], "repo": { - "host": "gitea.cnoe.localtest.me:8443", - "org": "qshift", - "visibility": "public" + "host": "github.com", + "org": "q-shift", }, "namespace": "dummy", - "imageRepository": "gitea.cnoe.localtest.me:8443/giteadmin", - "imageUrl": "gitea.cnoe.localtest.me:8443/giteaadmin/my-quarkus-app-job", + "imageRepository": "quay.io", + "imageUrl": "quay.io/snowdrop/my-quarkus-app", "virtualMachineName": "quarkus-dev", "virtualMachineNamespace": "dummy" }, diff --git a/locations/templates/quarkus-application/template.yaml b/locations/templates/quarkus-application/template.yaml index ad3b60a..41fbb2e 100644 --- a/locations/templates/quarkus-application/template.yaml +++ b/locations/templates/quarkus-application/template.yaml @@ -175,18 +175,18 @@ spec: host: title: Repo Host type: string - default: gitea.cnoe.localtest.me:8443 + default: github.com enum: - - gitea.cnoe.localtest.me:8443 - github.com + - gitea.cnoe.localtest.me:8443 org: title: Repo Org Owner type: string description: Your SCM organization/group - default: qshift + default: q-shift enum: - - qshift + - q-shift - aureamunoz - ch007m - iocanel @@ -216,10 +216,10 @@ spec: imageRepository: title: Select a registry type: string - default: gitea.cnoe.localtest.me:8443/giteadmin + default: quay.io enum: - - gitea.cnoe.localtest.me:8443/giteadmin - quay.io + - gitea.cnoe.localtest.me:8443/giteadmin - image-registry.openshift-image-registry.svc:5000 enumNames: - Gitea @@ -230,7 +230,10 @@ spec: title: Image URL type: string description: The Quay.io or OpenShift Image URL // - default: gitea.cnoe.localtest.me:8443/giteadmin/my-quarkus-app-job + default: quay.io/snowdrop/my-quarkus-app + enumNames: + - quay.io/snowdrop/my-quarkus-app + - gitea.cnoe.localtest.me:8443/giteadmin/my-quarkus-app-job virtualMachineName: title: Virtual Machine Name @@ -317,9 +320,8 @@ spec: system: ${{ parameters.system }} applicationType: service description: ${{ parameters.description }} - # TODO: To be reviewed and find a way to properly set the DNS names of: gitea, argocd, etc - # destination: destination: ${{ parameters.repo.org }}/${{ parameters.component_id }} - destination: http://my-gitea-http.gitea.svc.cluster.local:3000/${{ parameters.repo.org }}/${{ parameters.component_id }}.git + # TODO: To be reviewed and tested with different git providers + destination: ${{ parameters.repo.org }}/${{ parameters.component_id }} host: ${{ parameters.repo.host }} namespace: ${{ parameters.namespace }} imageUrl: ${{ parameters.imageUrl }} @@ -342,9 +344,8 @@ spec: values: component_id: ${{ parameters.component_id }} description: ${{ parameters.description }} - # TODO: To be reviewed and find a way to properly set the DNS names of: gitea, argocd, etc - # destination: https://${{ parameters.repo.host }}/${{ parameters.repo.org }}/${{ parameters.component_id }}.git - destination: http://my-gitea-http.gitea.svc.cluster.local:3000/${{ parameters.repo.org }}/${{ parameters.component_id }}.git + # TODO: To be reviewed and tested with different git providers + destination: https://${{ parameters.repo.host }}/${{ parameters.repo.org }}/${{ parameters.component_id }}.git git_repo: ${{ parameters.repo.host }} # quay.io, ghcr.io, docker.io, etc git_org: ${{ parameters.repo.org }} git_repo_name: ${{ parameters.component_id }} @@ -365,19 +366,11 @@ spec: input: allowedHosts: ['github.com'] description: This is ${{ parameters.component_id }} - repoUrl: "${{ parameters.repo.host }}?owner=${{ parameters.repo.org }}&repo=${{parameters.component_id}}" + repoUrl: ${{ parameters.repo.host }}?owner=${{ parameters.repo.org }}&repo=${{parameters.component_id}} defaultBranch: main protectDefaultBranch: false repoVisibility: ${{ parameters.repo.visibility }} - #- id: debug-gitea - # name: Publishing to Gitea - # action: debug:log - # if: ${{ parameters.repo.host !== "github.com" }} - # input: - # message: | - # Pushing files to ${{ parameters.repo.host }} server and repo name: ${{ parameters.component_id }} - - id: publish-gitea name: Publishing to a gitea git repository action: publish:gitea @@ -393,10 +386,9 @@ spec: name: Registering the Catalog Info Component action: catalog:register input: - # TODO: Find a way to define properly define the address to access the gitea server or github - catalogInfoUrl: https://${{ parameters.repo.host }}/${{ parameters.repo.org }}/${{ parameters.component_id }}/src/branch/main/catalog-info.yaml - #repoContentsUrl: ${{ steps.publish.output.repoContentsUrl }} - #catalogInfoPath: catalog-info.yaml + # TODO: To be reviewed and tested with different git providers + repoContentsUrl: ${{ steps.publish.output.repoContentsUrl }} + catalogInfoPath: catalog-info.yaml - id: create-argocd-resources name: Create ArgoCD Resources @@ -406,9 +398,8 @@ spec: argoInstance: argocdQShift # Match appconfig => argocd/appLocatorMethods/instances/name projectName: ${{ parameters.component_id }} namespace: ${{ parameters.namespace }} - # repoUrl: https://${{ parameters.repo.host }}/${{ parameters.repo.org }}/${{ parameters.component_id }}.git - # TODO: Find a way to define properly the address to access the gitea server - repoUrl: http://my-gitea-http.gitea.svc.cluster.local:3000/${{ parameters.repo.org }}/${{ parameters.component_id }}.git + # TODO: To be reviewed and tested with different git providers + repoUrl: https://${{ parameters.repo.host }}/${{ parameters.repo.org }}/${{ parameters.component_id }}.git path: 'argocd/' output: