From 93cb5fd9a75a272df39e19c60fbd96ebfae3a93e Mon Sep 17 00:00:00 2001 From: Mykola Serdiuk Date: Mon, 23 Oct 2023 12:33:04 +0300 Subject: [PATCH] chore: Update custom pipelines for new kaniko approach (#47) Related https://github.com/epam/edp-tekton/issues/47 Change-Id: I872c94bc62c9e317025e028276cd822cfcdc8250 --- .../gerrit-review-keycloak-operator.yaml | 12 +++++++----- .../pipelines/gerrit-review-sonar-operator.yaml | 16 ++++++++-------- .../pipelines/release/release-gerrit.yaml | 6 +++--- .../release-operators-headlamp-tekton.yaml | 6 +++--- charts/custom-pipelines/templates/tasks/e2e.yaml | 10 ++++++++++ 5 files changed, 31 insertions(+), 19 deletions(-) diff --git a/charts/custom-pipelines/templates/pipelines/gerrit-review-keycloak-operator.yaml b/charts/custom-pipelines/templates/pipelines/gerrit-review-keycloak-operator.yaml index c879adaa..c07e2802 100644 --- a/charts/custom-pipelines/templates/pipelines/gerrit-review-keycloak-operator.yaml +++ b/charts/custom-pipelines/templates/pipelines/gerrit-review-keycloak-operator.yaml @@ -190,9 +190,11 @@ spec: - sonar - dockerfile-lint params: - - name: IMAGE - value: "$(tasks.init-values.results.DOCKER_REGISTRY_HOST)/review/$(tasks.init-values.results.TENANT_NAME):$(params.CODEBASE_NAME)-$(params.changeNumber)-$(params.patchsetNumber)" - - name: IMAGE_TAR + - name: codebase-name + value: "review/$(params.CODEBASE_NAME)" + - name: image-tag + value: "$(params.changeNumber)-$(params.patchsetNumber)" + - name: image-tar value: "$(params.CODEBASE_NAME)-$(params.changeNumber)-$(params.patchsetNumber)" workspaces: - name: source @@ -221,9 +223,9 @@ spec: - name: CODEBASE_NAME value: $(params.CODEBASE_NAME) - name: E2E_IMAGE_REPOSITORY - value: "$(tasks.init-values.results.DOCKER_REGISTRY_HOST)/review/$(tasks.init-values.results.TENANT_NAME)" + value: "review/$(params.CODEBASE_NAME)" - name: E2E_IMAGE_TAG - value: "$(params.CODEBASE_NAME)-$(params.changeNumber)-$(params.patchsetNumber)" + value: "$(params.changeNumber)-$(params.patchsetNumber)" workspaces: - name: source workspace: shared-workspace diff --git a/charts/custom-pipelines/templates/pipelines/gerrit-review-sonar-operator.yaml b/charts/custom-pipelines/templates/pipelines/gerrit-review-sonar-operator.yaml index be3f911e..65f501e6 100644 --- a/charts/custom-pipelines/templates/pipelines/gerrit-review-sonar-operator.yaml +++ b/charts/custom-pipelines/templates/pipelines/gerrit-review-sonar-operator.yaml @@ -187,12 +187,12 @@ spec: - name: kaniko-build params: - - name: IMAGE - value: >- - $(tasks.init-values.results.DOCKER_REGISTRY_HOST)/review/$(tasks.init-values.results.TENANT_NAME):$(params.CODEBASE_NAME)-$(params.changeNumber)-$(params.patchsetNumber) - - name: IMAGE_TAR - value: >- - $(params.CODEBASE_NAME)-$(params.changeNumber)-$(params.patchsetNumber) + - name: codebase-name + value: "review/$(params.CODEBASE_NAME)" + - name: image-tag + value: "$(params.changeNumber)-$(params.patchsetNumber)" + - name: image-tar + value: "$(params.CODEBASE_NAME)-$(params.changeNumber)-$(params.patchsetNumber)" runAfter: - sonar - dockerfile-lint @@ -226,9 +226,9 @@ spec: - name: CODEBASE_NAME value: $(params.CODEBASE_NAME) - name: E2E_IMAGE_REPOSITORY - value: "$(tasks.init-values.results.DOCKER_REGISTRY_HOST)/review/$(tasks.init-values.results.TENANT_NAME)" + value: "review/$(params.CODEBASE_NAME)" - name: E2E_IMAGE_TAG - value: "$(params.CODEBASE_NAME)-$(params.changeNumber)-$(params.patchsetNumber)" + value: "$(params.changeNumber)-$(params.patchsetNumber)" workspaces: - name: source workspace: shared-workspace diff --git a/charts/custom-pipelines/templates/pipelines/release/release-gerrit.yaml b/charts/custom-pipelines/templates/pipelines/release/release-gerrit.yaml index 50abffac..c1461903 100644 --- a/charts/custom-pipelines/templates/pipelines/release/release-gerrit.yaml +++ b/charts/custom-pipelines/templates/pipelines/release/release-gerrit.yaml @@ -97,11 +97,11 @@ spec: - fetch-repository params: - name: codebase-name - value: "$(params.CODEBASE_NAME)" + value: "$(params.codebase-name)" - name: image-tag - value: "$(tasks.get-version.results.IS_TAG)" + value: "$(params.version)" - name: image-tar - value: "$(params.CODEBASE_NAME)_$(tasks.get-version.results.IS_TAG)" + value: "$(params.codebase-name)_$(params.version)" workspaces: - name: source workspace: shared-workspace diff --git a/charts/custom-pipelines/templates/pipelines/release/release-operators-headlamp-tekton.yaml b/charts/custom-pipelines/templates/pipelines/release/release-operators-headlamp-tekton.yaml index 8a56c3c3..a2519473 100644 --- a/charts/custom-pipelines/templates/pipelines/release/release-operators-headlamp-tekton.yaml +++ b/charts/custom-pipelines/templates/pipelines/release/release-operators-headlamp-tekton.yaml @@ -143,11 +143,11 @@ spec: - build params: - name: codebase-name - value: "$(params.CODEBASE_NAME)" + value: "$(params.codebase-name)" - name: image-tag - value: "$(tasks.get-version.results.IS_TAG)" + value: "$(params.version)" - name: image-tar - value: "$(params.CODEBASE_NAME)_$(tasks.get-version.results.IS_TAG)" + value: "$(params.codebase-name)_$(params.version)" workspaces: - name: source workspace: shared-workspace diff --git a/charts/custom-pipelines/templates/tasks/e2e.yaml b/charts/custom-pipelines/templates/tasks/e2e.yaml index 87923737..b91b0e3c 100644 --- a/charts/custom-pipelines/templates/tasks/e2e.yaml +++ b/charts/custom-pipelines/templates/tasks/e2e.yaml @@ -65,6 +65,16 @@ spec: value: $(params.E2E_IMAGE_TAG) - name: E2E_HOST_NS value: $(params.E2E_HOST_NS) + - name: CONTAINER_REGISTRY_URL + valueFrom: + configMapKeyRef: + name: edp-config + key: container_registry_host + - name: CONTAINER_REGISTRY_SPACE + valueFrom: + configMapKeyRef: + name: edp-config + key: container_registry_space script: | set -x