From b20963cc3aa2c01cf2fabe44db9e666c832fb37f Mon Sep 17 00:00:00 2001 From: Mykola Serdiuk Date: Wed, 20 Nov 2024 16:48:50 +0200 Subject: [PATCH] feat: Enable configuration to disable pipeline by codebses (#365) --- charts/pipelines-library/README.md | 4 + .../pipelines-library/templates/_helpers.tpl | 141 ++++++++++++++++++ .../gradle/bitbucket-build-default.yaml | 29 ++-- .../autotests/gradle/bitbucket-build-edp.yaml | 27 ++-- .../autotests/gradle/bitbucket-review.yaml | 29 ++-- .../gradle/gerrit-build-default.yaml | 29 ++-- .../autotests/gradle/gerrit-build-edp.yaml | 29 ++-- .../autotests/gradle/gerrit-review.yaml | 29 ++-- .../gradle/github-build-default.yaml | 29 ++-- .../autotests/gradle/github-build-edp.yaml | 27 ++-- .../autotests/gradle/github-review.yaml | 29 ++-- .../gradle/gitlab-build-default.yaml | 29 ++-- .../autotests/gradle/gitlab-build-edp.yaml | 27 ++-- .../autotests/gradle/gitlab-review.yaml | 29 ++-- .../maven/bitbucket-build-default.yaml | 23 ++- .../autotests/maven/bitbucket-build-edp.yaml | 21 ++- .../autotests/maven/bitbucket-review.yaml | 23 ++- .../autotests/maven/gerrit-build-default.yaml | 23 ++- .../autotests/maven/gerrit-build-edp.yaml | 23 ++- .../autotests/maven/gerrit-review.yaml | 23 ++- .../autotests/maven/github-build-default.yaml | 23 ++- .../autotests/maven/github-build-edp.yaml | 21 ++- .../autotests/maven/github-review.yaml | 23 ++- .../autotests/maven/gitlab-build-default.yaml | 23 ++- .../autotests/maven/gitlab-build-edp.yaml | 21 ++- .../autotests/maven/gitlab-review.yaml | 23 ++- .../c/cmake/bitbucket-build-default.yaml | 2 + .../c/cmake/bitbucket-build-edp.yaml | 2 + .../pipelines/c/cmake/bitbucket-review.yaml | 2 + .../c/cmake/gerrit-build-default.yaml | 2 + .../pipelines/c/cmake/gerrit-build-edp.yaml | 2 + .../pipelines/c/cmake/gerrit-review.yaml | 2 + .../c/cmake/github-build-default.yaml | 2 + .../pipelines/c/cmake/github-build-edp.yaml | 2 + .../pipelines/c/cmake/github-review.yaml | 2 + .../c/cmake/gitlab-build-default.yaml | 2 + .../pipelines/c/cmake/gitlab-build-edp.yaml | 2 + .../pipelines/c/cmake/gitlab-review.yaml | 2 + .../c/make/bitbucket-build-default.yaml | 2 + .../pipelines/c/make/bitbucket-build-edp.yaml | 2 + .../pipelines/c/make/bitbucket-review.yaml | 2 + .../c/make/gerrit-build-default.yaml | 2 + .../pipelines/c/make/gerrit-build-edp.yaml | 2 + .../pipelines/c/make/gerrit-review.yaml | 2 + .../c/make/github-build-default.yaml | 2 + .../pipelines/c/make/github-build-edp.yaml | 2 + .../pipelines/c/make/github-review.yaml | 2 + .../c/make/gitlab-build-default.yaml | 2 + .../pipelines/c/make/gitlab-build-edp.yaml | 2 + .../pipelines/c/make/gitlab-review.yaml | 2 + .../pipelines/cd-autotests/autotest.yaml | 2 + .../templates/pipelines/cd/clean.yaml | 3 + .../pipelines/cd/deploy-ansible-awx.yaml | 2 + .../pipelines/cd/deploy-ansible.yaml | 2 + .../pipelines/cd/deploy-with-approve.yaml | 2 + .../pipelines/cd/deploy-with-autotests.yaml | 2 + .../templates/pipelines/cd/deploy.yaml | 2 + .../csharp/bitbucket-build-default.yaml | 16 +- .../pipelines/csharp/bitbucket-build-edp.yaml | 16 +- .../csharp/bitbucket-build-lib-default.yaml | 16 +- .../csharp/bitbucket-build-lib-edp.yaml | 16 +- .../csharp/bitbucket-review-lib.yaml | 16 +- .../pipelines/csharp/bitbucket-review.yaml | 16 +- .../csharp/gerrit-build-default.yaml | 16 +- .../pipelines/csharp/gerrit-build-edp.yaml | 16 +- .../csharp/gerrit-build-lib-default.yaml | 16 +- .../csharp/gerrit-build-lib-edp.yaml | 16 +- .../pipelines/csharp/gerrit-review-lib.yaml | 16 +- .../pipelines/csharp/gerrit-review.yaml | 16 +- .../csharp/github-build-default.yaml | 16 +- .../pipelines/csharp/github-build-edp.yaml | 16 +- .../csharp/github-build-lib-default.yaml | 16 +- .../csharp/github-build-lib-edp.yaml | 16 +- .../pipelines/csharp/github-review-lib.yaml | 16 +- .../pipelines/csharp/github-review.yaml | 16 +- .../csharp/gitlab-build-default.yaml | 16 +- .../pipelines/csharp/gitlab-build-edp.yaml | 16 +- .../csharp/gitlab-build-lib-default.yaml | 16 +- .../csharp/gitlab-build-lib-edp.yaml | 16 +- .../pipelines/csharp/gitlab-review-lib.yaml | 16 +- .../pipelines/csharp/gitlab-review.yaml | 16 +- .../kaniko/bitbucket-build-default.yaml | 2 + .../docker/kaniko/bitbucket-build-edp.yaml | 2 + .../docker/kaniko/bitbucket-review.yaml | 2 + .../docker/kaniko/gerrit-build-default.yaml | 2 + .../docker/kaniko/gerrit-build-edp.yaml | 2 + .../docker/kaniko/gerrit-review.yaml | 2 + .../docker/kaniko/github-build-default.yaml | 2 + .../docker/kaniko/github-build-edp.yaml | 2 + .../docker/kaniko/github-review.yaml | 2 + .../docker/kaniko/gitlab-build-default.yaml | 2 + .../docker/kaniko/gitlab-build-edp.yaml | 2 + .../docker/kaniko/gitlab-review.yaml | 2 + .../pipelines/go/bitbucket-build-default.yaml | 15 +- .../pipelines/go/bitbucket-build-edp.yaml | 15 +- .../pipelines/go/bitbucket-review.yaml | 15 +- .../pipelines/go/gerrit-build-default.yaml | 15 +- .../pipelines/go/gerrit-build-edp.yaml | 15 +- .../templates/pipelines/go/gerrit-review.yaml | 15 +- .../pipelines/go/github-build-default.yaml | 15 +- .../pipelines/go/github-build-edp.yaml | 15 +- .../templates/pipelines/go/github-review.yaml | 15 +- .../pipelines/go/gitlab-build-default.yaml | 15 +- .../pipelines/go/gitlab-build-edp.yaml | 15 +- .../templates/pipelines/go/gitlab-review.yaml | 15 +- .../groovy/bitbucket-build-lib-default.yaml | 2 + .../groovy/bitbucket-build-lib-edp.yaml | 2 + .../groovy/bitbucket-review-lib.yaml | 2 + .../groovy/gerrit-build-lib-default.yaml | 2 + .../groovy/gerrit-build-lib-edp.yaml | 2 + .../pipelines/groovy/gerrit-review-lib.yaml | 2 + .../groovy/github-build-lib-default.yaml | 2 + .../groovy/github-build-lib-edp.yaml | 2 + .../pipelines/groovy/github-review-lib.yaml | 2 + .../groovy/gitlab-build-lib-default.yaml | 2 + .../groovy/gitlab-build-lib-edp.yaml | 2 + .../pipelines/groovy/gitlab-review-lib.yaml | 2 + .../bitbucket-build-lib-default.yaml | 2 + .../bitbucket-build-lib-edp.yaml | 2 + .../helm-pipelines/bitbucket-review-lib.yaml | 2 + .../gerrit-build-lib-default.yaml | 2 + .../helm-pipelines/gerrit-build-lib-edp.yaml | 2 + .../helm-pipelines/gerrit-review-lib.yaml | 2 + .../github-build-lib-default.yaml | 2 + .../helm-pipelines/github-build-lib-edp.yaml | 2 + .../helm-pipelines/github-review-lib.yaml | 2 + .../gitlab-build-lib-default.yaml | 2 + .../helm-pipelines/gitlab-build-lib-edp.yaml | 2 + .../helm-pipelines/gitlab-review-lib.yaml | 2 + .../helm/bitbucket-build-default.yaml | 2 + .../pipelines/helm/bitbucket-build-edp.yaml | 2 + .../helm/bitbucket-build-lib-default.yaml | 2 + .../helm/bitbucket-build-lib-edp.yaml | 2 + .../pipelines/helm/bitbucket-review-lib.yaml | 2 + .../pipelines/helm/bitbucket-review.yaml | 2 + .../pipelines/helm/gerrit-build-default.yaml | 2 + .../pipelines/helm/gerrit-build-edp.yaml | 2 + .../helm/gerrit-build-lib-default.yaml | 2 + .../pipelines/helm/gerrit-build-lib-edp.yaml | 2 + .../pipelines/helm/gerrit-review-lib.yaml | 2 + .../pipelines/helm/gerrit-review.yaml | 2 + .../pipelines/helm/github-build-default.yaml | 2 + .../pipelines/helm/github-build-edp.yaml | 2 + .../helm/github-build-lib-default.yaml | 2 + .../pipelines/helm/github-build-lib-edp.yaml | 2 + .../pipelines/helm/github-review-lib.yaml | 2 + .../pipelines/helm/github-review.yaml | 2 + .../pipelines/helm/gitlab-build-default.yaml | 2 + .../pipelines/helm/gitlab-build-edp.yaml | 2 + .../helm/gitlab-build-lib-default.yaml | 2 + .../pipelines/helm/gitlab-build-lib-edp.yaml | 2 + .../pipelines/helm/gitlab-review-lib.yaml | 2 + .../pipelines/helm/gitlab-review.yaml | 2 + .../bitbucket-build-default.yaml | 2 + .../infrastructure/bitbucket-build-edp.yaml | 2 + .../infrastructure/bitbucket-review.yaml | 2 + .../infrastructure/gerrit-build-default.yaml | 2 + .../infrastructure/gerrit-build-edp.yaml | 2 + .../infrastructure/gerrit-review.yaml | 2 + .../infrastructure/github-build-default.yaml | 2 + .../infrastructure/github-build-edp.yaml | 2 + .../infrastructure/github-review.yaml | 2 + .../infrastructure/gitlab-build-default.yaml | 2 + .../infrastructure/gitlab-build-edp.yaml | 2 + .../infrastructure/gitlab-review.yaml | 2 + .../java/gradle/bitbucket-build-default.yaml | 28 ++-- .../java/gradle/bitbucket-build-edp.yaml | 28 ++-- .../gradle/bitbucket-build-lib-default.yaml | 28 ++-- .../java/gradle/bitbucket-build-lib-edp.yaml | 28 ++-- .../java/gradle/bitbucket-review-lib.yaml | 28 ++-- .../java/gradle/bitbucket-review.yaml | 28 ++-- .../java/gradle/gerrit-build-default.yaml | 28 ++-- .../java/gradle/gerrit-build-edp.yaml | 28 ++-- .../java/gradle/gerrit-build-lib-default.yaml | 28 ++-- .../java/gradle/gerrit-build-lib-edp.yaml | 28 ++-- .../java/gradle/gerrit-review-lib.yaml | 28 ++-- .../pipelines/java/gradle/gerrit-review.yaml | 26 ++-- .../java/gradle/github-build-default.yaml | 28 ++-- .../java/gradle/github-build-edp.yaml | 28 ++-- .../java/gradle/github-build-lib-default.yaml | 28 ++-- .../java/gradle/github-build-lib-edp.yaml | 28 ++-- .../java/gradle/github-review-lib.yaml | 28 ++-- .../pipelines/java/gradle/github-review.yaml | 28 ++-- .../java/gradle/gitlab-build-default.yaml | 28 ++-- .../java/gradle/gitlab-build-edp.yaml | 28 ++-- .../java/gradle/gitlab-build-lib-default.yaml | 28 ++-- .../java/gradle/gitlab-build-lib-edp.yaml | 28 ++-- .../java/gradle/gitlab-review-lib.yaml | 28 ++-- .../pipelines/java/gradle/gitlab-review.yaml | 28 ++-- .../java/maven/bitbucket-build-default.yaml | 28 ++-- .../java/maven/bitbucket-build-edp.yaml | 28 ++-- .../maven/bitbucket-build-lib-default.yaml | 28 ++-- .../java/maven/bitbucket-build-lib-edp.yaml | 28 ++-- .../java/maven/bitbucket-review-lib.yaml | 28 ++-- .../java/maven/bitbucket-review.yaml | 28 ++-- .../java/maven/gerrit-build-default.yaml | 28 ++-- .../java/maven/gerrit-build-edp.yaml | 28 ++-- .../java/maven/gerrit-build-lib-default.yaml | 28 ++-- .../java/maven/gerrit-build-lib-edp.yaml | 28 ++-- .../java/maven/gerrit-review-lib.yaml | 28 ++-- .../pipelines/java/maven/gerrit-review.yaml | 28 ++-- .../java/maven/github-build-default.yaml | 28 ++-- .../java/maven/github-build-edp.yaml | 28 ++-- .../java/maven/github-build-lib-default.yaml | 28 ++-- .../java/maven/github-build-lib-edp.yaml | 28 ++-- .../java/maven/github-review-lib.yaml | 28 ++-- .../pipelines/java/maven/github-review.yaml | 28 ++-- .../java/maven/gitlab-build-default.yaml | 28 ++-- .../java/maven/gitlab-build-edp.yaml | 28 ++-- .../java/maven/gitlab-build-lib-default.yaml | 28 ++-- .../java/maven/gitlab-build-lib-edp.yaml | 28 ++-- .../java/maven/gitlab-review-lib.yaml | 28 ++-- .../pipelines/java/maven/gitlab-review.yaml | 28 ++-- .../npm/antora/bitbucket-build-default.yaml | 14 +- .../js/npm/antora/bitbucket-build-edp.yaml | 14 +- .../js/npm/antora/bitbucket-review.yaml | 14 +- .../js/npm/antora/gerrit-build-default.yaml | 14 +- .../js/npm/antora/gerrit-build-edp.yaml | 14 +- .../js/npm/antora/gerrit-review.yaml | 15 +- .../js/npm/antora/github-build-default.yaml | 14 +- .../js/npm/antora/github-build-edp.yaml | 14 +- .../js/npm/antora/github-review.yaml | 14 +- .../js/npm/antora/gitlab-build-default.yaml | 14 +- .../js/npm/antora/gitlab-build-edp.yaml | 14 +- .../js/npm/antora/gitlab-review.yaml | 14 +- .../js/npm/bitbucket-build-default.yaml | 15 +- .../pipelines/js/npm/bitbucket-build-edp.yaml | 15 +- .../js/npm/bitbucket-build-lib-default.yaml | 15 +- .../js/npm/bitbucket-build-lib-edp.yaml | 15 +- .../js/npm/bitbucket-review-lib.yaml | 15 +- .../pipelines/js/npm/bitbucket-review.yaml | 15 +- .../js/npm/gerrit-build-default.yaml | 15 +- .../pipelines/js/npm/gerrit-build-edp.yaml | 15 +- .../js/npm/gerrit-build-lib-default.yaml | 15 +- .../js/npm/gerrit-build-lib-edp.yaml | 15 +- .../pipelines/js/npm/gerrit-review-lib.yaml | 15 +- .../pipelines/js/npm/gerrit-review.yaml | 15 +- .../js/npm/github-build-default.yaml | 15 +- .../pipelines/js/npm/github-build-edp.yaml | 15 +- .../js/npm/github-build-lib-default.yaml | 15 +- .../js/npm/github-build-lib-edp.yaml | 15 +- .../pipelines/js/npm/github-review-lib.yaml | 15 +- .../pipelines/js/npm/github-review.yaml | 15 +- .../js/npm/gitlab-build-default.yaml | 15 +- .../pipelines/js/npm/gitlab-build-edp.yaml | 15 +- .../js/npm/gitlab-build-lib-default.yaml | 15 +- .../js/npm/gitlab-build-lib-edp.yaml | 15 +- .../pipelines/js/npm/gitlab-review-lib.yaml | 15 +- .../pipelines/js/npm/gitlab-review.yaml | 15 +- .../opa/bitbucket-build-lib-default.yaml | 2 + .../opa/bitbucket-build-lib-edp.yaml | 2 + .../pipelines/opa/bitbucket-review-lib.yaml | 2 + .../opa/gerrit-build-lib-default.yaml | 2 + .../pipelines/opa/gerrit-build-lib-edp.yaml | 2 + .../pipelines/opa/gerrit-review-lib.yaml | 2 + .../opa/github-build-lib-default.yaml | 2 + .../pipelines/opa/github-build-lib-edp.yaml | 2 + .../pipelines/opa/github-review-lib.yaml | 2 + .../opa/gitlab-build-lib-default.yaml | 2 + .../pipelines/opa/gitlab-build-lib-edp.yaml | 2 + .../pipelines/opa/gitlab-review-lib.yaml | 2 + .../ansible/bitbucket-build-lib-default.yaml | 2 + .../ansible/bitbucket-build-lib-edp.yaml | 2 + .../python/ansible/bitbucket-review-lib.yaml | 2 + .../ansible/gerrit-build-lib-default.yaml | 2 + .../python/ansible/gerrit-build-lib-edp.yaml | 2 + .../python/ansible/gerrit-review-lib.yaml | 2 + .../ansible/github-build-lib-default.yaml | 2 + .../python/ansible/github-build-lib-edp.yaml | 2 + .../python/ansible/github-review-lib.yaml | 2 + .../ansible/gitlab-build-lib-default.yaml | 2 + .../python/ansible/gitlab-build-lib-edp.yaml | 2 + .../python/ansible/gitlab-review-lib.yaml | 2 + .../bitbucket-build-default.yaml | 7 +- .../bitbucket-build-edp.yaml | 7 +- .../{fastapi => flask}/bitbucket-review.yaml | 7 +- .../gerrit-build-default.yaml | 7 +- .../{fastapi => flask}/gerrit-build-edp.yaml | 7 +- .../{fastapi => flask}/gerrit-review.yaml | 7 +- .../github-build-default.yaml | 7 +- .../{fastapi => flask}/github-build-edp.yaml | 7 +- .../{fastapi => flask}/github-review.yaml | 7 +- .../gitlab-build-default.yaml | 7 +- .../{fastapi => flask}/gitlab-build-edp.yaml | 7 +- .../{fastapi => flask}/gitlab-review.yaml | 7 +- .../bitbucket-build-default.yaml | 2 + .../{ => python3.8}/bitbucket-build-edp.yaml | 2 + .../bitbucket-build-lib-default.yaml | 2 + .../bitbucket-build-lib-edp.yaml | 2 + .../{ => python3.8}/bitbucket-review-lib.yaml | 2 + .../{ => python3.8}/bitbucket-review.yaml | 2 + .../{ => python3.8}/gerrit-build-default.yaml | 2 + .../{ => python3.8}/gerrit-build-edp.yaml | 2 + .../gerrit-build-lib-default.yaml | 2 + .../{ => python3.8}/gerrit-build-lib-edp.yaml | 2 + .../{ => python3.8}/gerrit-review-lib.yaml | 2 + .../python/{ => python3.8}/gerrit-review.yaml | 2 + .../{ => python3.8}/github-build-default.yaml | 2 + .../{ => python3.8}/github-build-edp.yaml | 2 + .../github-build-lib-default.yaml | 2 + .../{ => python3.8}/github-build-lib-edp.yaml | 2 + .../{ => python3.8}/github-review-lib.yaml | 2 + .../python/{ => python3.8}/github-review.yaml | 2 + .../{ => python3.8}/gitlab-build-default.yaml | 2 + .../{ => python3.8}/gitlab-build-edp.yaml | 2 + .../gitlab-build-lib-default.yaml | 2 + .../{ => python3.8}/gitlab-build-lib-edp.yaml | 2 + .../{ => python3.8}/gitlab-review-lib.yaml | 2 + .../python/{ => python3.8}/gitlab-review.yaml | 2 + .../rpm/maven/bitbucket-build-default.yaml | 29 ++-- .../rpm/maven/bitbucket-build-edp.yaml | 29 ++-- .../pipelines/rpm/maven/bitbucket-review.yaml | 29 ++-- .../rpm/maven/gerrit-build-default.yaml | 29 ++-- .../pipelines/rpm/maven/gerrit-build-edp.yaml | 29 ++-- .../pipelines/rpm/maven/gerrit-review.yaml | 29 ++-- .../rpm/maven/github-build-default.yaml | 29 ++-- .../pipelines/rpm/maven/github-build-edp.yaml | 29 ++-- .../pipelines/rpm/maven/github-review.yaml | 29 ++-- .../rpm/maven/gitlab-build-default.yaml | 29 ++-- .../pipelines/rpm/maven/gitlab-build-edp.yaml | 29 ++-- .../pipelines/rpm/maven/gitlab-review.yaml | 29 ++-- .../bitbucket-build-lib-default.yaml | 2 + .../terraform/bitbucket-build-lib-edp.yaml | 2 + .../terraform/bitbucket-review-lib.yaml | 2 + .../terraform/gerrit-build-lib-default.yaml | 2 + .../terraform/gerrit-build-lib-edp.yaml | 2 + .../terraform/gerrit-review-lib.yaml | 2 + .../terraform/github-build-lib-default.yaml | 2 + .../terraform/github-build-lib-edp.yaml | 2 + .../terraform/github-review-lib.yaml | 2 + .../terraform/gitlab-build-lib-default.yaml | 2 + .../terraform/gitlab-build-lib-edp.yaml | 2 + .../terraform/gitlab-review-lib.yaml | 2 + .../templates/tasks/ansible.yaml | 2 + .../autotest-cd-pipeline/init-autotests.yaml | 2 + .../run-autotests-java.yaml | 2 + .../autotest-cd-pipeline/wait-autotest.yaml | 2 + .../tasks/autotests/TestsMavenAutotest.yaml | 2 + .../templates/tasks/bitbucket-set-status.yaml | 2 + .../templates/tasks/cd/clean.yaml | 2 + .../tasks/cd/deploy-ansible-awx.yaml | 2 + .../templates/tasks/cd/deploy-ansible.yaml | 2 + .../tasks/cd/deploy-applicationset-cli.yaml | 2 + .../templates/tasks/cd/run-quality-gate.yaml | 2 + .../tasks/cd/run-\321\201leanup-gate.yaml" | 2 + .../templates/tasks/cdxgen.yaml | 2 + .../tasks/check-helm-chart-name.yaml | 3 +- .../templates/tasks/codenarc.yaml | 2 + .../templates/tasks/commit-validate.yaml | 2 + .../tasks/create-ecr-repository.yaml | 2 + .../templates/tasks/dotnet.yaml | 2 + .../templates/tasks/ecr-to-docker.yaml | 2 + .../templates/tasks/edp-c.yaml | 2 + .../templates/tasks/edp-dotnet.yaml | 2 + .../templates/tasks/edp-gradle.yaml | 2 + .../templates/tasks/edp-npm.yaml | 2 + .../templates/tasks/edp-rpm.yaml | 2 + .../templates/tasks/gerrit-ssh-cmd.yaml | 2 + .../templates/tasks/get-cache.yaml | 2 + .../getversion/defaulttype/GetVersion.yaml | 2 + .../defaulttype/GetVersionHelm.yaml | 2 + .../getversion/defaulttype/GetVersionRPM.yaml | 2 + .../defaulttype/UpdateBuildNumberDotnet.yaml | 2 + .../defaulttype/UpdateBuildNumberGradle.yaml | 2 + .../defaulttype/UpdateBuildNumberNpm.yaml | 2 + .../defaulttype/UpdateBuildNumberPython.yaml | 2 + .../getversion/edptype/GetVersionEDP.yaml | 2 + .../edptype/UpdateBuildNumberCsharp.yaml | 2 + .../edptype/UpdateBuildNumberDotnet.yaml | 2 + .../edptype/UpdateBuildNumberGradle.yaml | 2 + .../edptype/UpdateBuildNumberHelmChart.yaml | 2 + .../edptype/UpdateBuildNumberNpm.yaml | 2 + .../edptype/UpdateBuildNumberPython.yaml | 2 + .../templates/tasks/git-cli.yaml | 2 + .../templates/tasks/git-clone.yaml | 2 + .../templates/tasks/github-set-status.yaml | 2 + .../templates/tasks/gitlab-set-status.yaml | 2 + .../pipelines-library/templates/tasks/go.yaml | 2 + .../templates/tasks/gradle.yaml | 2 + .../templates/tasks/hadolint.yaml | 2 + .../tasks/helm-dependency-update.yaml | 2 + .../templates/tasks/helm-docs.yaml | 2 + .../helm-dependency-update-lib.yaml | 2 + .../tasks/helm-libraries/helm-docs-lib.yaml | 2 + .../tasks/helm-libraries/helm-lint-lib.yaml | 2 + .../tasks/helm-libraries/helm-push-lib.yaml | 2 + .../helm-libraries/helm-template-lib.yaml | 2 + .../templates/tasks/helm-lint.yaml | 2 + .../templates/tasks/helm-push.yaml | 2 + .../templates/tasks/helm-template.yaml | 2 + .../templates/tasks/image-scan.yaml | 2 + .../templates/tasks/init-values.yaml | 2 + .../tasks/kaniko-dockerbuild-verify.yaml | 2 + .../templates/tasks/kaniko.yaml | 2 + .../templates/tasks/maven-get-module.yaml | 2 + .../templates/tasks/maven.yaml | 2 + .../templates/tasks/npm.yaml | 2 + .../templates/tasks/opa.yaml | 2 + .../templates/tasks/promote-images.yaml | 2 + .../templates/tasks/push-to-jira.yaml | 2 + .../templates/tasks/python.yaml | 2 + .../templates/tasks/save-cache.yaml | 2 + .../templates/tasks/security.yaml | 2 + .../tasks/send-to-microsoft-teams.yaml | 2 + .../tasks/sonar/sonarqube-dotnet.yaml | 2 + .../tasks/sonar/sonarqube-general.yaml | 2 + .../tasks/sonar/sonarqube-gradle.yaml | 2 + .../tasks/sonar/sonarqube-maven.yaml | 2 + .../templates/tasks/terraform-check.yaml | 2 + .../templates/tasks/terraform.yaml | 2 + .../templates/tasks/trivy-scan.yaml | 2 + .../templates/tasks/update-cbb.yaml | 2 + .../templates/tasks/update-cbis.yaml | 2 + .../tests/test_dotnet_pipelines.py | 20 +++ .../test_java_autotest_gradle_pipelines.py | 18 ++- .../test_java_autotest_maven_pipelines.py | 16 ++ .../tests/test_java_gradle_pipelines.py | 16 ++ .../tests/test_java_maven_pipelines.py | 16 ++ .../tests/test_opa_pipelines.py | 12 ++ .../tests/test_python_pipelines.py | 48 ++++++ charts/pipelines-library/values.yaml | 41 +++++ 421 files changed, 2408 insertions(+), 1891 deletions(-) rename charts/pipelines-library/templates/pipelines/python/{fastapi => flask}/bitbucket-build-default.yaml (91%) rename charts/pipelines-library/templates/pipelines/python/{fastapi => flask}/bitbucket-build-edp.yaml (91%) rename charts/pipelines-library/templates/pipelines/python/{fastapi => flask}/bitbucket-review.yaml (90%) rename charts/pipelines-library/templates/pipelines/python/{fastapi => flask}/gerrit-build-default.yaml (94%) rename charts/pipelines-library/templates/pipelines/python/{fastapi => flask}/gerrit-build-edp.yaml (94%) rename charts/pipelines-library/templates/pipelines/python/{fastapi => flask}/gerrit-review.yaml (92%) rename charts/pipelines-library/templates/pipelines/python/{fastapi => flask}/github-build-default.yaml (91%) rename charts/pipelines-library/templates/pipelines/python/{fastapi => flask}/github-build-edp.yaml (91%) rename charts/pipelines-library/templates/pipelines/python/{fastapi => flask}/github-review.yaml (90%) rename charts/pipelines-library/templates/pipelines/python/{fastapi => flask}/gitlab-build-default.yaml (91%) rename charts/pipelines-library/templates/pipelines/python/{fastapi => flask}/gitlab-build-edp.yaml (91%) rename charts/pipelines-library/templates/pipelines/python/{fastapi => flask}/gitlab-review.yaml (90%) rename charts/pipelines-library/templates/pipelines/python/{ => python3.8}/bitbucket-build-default.yaml (97%) rename charts/pipelines-library/templates/pipelines/python/{ => python3.8}/bitbucket-build-edp.yaml (97%) rename charts/pipelines-library/templates/pipelines/python/{ => python3.8}/bitbucket-build-lib-default.yaml (97%) rename charts/pipelines-library/templates/pipelines/python/{ => python3.8}/bitbucket-build-lib-edp.yaml (97%) rename charts/pipelines-library/templates/pipelines/python/{ => python3.8}/bitbucket-review-lib.yaml (95%) rename charts/pipelines-library/templates/pipelines/python/{ => python3.8}/bitbucket-review.yaml (97%) rename charts/pipelines-library/templates/pipelines/python/{ => python3.8}/gerrit-build-default.yaml (97%) rename charts/pipelines-library/templates/pipelines/python/{ => python3.8}/gerrit-build-edp.yaml (97%) rename charts/pipelines-library/templates/pipelines/python/{ => python3.8}/gerrit-build-lib-default.yaml (97%) rename charts/pipelines-library/templates/pipelines/python/{ => python3.8}/gerrit-build-lib-edp.yaml (97%) rename charts/pipelines-library/templates/pipelines/python/{ => python3.8}/gerrit-review-lib.yaml (95%) rename charts/pipelines-library/templates/pipelines/python/{ => python3.8}/gerrit-review.yaml (96%) rename charts/pipelines-library/templates/pipelines/python/{ => python3.8}/github-build-default.yaml (97%) rename charts/pipelines-library/templates/pipelines/python/{ => python3.8}/github-build-edp.yaml (97%) rename charts/pipelines-library/templates/pipelines/python/{ => python3.8}/github-build-lib-default.yaml (97%) rename charts/pipelines-library/templates/pipelines/python/{ => python3.8}/github-build-lib-edp.yaml (97%) rename charts/pipelines-library/templates/pipelines/python/{ => python3.8}/github-review-lib.yaml (95%) rename charts/pipelines-library/templates/pipelines/python/{ => python3.8}/github-review.yaml (97%) rename charts/pipelines-library/templates/pipelines/python/{ => python3.8}/gitlab-build-default.yaml (97%) rename charts/pipelines-library/templates/pipelines/python/{ => python3.8}/gitlab-build-edp.yaml (97%) rename charts/pipelines-library/templates/pipelines/python/{ => python3.8}/gitlab-build-lib-default.yaml (97%) rename charts/pipelines-library/templates/pipelines/python/{ => python3.8}/gitlab-build-lib-edp.yaml (97%) rename charts/pipelines-library/templates/pipelines/python/{ => python3.8}/gitlab-review-lib.yaml (95%) rename charts/pipelines-library/templates/pipelines/python/{ => python3.8}/gitlab-review.yaml (97%) diff --git a/charts/pipelines-library/README.md b/charts/pipelines-library/README.md index c7aad58b..a70ce885 100644 --- a/charts/pipelines-library/README.md +++ b/charts/pipelines-library/README.md @@ -133,6 +133,10 @@ Follows [Tekton Interceptor](https://tekton.dev/vault/triggers-main/clusterinter | kaniko.image.tag | string | `"v1.12.1"` | | | kaniko.roleArn | string | `""` | AWS IAM role to be used for kaniko pod service account (IRSA). Format: arn:aws:iam:::role/ | | nameOverride | string | `""` | | +| pipelines.deployableResources | object | `{"c":{"cmake":true,"make":true},"cs":{"dotnet3.1":false,"dotnet6.0":false},"deploy":true,"docker":true,"go":{"beego":true,"gin":true,"operatorsdk":true},"groovy":true,"helm":true,"helm-pipeline":true,"infrastructure":true,"java":{"java11":true,"java17":true,"java8":false},"js":{"angular":true,"antora":true,"express":true,"next":true,"react":true,"vue":true},"opa":false,"python":{"ansible":true,"fastapi":true,"flask":true,"python3.8":false},"tasks":true,"terraform":true}` | This section contains the list of pipelines and tasks that will be installed. | +| pipelines.deployableResources.c | object | `{"cmake":true,"make":true}` | This section control the installation of the review and build pipelines. | +| pipelines.deployableResources.deploy | bool | `true` | This flag control the installation of the Deploy pipelines. | +| pipelines.deployableResources.tasks | bool | `true` | This flag control the installation of the tasks. | | pipelines.image.registry | string | `"docker.io"` | Registry for tekton pipelines images. Default: docker.io | | tekton-cache.enabled | bool | `true` | Enables the Tekton-cache subchart. | | tekton-cache.url | string | `"http://tekton-cache:8080"` | Defines the URL to the tekton-cache. Default: http://tekton-cache:8080 | diff --git a/charts/pipelines-library/templates/_helpers.tpl b/charts/pipelines-library/templates/_helpers.tpl index 909ba972..c2a64e20 100644 --- a/charts/pipelines-library/templates/_helpers.tpl +++ b/charts/pipelines-library/templates/_helpers.tpl @@ -60,3 +60,144 @@ Define registry for pipelines images {{- define "edp-tekton.registry" -}} {{- .Values.pipelines.image.registry -}} {{- end -}} + +# Mapping for Java Maven (application and library) pipeliens +{{- define "edp-tekton.resourceMapping.maven" -}} +{{- $registry := .Values.pipelines.image.registry -}} +{{- $mavenVersions := dict -}} +{{- with .Values.pipelines.deployableResources.java -}} + {{- if .java8 }} + {{- $mavenVersions = set $mavenVersions "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) }} + {{- end }} + {{- if .java11 }} + {{- $mavenVersions = set $mavenVersions "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) }} + {{- end }} + {{- if .java17 }} + {{- $mavenVersions = set $mavenVersions "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) }} + {{- end }} +{{- end }} +{{- $mavenVersions | toYaml -}} +{{- end }} + +{{- define "edp-tekton.resourceMapping.mavenSonar" -}} +{{- $registry := .Values.pipelines.image.registry -}} +{{- $sonarVersions := dict -}} +{{- with .Values.pipelines.deployableResources.java -}} + {{- if .java8 }} + {{- $sonarVersions = set $sonarVersions "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) }} + {{- end }} + {{- if .java11 }} + {{- $sonarVersions = set $sonarVersions "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) }} + {{- end }} + {{- if .java17 }} + {{- $sonarVersions = set $sonarVersions "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) }} + {{- end }} +{{- end }} +{{- $sonarVersions | toYaml -}} +{{- end }} + +# Mapping for Java Gradle (application and library) pipeliens +{{- define "edp-tekton.resourceMapping.gradle" -}} +{{- $registry := .Values.pipelines.image.registry -}} +{{- $gradleVersions := dict -}} +{{- with .Values.pipelines.deployableResources.java -}} + {{- if .java8 }} + {{- $gradleVersions = set $gradleVersions "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) }} + {{- end }} + {{- if .java11 }} + {{- $gradleVersions = set $gradleVersions "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) }} + {{- end }} + {{- if .java17 }} + {{- $gradleVersions = set $gradleVersions "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) }} + {{- end }} +{{- end }} +{{- $gradleVersions | toYaml -}} +{{- end }} + +{{- define "edp-tekton.resourceMapping.gradleSonar" -}} +{{- $registry := .Values.pipelines.image.registry -}} +{{- $sonarVersions := dict -}} +{{- with .Values.pipelines.deployableResources.java -}} + {{- if .java8 }} + {{- $sonarVersions = set $sonarVersions "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) }} + {{- end }} + {{- if .java11 }} + {{- $sonarVersions = set $sonarVersions "java11" (printf "%sgradle:7.5.1-jdk11" $registry) }} + {{- end }} + {{- if .java17 }} + {{- $sonarVersions = set $sonarVersions "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) }} + {{- end }} +{{- end }} +{{- $sonarVersions | toYaml -}} +{{- end }} + + +# Mapping for Go pipelines +{{- define "edp-tekton.resourceMapping.go" -}} +{{- $go := list -}} +{{- with .Values.pipelines.deployableResources.go -}} + {{- if .beego }} + {{- $go = append $go "beego" }} + {{- end }} + {{- if .gin }} + {{- $go = append $go "gin" }} + {{- end }} + {{- if .operatorsdk }} + {{- $go = append $go "operator-sdk" }} + {{- end }} +{{- end }} +{{- $go -}} +{{- end }} + +# Mapping for JS pipelines +{{- define "edp-tekton.resourceMapping.js" -}} +{{- $js := list -}} +{{- with .Values.pipelines.deployableResources.js -}} + {{- if .vue }} + {{- $js = append $js "vue" }} + {{- end }} + {{- if .angular }} + {{- $js = append $js "angular" }} + {{- end }} + {{- if .express }} + {{- $js = append $js "express" }} + {{- end }} + {{- if .next }} + {{- $js = append $js "next" }} + {{- end }} + {{- if .react }} + {{- $js = append $js "react" }} + {{- end }} +{{- end }} +{{- $js -}} +{{- end }} + +# Mapping for Pyhton pipelines +{{- define "edp-tekton.resourceMapping.python" -}} +{{- $python := list -}} +{{- with .Values.pipelines.deployableResources.python -}} + {{- if .fastapi }} + {{- $python = append $python "fastapi" }} + {{- end }} + {{- if .flask }} + {{- $python = append $python "flask" }} + {{- end }} +{{- end }} +{{- $python -}} +{{- end }} + + +# Mapping for Csharp pipeliens +{{- define "edp-tekton.resourceMapping.cs" -}} +{{- $registry := .Values.pipelines.image.registry -}} +{{- $csVersions := dict -}} +{{- with .Values.pipelines.deployableResources.cs -}} + {{- if (index . "dotnet3.1" )}} + {{- $csVersions = set $csVersions "dotnet-3.1" "mcr.microsoft.com/dotnet/sdk:3.1.423-alpine3.16" }} + {{- end }} + {{- if (index . "dotnet6.0" ) }} + {{- $csVersions = set $csVersions "dotnet-6.0" "mcr.microsoft.com/dotnet/sdk:6.0.407-alpine3.17" }} + {{- end }} +{{- end }} +{{- $csVersions | toYaml -}} +{{- end }} diff --git a/charts/pipelines-library/templates/pipelines/autotests/gradle/bitbucket-build-default.yaml b/charts/pipelines-library/templates/pipelines/autotests/gradle/bitbucket-build-default.yaml index 5cec06a5..d6500819 100644 --- a/charts/pipelines-library/templates/pipelines/autotests/gradle/bitbucket-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/autotests/gradle/bitbucket-build-default.yaml @@ -1,26 +1,18 @@ {{ if has "bitbucket" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-gradle-{{ $k }}-aut-build-default + name: bitbucket-gradle-{{ $framework }}-aut-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} automation tests with Gradle (default version)" + description: "The Build pipeline for building {{ $framework }} automation tests with Gradle (default version)" workspaces: - name: shared-workspace - name: ssh-creds @@ -34,7 +26,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-gradle' + default: '{{ $framework }}-gradle' description: "Project name" type: string - name: changeNumber @@ -42,11 +34,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string @@ -135,3 +127,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/autotests/gradle/bitbucket-build-edp.yaml b/charts/pipelines-library/templates/pipelines/autotests/gradle/bitbucket-build-edp.yaml index 9e088b2e..33ed8882 100644 --- a/charts/pipelines-library/templates/pipelines/autotests/gradle/bitbucket-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/autotests/gradle/bitbucket-build-edp.yaml @@ -1,26 +1,18 @@ {{ if has "bitbucket" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-gradle-{{ $k }}-aut-build-edp + name: bitbucket-gradle-{{ $framework }}-aut-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} automation tests with Gradle (EDP version)" + description: "The Build pipeline for building {{ $framework }} automation tests with Gradle (EDP version)" workspaces: - name: shared-workspace - name: ssh-creds @@ -34,7 +26,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-gradle' + default: '{{ $framework }}-gradle' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -45,7 +37,7 @@ spec: default: "" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string @@ -116,3 +108,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/autotests/gradle/bitbucket-review.yaml b/charts/pipelines-library/templates/pipelines/autotests/gradle/bitbucket-review.yaml index a876b9b5..a3621bde 100644 --- a/charts/pipelines-library/templates/pipelines/autotests/gradle/bitbucket-review.yaml +++ b/charts/pipelines-library/templates/pipelines/autotests/gradle/bitbucket-review.yaml @@ -1,26 +1,18 @@ {{ if has "bitbucket" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-gradle-{{ $k }}-aut-review + name: bitbucket-gradle-{{ $framework }}-aut-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} automation tests with Gradle" + description: "The Review pipeline for building {{ $framework }} automation tests with Gradle" workspaces: - name: shared-workspace - name: ssh-creds @@ -45,18 +37,18 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: '{{ $k }}-gradle' + default: '{{ $framework }}-gradle' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: gitfullrepositoryname @@ -99,3 +91,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/autotests/gradle/gerrit-build-default.yaml b/charts/pipelines-library/templates/pipelines/autotests/gradle/gerrit-build-default.yaml index 0cdf4cc3..95b3d19b 100644 --- a/charts/pipelines-library/templates/pipelines/autotests/gradle/gerrit-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/autotests/gradle/gerrit-build-default.yaml @@ -1,26 +1,18 @@ {{ if has "gerrit" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-gradle-{{ $k }}-aut-build-default + name: gerrit-gradle-{{ $framework }}-aut-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} automation tests with Gradle (default versioning)" + description: "The Build pipeline for building {{ $framework }} automation tests with Gradle (default versioning)" workspaces: - name: shared-workspace @@ -39,15 +31,15 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-gradle' + default: '{{ $framework }}-gradle' description: "Project name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: changeNumber @@ -140,3 +132,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/autotests/gradle/gerrit-build-edp.yaml b/charts/pipelines-library/templates/pipelines/autotests/gradle/gerrit-build-edp.yaml index f90032fe..0f472bf3 100644 --- a/charts/pipelines-library/templates/pipelines/autotests/gradle/gerrit-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/autotests/gradle/gerrit-build-edp.yaml @@ -1,26 +1,18 @@ {{ if has "gerrit" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-gradle-{{ $k }}-aut-build-edp + name: gerrit-gradle-{{ $framework }}-aut-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} automation tests with Gradle (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} automation tests with Gradle (EDP versioning)" workspaces: - name: shared-workspace @@ -39,18 +31,18 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-gradle' + default: '{{ $framework }}-gradle' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: changeNumber @@ -125,3 +117,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/autotests/gradle/gerrit-review.yaml b/charts/pipelines-library/templates/pipelines/autotests/gradle/gerrit-review.yaml index 71214488..52a9c0c0 100644 --- a/charts/pipelines-library/templates/pipelines/autotests/gradle/gerrit-review.yaml +++ b/charts/pipelines-library/templates/pipelines/autotests/gradle/gerrit-review.yaml @@ -1,26 +1,18 @@ {{ if has "gerrit" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-gradle-{{ $k }}-aut-review + name: gerrit-gradle-{{ $framework }}-aut-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} automation tests with Gradle" + description: "The Review pipeline for building {{ $framework }} automation tests with Gradle" workspaces: - name: shared-workspace @@ -43,15 +35,15 @@ spec: default: "" type: string - name: CODEBASE_NAME - default: '{{ $k }}-gradle' + default: '{{ $framework }}-gradle' description: "Project name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: targetBranch @@ -98,3 +90,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/autotests/gradle/github-build-default.yaml b/charts/pipelines-library/templates/pipelines/autotests/gradle/github-build-default.yaml index 6ba5537c..c9f328cd 100644 --- a/charts/pipelines-library/templates/pipelines/autotests/gradle/github-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/autotests/gradle/github-build-default.yaml @@ -1,26 +1,18 @@ {{ if has "github" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-gradle-{{ $k }}-aut-build-default + name: github-gradle-{{ $framework }}-aut-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} automation tests with Gradle (default version)" + description: "The Build pipeline for building {{ $framework }} automation tests with Gradle (default version)" workspaces: - name: shared-workspace @@ -36,7 +28,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-gradle' + default: '{{ $framework }}-gradle' description: "Project name" type: string - name: changeNumber @@ -44,11 +36,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string @@ -137,3 +129,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/autotests/gradle/github-build-edp.yaml b/charts/pipelines-library/templates/pipelines/autotests/gradle/github-build-edp.yaml index 97598c5d..7341cb87 100644 --- a/charts/pipelines-library/templates/pipelines/autotests/gradle/github-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/autotests/gradle/github-build-edp.yaml @@ -1,26 +1,18 @@ {{ if has "github" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-gradle-{{ $k }}-aut-build-edp + name: github-gradle-{{ $framework }}-aut-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} automation tests with Gradle (EDP version)" + description: "The Build pipeline for building {{ $framework }} automation tests with Gradle (EDP version)" workspaces: - name: shared-workspace - name: ssh-creds @@ -34,11 +26,11 @@ spec: default: "edp" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: CODEBASE_NAME - default: '{{ $k }}-gradle' + default: '{{ $framework }}-gradle' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -116,3 +108,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/autotests/gradle/github-review.yaml b/charts/pipelines-library/templates/pipelines/autotests/gradle/github-review.yaml index a0b6a1c5..40407a8a 100644 --- a/charts/pipelines-library/templates/pipelines/autotests/gradle/github-review.yaml +++ b/charts/pipelines-library/templates/pipelines/autotests/gradle/github-review.yaml @@ -1,26 +1,18 @@ {{ if has "github" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-gradle-{{ $k }}-aut-review + name: github-gradle-{{ $framework }}-aut-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} automation tests with Gradle" + description: "The Review pipeline for building {{ $framework }} automation tests with Gradle" workspaces: - name: shared-workspace - name: ssh-creds @@ -45,18 +37,18 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: '{{ $k }}-gradle' + default: '{{ $framework }}-gradle' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: gitfullrepositoryname @@ -102,3 +94,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/autotests/gradle/gitlab-build-default.yaml b/charts/pipelines-library/templates/pipelines/autotests/gradle/gitlab-build-default.yaml index 0308eac1..55ceeeb6 100644 --- a/charts/pipelines-library/templates/pipelines/autotests/gradle/gitlab-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/autotests/gradle/gitlab-build-default.yaml @@ -1,26 +1,18 @@ {{ if has "gitlab" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-gradle-{{ $k }}-aut-build-default + name: gitlab-gradle-{{ $framework }}-aut-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} automation tests with Gradle (default version)" + description: "The Build pipeline for building {{ $framework }} automation tests with Gradle (default version)" workspaces: - name: shared-workspace - name: ssh-creds @@ -34,7 +26,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-gradle' + default: '{{ $framework }}-gradle' description: "Project name" type: string - name: changeNumber @@ -42,11 +34,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string @@ -135,3 +127,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/autotests/gradle/gitlab-build-edp.yaml b/charts/pipelines-library/templates/pipelines/autotests/gradle/gitlab-build-edp.yaml index 95c7581b..3bcff39f 100644 --- a/charts/pipelines-library/templates/pipelines/autotests/gradle/gitlab-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/autotests/gradle/gitlab-build-edp.yaml @@ -1,26 +1,18 @@ {{ if has "gitlab" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-gradle-{{ $k }}-aut-build-edp + name: gitlab-gradle-{{ $framework }}-aut-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} automation tests with Gradle (EDP version)" + description: "The Build pipeline for building {{ $framework }} automation tests with Gradle (EDP version)" workspaces: - name: shared-workspace - name: ssh-creds @@ -34,7 +26,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-gradle' + default: '{{ $framework }}-gradle' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -45,7 +37,7 @@ spec: default: "" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string @@ -116,3 +108,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/autotests/gradle/gitlab-review.yaml b/charts/pipelines-library/templates/pipelines/autotests/gradle/gitlab-review.yaml index abbafb84..93a354b6 100644 --- a/charts/pipelines-library/templates/pipelines/autotests/gradle/gitlab-review.yaml +++ b/charts/pipelines-library/templates/pipelines/autotests/gradle/gitlab-review.yaml @@ -1,26 +1,18 @@ {{ if has "gitlab" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-gradle-{{ $k }}-aut-review + name: gitlab-gradle-{{ $framework }}-aut-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} automation tests with Gradle" + description: "The Review pipeline for building {{ $framework }} automation tests with Gradle" workspaces: - name: shared-workspace - name: ssh-creds @@ -45,18 +37,18 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: '{{ $k }}-gradle' + default: '{{ $framework }}-gradle' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: gitfullrepositoryname @@ -99,3 +91,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/autotests/maven/bitbucket-build-default.yaml b/charts/pipelines-library/templates/pipelines/autotests/maven/bitbucket-build-default.yaml index f23e9436..7a188243 100644 --- a/charts/pipelines-library/templates/pipelines/autotests/maven/bitbucket-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/autotests/maven/bitbucket-build-default.yaml @@ -1,20 +1,18 @@ {{ if has "bitbucket" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-maven-{{ $k }}-aut-build-default + name: bitbucket-maven-{{ $framework }}-aut-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} automation tests with Maven (default versioning)" + description: "The Build pipeline for building {{ $framework }} automation tests with Maven (default versioning)" workspaces: - name: shared-workspace @@ -30,7 +28,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: changeNumber @@ -38,11 +36,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: "maven:3.9.0-eclipse-temurin-17" + default: '{{ $sonarImage }}' description: "sonar image version" type: string @@ -133,3 +131,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/autotests/maven/bitbucket-build-edp.yaml b/charts/pipelines-library/templates/pipelines/autotests/maven/bitbucket-build-edp.yaml index 29ac87a0..e67836b6 100644 --- a/charts/pipelines-library/templates/pipelines/autotests/maven/bitbucket-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/autotests/maven/bitbucket-build-edp.yaml @@ -1,20 +1,18 @@ {{ if has "bitbucket" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-maven-{{ $k }}-aut-build-edp + name: bitbucket-maven-{{ $framework }}-aut-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} automation tests with Maven (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} automation tests with Maven (EDP versioning)" workspaces: - name: shared-workspace @@ -30,7 +28,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -41,7 +39,7 @@ spec: default: "" type: string - name: sonar_image - default: "maven:3.9.0-eclipse-temurin-17" + default: '{{ $sonarImage }}' description: "sonar image version" type: string @@ -111,3 +109,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/autotests/maven/bitbucket-review.yaml b/charts/pipelines-library/templates/pipelines/autotests/maven/bitbucket-review.yaml index 726bb35c..f90ac54d 100644 --- a/charts/pipelines-library/templates/pipelines/autotests/maven/bitbucket-review.yaml +++ b/charts/pipelines-library/templates/pipelines/autotests/maven/bitbucket-review.yaml @@ -1,20 +1,18 @@ {{ if has "bitbucket" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-maven-{{ $k }}-aut-review + name: bitbucket-maven-{{ $framework }}-aut-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} automation tests with Maven" + description: "The Review pipeline for building {{ $framework }} automation tests with Maven" workspaces: - name: shared-workspace - name: ssh-creds @@ -40,18 +38,18 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: "maven:3.9.0-eclipse-temurin-17" + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: gitfullrepositoryname @@ -107,3 +105,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/autotests/maven/gerrit-build-default.yaml b/charts/pipelines-library/templates/pipelines/autotests/maven/gerrit-build-default.yaml index 28a78bc6..eff9e547 100644 --- a/charts/pipelines-library/templates/pipelines/autotests/maven/gerrit-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/autotests/maven/gerrit-build-default.yaml @@ -1,20 +1,18 @@ {{ if has "gerrit" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-maven-{{ $k }}-aut-build-default + name: gerrit-maven-{{ $framework }}-aut-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} automation tests with Maven (default version)" + description: "The Build pipeline for building {{ $framework }} automation tests with Maven (default version)" workspaces: - name: shared-workspace - name: ssh-creds @@ -31,11 +29,11 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: changeNumber @@ -43,7 +41,7 @@ spec: - name: patchsetNumber description: Patchset number from Merge Request - name: sonar_image - default: "maven:3.9.0-eclipse-temurin-17" + default: '{{ $sonarImage }}' description: "sonar image version" type: string @@ -134,3 +132,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/autotests/maven/gerrit-build-edp.yaml b/charts/pipelines-library/templates/pipelines/autotests/maven/gerrit-build-edp.yaml index 4bccf62e..786f897a 100644 --- a/charts/pipelines-library/templates/pipelines/autotests/maven/gerrit-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/autotests/maven/gerrit-build-edp.yaml @@ -1,20 +1,18 @@ {{ if has "gerrit" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-maven-{{ $k }}-aut-build-edp + name: gerrit-maven-{{ $framework }}-aut-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} automation tests with Maven (default version)" + description: "The Build pipeline for building {{ $framework }} automation tests with Maven (default version)" workspaces: - name: shared-workspace - name: ssh-creds @@ -31,14 +29,14 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: changeNumber @@ -46,7 +44,7 @@ spec: - name: patchsetNumber description: Patchset number from Merge Request - name: sonar_image - default: "maven:3.9.0-eclipse-temurin-17" + default: '{{ $sonarImage }}' description: "sonar image version" type: string @@ -116,3 +114,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/autotests/maven/gerrit-review.yaml b/charts/pipelines-library/templates/pipelines/autotests/maven/gerrit-review.yaml index 837c1d6e..e842bcb7 100644 --- a/charts/pipelines-library/templates/pipelines/autotests/maven/gerrit-review.yaml +++ b/charts/pipelines-library/templates/pipelines/autotests/maven/gerrit-review.yaml @@ -1,20 +1,18 @@ {{ if has "gerrit" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-maven-{{ $k }}-aut-review + name: gerrit-maven-{{ $framework }}-aut-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} automation tests with Maven" + description: "The Review pipeline for building {{ $framework }} automation tests with Maven" workspaces: - name: shared-workspace - name: ssh-creds @@ -35,15 +33,15 @@ spec: default: "" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: "maven:3.9.0-eclipse-temurin-17" + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: targetBranch @@ -102,3 +100,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/autotests/maven/github-build-default.yaml b/charts/pipelines-library/templates/pipelines/autotests/maven/github-build-default.yaml index 43e8cb3d..aeba72b9 100644 --- a/charts/pipelines-library/templates/pipelines/autotests/maven/github-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/autotests/maven/github-build-default.yaml @@ -1,20 +1,18 @@ {{ if has "github" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-maven-{{ $k }}-aut-build-default + name: github-maven-{{ $framework }}-aut-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} automation tests with Maven (default version)" + description: "The Build pipeline for building {{ $framework }} automation tests with Maven (default version)" workspaces: - name: shared-workspace - name: ssh-creds @@ -28,7 +26,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: changeNumber @@ -36,11 +34,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: "maven:3.9.0-eclipse-temurin-17" + default: '{{ $sonarImage }}' description: "sonar image version" type: string @@ -131,3 +129,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/autotests/maven/github-build-edp.yaml b/charts/pipelines-library/templates/pipelines/autotests/maven/github-build-edp.yaml index 4945e3b4..3a3f88dd 100644 --- a/charts/pipelines-library/templates/pipelines/autotests/maven/github-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/autotests/maven/github-build-edp.yaml @@ -1,20 +1,18 @@ {{ if has "github" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-maven-{{ $k }}-aut-build-edp + name: github-maven-{{ $framework }}-aut-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} automation tests with Maven (default version)" + description: "The Build pipeline for building {{ $framework }} automation tests with Maven (default version)" workspaces: - name: shared-workspace - name: ssh-creds @@ -28,7 +26,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -39,7 +37,7 @@ spec: default: "" type: string - name: sonar_image - default: "maven:3.9.0-eclipse-temurin-17" + default: '{{ $sonarImage }}' description: "sonar image version" type: string @@ -109,3 +107,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/autotests/maven/github-review.yaml b/charts/pipelines-library/templates/pipelines/autotests/maven/github-review.yaml index 149d2071..35852cb4 100644 --- a/charts/pipelines-library/templates/pipelines/autotests/maven/github-review.yaml +++ b/charts/pipelines-library/templates/pipelines/autotests/maven/github-review.yaml @@ -1,20 +1,18 @@ {{ if has "github" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-maven-{{ $k }}-aut-review + name: github-maven-{{ $framework }}-aut-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} automation tests with Maven" + description: "The Review pipeline for building {{ $framework }} automation tests with Maven" workspaces: - name: shared-workspace - name: ssh-creds @@ -39,18 +37,18 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: "maven:3.9.0-eclipse-temurin-17" + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: gitfullrepositoryname @@ -109,3 +107,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/autotests/maven/gitlab-build-default.yaml b/charts/pipelines-library/templates/pipelines/autotests/maven/gitlab-build-default.yaml index d040d07d..c2d71f63 100644 --- a/charts/pipelines-library/templates/pipelines/autotests/maven/gitlab-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/autotests/maven/gitlab-build-default.yaml @@ -1,20 +1,18 @@ {{ if has "gitlab" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-maven-{{ $k }}-aut-build-default + name: gitlab-maven-{{ $framework }}-aut-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} automation tests with Maven (default versioning)" + description: "The Build pipeline for building {{ $framework }} automation tests with Maven (default versioning)" workspaces: - name: shared-workspace @@ -30,7 +28,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: changeNumber @@ -38,11 +36,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: "maven:3.9.0-eclipse-temurin-17" + default: '{{ $sonarImage }}' description: "sonar image version" type: string @@ -133,3 +131,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/autotests/maven/gitlab-build-edp.yaml b/charts/pipelines-library/templates/pipelines/autotests/maven/gitlab-build-edp.yaml index e549b2ca..9fadc088 100644 --- a/charts/pipelines-library/templates/pipelines/autotests/maven/gitlab-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/autotests/maven/gitlab-build-edp.yaml @@ -1,20 +1,18 @@ {{ if has "gitlab" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-maven-{{ $k }}-aut-build-edp + name: gitlab-maven-{{ $framework }}-aut-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} automation tests with Maven (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} automation tests with Maven (EDP versioning)" workspaces: - name: shared-workspace @@ -30,7 +28,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -41,7 +39,7 @@ spec: default: "" type: string - name: sonar_image - default: "maven:3.9.0-eclipse-temurin-17" + default: '{{ $sonarImage }}' description: "sonar image version" type: string @@ -111,3 +109,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/autotests/maven/gitlab-review.yaml b/charts/pipelines-library/templates/pipelines/autotests/maven/gitlab-review.yaml index 824c2279..3bd5818e 100644 --- a/charts/pipelines-library/templates/pipelines/autotests/maven/gitlab-review.yaml +++ b/charts/pipelines-library/templates/pipelines/autotests/maven/gitlab-review.yaml @@ -1,20 +1,18 @@ {{ if has "gitlab" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-maven-{{ $k }}-aut-review + name: gitlab-maven-{{ $framework }}-aut-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} automation tests with Maven" + description: "The Review pipeline for building {{ $framework }} automation tests with Maven" workspaces: - name: shared-workspace - name: ssh-creds @@ -40,18 +38,18 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: "maven:3.9.0-eclipse-temurin-17" + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: gitfullrepositoryname @@ -107,3 +105,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/c/cmake/bitbucket-build-default.yaml b/charts/pipelines-library/templates/pipelines/c/cmake/bitbucket-build-default.yaml index 554e856c..cae15a6c 100644 --- a/charts/pipelines-library/templates/pipelines/c/cmake/bitbucket-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/c/cmake/bitbucket-build-default.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.c.cmake }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -82,3 +83,4 @@ spec: --- {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/c/cmake/bitbucket-build-edp.yaml b/charts/pipelines-library/templates/pipelines/c/cmake/bitbucket-build-edp.yaml index ec2d8f14..e3a89a51 100644 --- a/charts/pipelines-library/templates/pipelines/c/cmake/bitbucket-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/c/cmake/bitbucket-build-edp.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.c.cmake }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -82,3 +83,4 @@ spec: --- {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/c/cmake/bitbucket-review.yaml b/charts/pipelines-library/templates/pipelines/c/cmake/bitbucket-review.yaml index ddf2458c..d2c3db90 100644 --- a/charts/pipelines-library/templates/pipelines/c/cmake/bitbucket-review.yaml +++ b/charts/pipelines-library/templates/pipelines/c/cmake/bitbucket-review.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.c.cmake }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -92,3 +93,4 @@ spec: --- {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/c/cmake/gerrit-build-default.yaml b/charts/pipelines-library/templates/pipelines/c/cmake/gerrit-build-default.yaml index 830af18a..cc50ceb6 100644 --- a/charts/pipelines-library/templates/pipelines/c/cmake/gerrit-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/c/cmake/gerrit-build-default.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.c.cmake }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -86,3 +87,4 @@ spec: --- {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/c/cmake/gerrit-build-edp.yaml b/charts/pipelines-library/templates/pipelines/c/cmake/gerrit-build-edp.yaml index 14a7807a..420f8adf 100644 --- a/charts/pipelines-library/templates/pipelines/c/cmake/gerrit-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/c/cmake/gerrit-build-edp.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.c.cmake }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -86,3 +87,4 @@ spec: --- {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/c/cmake/gerrit-review.yaml b/charts/pipelines-library/templates/pipelines/c/cmake/gerrit-review.yaml index 22eedcb8..8727a946 100644 --- a/charts/pipelines-library/templates/pipelines/c/cmake/gerrit-review.yaml +++ b/charts/pipelines-library/templates/pipelines/c/cmake/gerrit-review.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.c.cmake }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -95,3 +96,4 @@ spec: --- {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/c/cmake/github-build-default.yaml b/charts/pipelines-library/templates/pipelines/c/cmake/github-build-default.yaml index ad8ae662..b305c437 100644 --- a/charts/pipelines-library/templates/pipelines/c/cmake/github-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/c/cmake/github-build-default.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.c.cmake }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -82,3 +83,4 @@ spec: --- {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/c/cmake/github-build-edp.yaml b/charts/pipelines-library/templates/pipelines/c/cmake/github-build-edp.yaml index 795dc6bf..7a989f92 100644 --- a/charts/pipelines-library/templates/pipelines/c/cmake/github-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/c/cmake/github-build-edp.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.c.cmake }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -82,3 +83,4 @@ spec: --- {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/c/cmake/github-review.yaml b/charts/pipelines-library/templates/pipelines/c/cmake/github-review.yaml index 1bd85e35..6d732697 100644 --- a/charts/pipelines-library/templates/pipelines/c/cmake/github-review.yaml +++ b/charts/pipelines-library/templates/pipelines/c/cmake/github-review.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.c.cmake }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -95,3 +96,4 @@ spec: --- {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/c/cmake/gitlab-build-default.yaml b/charts/pipelines-library/templates/pipelines/c/cmake/gitlab-build-default.yaml index 1ab5a901..21b90186 100644 --- a/charts/pipelines-library/templates/pipelines/c/cmake/gitlab-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/c/cmake/gitlab-build-default.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.c.cmake }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -82,3 +83,4 @@ spec: --- {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/c/cmake/gitlab-build-edp.yaml b/charts/pipelines-library/templates/pipelines/c/cmake/gitlab-build-edp.yaml index 6485e53f..3ea3a6f8 100644 --- a/charts/pipelines-library/templates/pipelines/c/cmake/gitlab-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/c/cmake/gitlab-build-edp.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.c.cmake }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -82,3 +83,4 @@ spec: --- {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/c/cmake/gitlab-review.yaml b/charts/pipelines-library/templates/pipelines/c/cmake/gitlab-review.yaml index cb69dad1..34e1d974 100644 --- a/charts/pipelines-library/templates/pipelines/c/cmake/gitlab-review.yaml +++ b/charts/pipelines-library/templates/pipelines/c/cmake/gitlab-review.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.c.cmake }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -92,3 +93,4 @@ spec: --- {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/c/make/bitbucket-build-default.yaml b/charts/pipelines-library/templates/pipelines/c/make/bitbucket-build-default.yaml index 9ddd7a1b..cb7bd836 100644 --- a/charts/pipelines-library/templates/pipelines/c/make/bitbucket-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/c/make/bitbucket-build-default.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.c.make }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -82,3 +83,4 @@ spec: --- {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/c/make/bitbucket-build-edp.yaml b/charts/pipelines-library/templates/pipelines/c/make/bitbucket-build-edp.yaml index d9eab0a7..f0d75328 100644 --- a/charts/pipelines-library/templates/pipelines/c/make/bitbucket-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/c/make/bitbucket-build-edp.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.c.make }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -82,3 +83,4 @@ spec: --- {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/c/make/bitbucket-review.yaml b/charts/pipelines-library/templates/pipelines/c/make/bitbucket-review.yaml index e3b663c0..9e088722 100644 --- a/charts/pipelines-library/templates/pipelines/c/make/bitbucket-review.yaml +++ b/charts/pipelines-library/templates/pipelines/c/make/bitbucket-review.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.c.make }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -92,3 +93,4 @@ spec: --- {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/c/make/gerrit-build-default.yaml b/charts/pipelines-library/templates/pipelines/c/make/gerrit-build-default.yaml index e5f63f0f..de0a3f43 100644 --- a/charts/pipelines-library/templates/pipelines/c/make/gerrit-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/c/make/gerrit-build-default.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.c.make }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -82,3 +83,4 @@ spec: --- {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/c/make/gerrit-build-edp.yaml b/charts/pipelines-library/templates/pipelines/c/make/gerrit-build-edp.yaml index 6694968f..7cb155f7 100644 --- a/charts/pipelines-library/templates/pipelines/c/make/gerrit-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/c/make/gerrit-build-edp.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.c.make }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -82,3 +83,4 @@ spec: --- {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/c/make/gerrit-review.yaml b/charts/pipelines-library/templates/pipelines/c/make/gerrit-review.yaml index 35583dd4..040284e9 100644 --- a/charts/pipelines-library/templates/pipelines/c/make/gerrit-review.yaml +++ b/charts/pipelines-library/templates/pipelines/c/make/gerrit-review.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.c.make }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -88,3 +89,4 @@ spec: --- {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/c/make/github-build-default.yaml b/charts/pipelines-library/templates/pipelines/c/make/github-build-default.yaml index 52e55d9d..409825e0 100644 --- a/charts/pipelines-library/templates/pipelines/c/make/github-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/c/make/github-build-default.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.c.make }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -82,3 +83,4 @@ spec: --- {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/c/make/github-build-edp.yaml b/charts/pipelines-library/templates/pipelines/c/make/github-build-edp.yaml index 1ec17df3..767abbca 100644 --- a/charts/pipelines-library/templates/pipelines/c/make/github-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/c/make/github-build-edp.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.c.make }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -82,3 +83,4 @@ spec: --- {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/c/make/github-review.yaml b/charts/pipelines-library/templates/pipelines/c/make/github-review.yaml index a2778259..a1028e4e 100644 --- a/charts/pipelines-library/templates/pipelines/c/make/github-review.yaml +++ b/charts/pipelines-library/templates/pipelines/c/make/github-review.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.c.make }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -95,3 +96,4 @@ spec: --- {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/c/make/gitlab-build-default.yaml b/charts/pipelines-library/templates/pipelines/c/make/gitlab-build-default.yaml index 82cf952e..e8650ce9 100644 --- a/charts/pipelines-library/templates/pipelines/c/make/gitlab-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/c/make/gitlab-build-default.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.c.make }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -82,3 +83,4 @@ spec: --- {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/c/make/gitlab-build-edp.yaml b/charts/pipelines-library/templates/pipelines/c/make/gitlab-build-edp.yaml index 71f99201..437eba9c 100644 --- a/charts/pipelines-library/templates/pipelines/c/make/gitlab-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/c/make/gitlab-build-edp.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.c.make }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -82,3 +83,4 @@ spec: --- {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/c/make/gitlab-review.yaml b/charts/pipelines-library/templates/pipelines/c/make/gitlab-review.yaml index ff6e4d63..029527e1 100644 --- a/charts/pipelines-library/templates/pipelines/c/make/gitlab-review.yaml +++ b/charts/pipelines-library/templates/pipelines/c/make/gitlab-review.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.c.make }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -92,3 +93,4 @@ spec: --- {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/cd-autotests/autotest.yaml b/charts/pipelines-library/templates/pipelines/cd-autotests/autotest.yaml index 8637ab16..b15b3832 100644 --- a/charts/pipelines-library/templates/pipelines/cd-autotests/autotest.yaml +++ b/charts/pipelines-library/templates/pipelines/cd-autotests/autotest.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.deploy }} {{- $resourceMapping := list "maven" "gradle" -}} {{- range $k := $resourceMapping }} apiVersion: tekton.dev/v1 @@ -60,3 +61,4 @@ spec: --- {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/cd/clean.yaml b/charts/pipelines-library/templates/pipelines/cd/clean.yaml index fa140e5f..4efce787 100644 --- a/charts/pipelines-library/templates/pipelines/cd/clean.yaml +++ b/charts/pipelines-library/templates/pipelines/cd/clean.yaml @@ -1,3 +1,5 @@ + +{{ if .Values.pipelines.deployableResources.deploy }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -71,3 +73,4 @@ spec: - name: EXTRA_COMMANDS value: echo "Hello World" +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/cd/deploy-ansible-awx.yaml b/charts/pipelines-library/templates/pipelines/cd/deploy-ansible-awx.yaml index fd0e21ea..01f33ae6 100644 --- a/charts/pipelines-library/templates/pipelines/cd/deploy-ansible-awx.yaml +++ b/charts/pipelines-library/templates/pipelines/cd/deploy-ansible-awx.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.deploy }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -93,3 +94,4 @@ spec: value: $(params.CDSTAGE) - name: CDPIPELINE_CR value: $(params.CDPIPELINE) +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/cd/deploy-ansible.yaml b/charts/pipelines-library/templates/pipelines/cd/deploy-ansible.yaml index 5555224b..bec52124 100644 --- a/charts/pipelines-library/templates/pipelines/cd/deploy-ansible.yaml +++ b/charts/pipelines-library/templates/pipelines/cd/deploy-ansible.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.deploy }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -85,3 +86,4 @@ spec: value: $(params.CDSTAGE) - name: CDPIPELINE_CR value: $(params.CDPIPELINE) +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/cd/deploy-with-approve.yaml b/charts/pipelines-library/templates/pipelines/cd/deploy-with-approve.yaml index af751371..9c3b5bb5 100644 --- a/charts/pipelines-library/templates/pipelines/cd/deploy-with-approve.yaml +++ b/charts/pipelines-library/templates/pipelines/cd/deploy-with-approve.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.deploy }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -86,3 +87,4 @@ spec: value: $(params.CDSTAGE) - name: CDPIPELINE_CR value: $(params.CDPIPELINE) +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/cd/deploy-with-autotests.yaml b/charts/pipelines-library/templates/pipelines/cd/deploy-with-autotests.yaml index fa907469..79183a73 100644 --- a/charts/pipelines-library/templates/pipelines/cd/deploy-with-autotests.yaml +++ b/charts/pipelines-library/templates/pipelines/cd/deploy-with-autotests.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.deploy }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -135,3 +136,4 @@ spec: value: $(params.CDSTAGE) - name: CDPIPELINE_CR value: $(params.CDPIPELINE) +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/cd/deploy.yaml b/charts/pipelines-library/templates/pipelines/cd/deploy.yaml index d229908a..2fb9fbfb 100644 --- a/charts/pipelines-library/templates/pipelines/cd/deploy.yaml +++ b/charts/pipelines-library/templates/pipelines/cd/deploy.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.deploy }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -92,3 +93,4 @@ spec: value: $(params.CDSTAGE) - name: CDPIPELINE_CR value: $(params.CDPIPELINE) +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/csharp/bitbucket-build-default.yaml b/charts/pipelines-library/templates/pipelines/csharp/bitbucket-build-default.yaml index 68b2d8fe..c2d79fe4 100644 --- a/charts/pipelines-library/templates/pipelines/csharp/bitbucket-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/csharp/bitbucket-build-default.yaml @@ -1,15 +1,16 @@ {{ if has "bitbucket" .Values.global.gitProviders }} -{{- $resourceMapping := dict "dotnet-3.1" "mcr.microsoft.com/dotnet/sdk:3.1.423-alpine3.16" "dotnet-6.0" "mcr.microsoft.com/dotnet/sdk:6.0.407-alpine3.17" -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( index .Values.pipelines.deployableResources.cs "dotnet3.1" ) ( index .Values.pipelines.deployableResources.cs "dotnet6.0" ) }} +{{- $raw := include "edp-tekton.resourceMapping.cs" . | fromYaml -}} +{{- range $framework, $image:= $raw }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-dotnet-{{ $k }}-app-build-default + name: bitbucket-dotnet-{{ $framework }}-app-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application (default versioning)" + description: "The Build pipeline for building {{ $framework }} application (default versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -18,7 +19,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/csharp-dotnet-{{ $k }}" + default: "https://github.com/epmd-edp/csharp-dotnet-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -26,7 +27,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: 'csharp-dotnet-{{ $k }}' + default: 'csharp-dotnet-{{ $framework }}' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -37,7 +38,7 @@ spec: default: "" type: string - name: image - default: "{{ $v }}" + default: "{{ $image}}" description: "dotnet-sdk image version" type: string - name: TICKET_NAME_PATTERN @@ -123,3 +124,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/csharp/bitbucket-build-edp.yaml b/charts/pipelines-library/templates/pipelines/csharp/bitbucket-build-edp.yaml index e53b2374..787516ca 100644 --- a/charts/pipelines-library/templates/pipelines/csharp/bitbucket-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/csharp/bitbucket-build-edp.yaml @@ -1,15 +1,16 @@ {{ if has "bitbucket" .Values.global.gitProviders }} -{{- $resourceMapping := dict "dotnet-3.1" "mcr.microsoft.com/dotnet/sdk:3.1.423-alpine3.16" "dotnet-6.0" "mcr.microsoft.com/dotnet/sdk:6.0.407-alpine3.17" -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( index .Values.pipelines.deployableResources.cs "dotnet3.1" ) ( index .Values.pipelines.deployableResources.cs "dotnet6.0" ) }} +{{- $raw := include "edp-tekton.resourceMapping.cs" . | fromYaml -}} +{{- range $framework, $image:= $raw }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-dotnet-{{ $k }}-app-build-edp + name: bitbucket-dotnet-{{ $framework }}-app-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} application (EDP versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -18,7 +19,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/csharp-dotnet-{{ $k }}" + default: "https://github.com/epmd-edp/csharp-dotnet-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -26,7 +27,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: 'csharp-dotnet-{{ $k }}' + default: 'csharp-dotnet-{{ $framework }}' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -37,7 +38,7 @@ spec: default: "" type: string - name: image - default: "{{ $v }}" + default: "{{ $image }}" description: "dotnet-sdk image version" type: string - name: TICKET_NAME_PATTERN @@ -134,3 +135,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/csharp/bitbucket-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/csharp/bitbucket-build-lib-default.yaml index 2ee120d2..d9c389c5 100644 --- a/charts/pipelines-library/templates/pipelines/csharp/bitbucket-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/csharp/bitbucket-build-lib-default.yaml @@ -1,15 +1,16 @@ {{ if has "bitbucket" .Values.global.gitProviders }} -{{- $resourceMapping := dict "dotnet-3.1" "mcr.microsoft.com/dotnet/sdk:3.1.423-alpine3.16" "dotnet-6.0" "mcr.microsoft.com/dotnet/sdk:6.0.407-alpine3.17" -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( index .Values.pipelines.deployableResources.cs "dotnet3.1" ) ( index .Values.pipelines.deployableResources.cs "dotnet6.0" ) }} +{{- $raw := include "edp-tekton.resourceMapping.cs" . | fromYaml -}} +{{- range $framework, $image:= $raw }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-dotnet-{{ $k }}-lib-build-default + name: bitbucket-dotnet-{{ $framework }}-lib-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library (default versioning)" + description: "The Build pipeline for building {{ $framework }} library (default versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -18,7 +19,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/csharp-dotnet-{{ $k }}" + default: "https://github.com/epmd-edp/csharp-dotnet-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -26,7 +27,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: 'csharp-dotnet-{{ $k }}' + default: 'csharp-dotnet-{{ $framework }}' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -37,7 +38,7 @@ spec: default: "" type: string - name: image - default: "{{ $v }}" + default: "{{ $image }}" description: "dotnet-sdk image version" type: string - name: TICKET_NAME_PATTERN @@ -103,3 +104,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/csharp/bitbucket-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/csharp/bitbucket-build-lib-edp.yaml index d2dba1e3..a82ccb81 100644 --- a/charts/pipelines-library/templates/pipelines/csharp/bitbucket-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/csharp/bitbucket-build-lib-edp.yaml @@ -1,15 +1,16 @@ {{ if has "bitbucket" .Values.global.gitProviders }} -{{- $resourceMapping := dict "dotnet-3.1" "mcr.microsoft.com/dotnet/sdk:3.1.423-alpine3.16" "dotnet-6.0" "mcr.microsoft.com/dotnet/sdk:6.0.407-alpine3.17" -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( index .Values.pipelines.deployableResources.cs "dotnet3.1" ) ( index .Values.pipelines.deployableResources.cs "dotnet6.0" ) }} +{{- $raw := include "edp-tekton.resourceMapping.cs" . | fromYaml -}} +{{- range $framework, $image:= $raw }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-dotnet-{{ $k }}-lib-build-edp + name: bitbucket-dotnet-{{ $framework }}-lib-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} library (EDP versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -18,7 +19,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/csharp-dotnet-{{ $k }}" + default: "https://github.com/epmd-edp/csharp-dotnet-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -26,7 +27,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: 'csharp-dotnet-{{ $k }}' + default: 'csharp-dotnet-{{ $framework }}' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -37,7 +38,7 @@ spec: default: "" type: string - name: image - default: "{{ $v }}" + default: "{{ $image }}" description: "dotnet-sdk image version" type: string - name: TICKET_NAME_PATTERN @@ -114,3 +115,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/csharp/bitbucket-review-lib.yaml b/charts/pipelines-library/templates/pipelines/csharp/bitbucket-review-lib.yaml index c2dc86f4..a6e9a104 100644 --- a/charts/pipelines-library/templates/pipelines/csharp/bitbucket-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/csharp/bitbucket-review-lib.yaml @@ -1,15 +1,16 @@ {{ if has "bitbucket" .Values.global.gitProviders }} -{{- $resourceMapping := dict "dotnet-3.1" "mcr.microsoft.com/dotnet/sdk:3.1.423-alpine3.16" "dotnet-6.0" "mcr.microsoft.com/dotnet/sdk:6.0.407-alpine3.17" -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( index .Values.pipelines.deployableResources.cs "dotnet3.1" ) ( index .Values.pipelines.deployableResources.cs "dotnet6.0" ) }} +{{- $raw := include "edp-tekton.resourceMapping.cs" . | fromYaml -}} +{{- range $framework, $image:= $raw }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-dotnet-{{ $k }}-lib-review + name: bitbucket-dotnet-{{ $framework }}-lib-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} with Dotnet" + description: "The Review pipeline for building {{ $framework }} with Dotnet" workspaces: - name: shared-workspace - name: ssh-creds @@ -18,7 +19,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/csharp-dotnet-{{ $k }}" + default: "https://github.com/epmd-edp/csharp-dotnet-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -34,14 +35,14 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: 'csharp-dotnet-{{ $k }}' + default: 'csharp-dotnet-{{ $framework }}' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: "{{ $v }}" + default: "{{ $image }}" description: "dotnet-sdk image version" type: string - name: gitfullrepositoryname @@ -110,3 +111,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/csharp/bitbucket-review.yaml b/charts/pipelines-library/templates/pipelines/csharp/bitbucket-review.yaml index 43f6cbc3..dcade13b 100644 --- a/charts/pipelines-library/templates/pipelines/csharp/bitbucket-review.yaml +++ b/charts/pipelines-library/templates/pipelines/csharp/bitbucket-review.yaml @@ -1,15 +1,16 @@ {{ if has "bitbucket" .Values.global.gitProviders }} -{{- $resourceMapping := dict "dotnet-3.1" "mcr.microsoft.com/dotnet/sdk:3.1.423-alpine3.16" "dotnet-6.0" "mcr.microsoft.com/dotnet/sdk:6.0.407-alpine3.17" -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( index .Values.pipelines.deployableResources.cs "dotnet3.1" ) ( index .Values.pipelines.deployableResources.cs "dotnet6.0" ) }} +{{- $raw := include "edp-tekton.resourceMapping.cs" . | fromYaml -}} +{{- range $framework, $image:= $raw }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-dotnet-{{ $k }}-app-review + name: bitbucket-dotnet-{{ $framework }}-app-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} with Dotnet" + description: "The Review pipeline for building {{ $framework }} with Dotnet" workspaces: - name: shared-workspace - name: ssh-creds @@ -18,7 +19,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/csharp-dotnet-{{ $k }}" + default: "https://github.com/epmd-edp/csharp-dotnet-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -34,14 +35,14 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: 'csharp-dotnet-{{ $k }}' + default: 'csharp-dotnet-{{ $framework }}' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: "{{ $v }}" + default: "{{ $image }}" description: "dotnet-sdk image version" type: string - name: gitfullrepositoryname @@ -165,3 +166,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/csharp/gerrit-build-default.yaml b/charts/pipelines-library/templates/pipelines/csharp/gerrit-build-default.yaml index cdaba54f..54245e4f 100644 --- a/charts/pipelines-library/templates/pipelines/csharp/gerrit-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/csharp/gerrit-build-default.yaml @@ -1,15 +1,16 @@ {{ if has "gerrit" .Values.global.gitProviders }} -{{- $resourceMapping := dict "dotnet-3.1" "mcr.microsoft.com/dotnet/sdk:3.1.423-alpine3.16" "dotnet-6.0" "mcr.microsoft.com/dotnet/sdk:6.0.407-alpine3.17" -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( index .Values.pipelines.deployableResources.cs "dotnet3.1" ) ( index .Values.pipelines.deployableResources.cs "dotnet6.0" ) }} +{{- $raw := include "edp-tekton.resourceMapping.cs" . | fromYaml -}} +{{- range $framework, $image:= $raw }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-dotnet-{{ $k }}-app-build-default + name: gerrit-dotnet-{{ $framework }}-app-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application (default versioning)" + description: "The Build pipeline for building {{ $framework }} application (default versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -18,7 +19,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/csharp-dotnet-{{ $k }}" + default: "https://github.com/epmd-edp/csharp-dotnet-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -26,14 +27,14 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: 'csharp-dotnet-{{ $k }}' + default: 'csharp-dotnet-{{ $framework }}' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: "{{ $v }}" + default: "{{ $image }}" description: "dotnet-sdk image version" type: string - name: changeNumber @@ -123,3 +124,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/csharp/gerrit-build-edp.yaml b/charts/pipelines-library/templates/pipelines/csharp/gerrit-build-edp.yaml index a1be3557..c35f462d 100644 --- a/charts/pipelines-library/templates/pipelines/csharp/gerrit-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/csharp/gerrit-build-edp.yaml @@ -1,15 +1,16 @@ {{ if has "gerrit" .Values.global.gitProviders }} -{{- $resourceMapping := dict "dotnet-3.1" "mcr.microsoft.com/dotnet/sdk:3.1.423-alpine3.16" "dotnet-6.0" "mcr.microsoft.com/dotnet/sdk:6.0.407-alpine3.17" -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( index .Values.pipelines.deployableResources.cs "dotnet3.1" ) ( index .Values.pipelines.deployableResources.cs "dotnet6.0" ) }} +{{- $raw := include "edp-tekton.resourceMapping.cs" . | fromYaml -}} +{{- range $framework, $image:= $raw }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-dotnet-{{ $k }}-app-build-edp + name: gerrit-dotnet-{{ $framework }}-app-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} application (EDP versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -18,7 +19,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/csharp-dotnet-{{ $k }}" + default: "https://github.com/epmd-edp/csharp-dotnet-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -26,14 +27,14 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: 'csharp-dotnet-{{ $k }}' + default: 'csharp-dotnet-{{ $framework }}' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: "{{ $v }}" + default: "{{ $image }}" description: "dotnet-sdk image version" type: string - name: changeNumber @@ -134,3 +135,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/csharp/gerrit-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/csharp/gerrit-build-lib-default.yaml index dc19d9ee..f7862e6a 100644 --- a/charts/pipelines-library/templates/pipelines/csharp/gerrit-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/csharp/gerrit-build-lib-default.yaml @@ -1,15 +1,16 @@ {{ if has "gerrit" .Values.global.gitProviders }} -{{- $resourceMapping := dict "dotnet-3.1" "mcr.microsoft.com/dotnet/sdk:3.1.423-alpine3.16" "dotnet-6.0" "mcr.microsoft.com/dotnet/sdk:6.0.407-alpine3.17" -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( index .Values.pipelines.deployableResources.cs "dotnet3.1" ) ( index .Values.pipelines.deployableResources.cs "dotnet6.0" ) }} +{{- $raw := include "edp-tekton.resourceMapping.cs" . | fromYaml -}} +{{- range $framework, $image:= $raw }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-dotnet-{{ $k }}-lib-build-default + name: gerrit-dotnet-{{ $framework }}-lib-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library (default versioning)" + description: "The Build pipeline for building {{ $framework }} library (default versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -18,7 +19,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/csharp-dotnet-{{ $k }}" + default: "https://github.com/epmd-edp/csharp-dotnet-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -26,14 +27,14 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: 'csharp-dotnet-{{ $k }}' + default: 'csharp-dotnet-{{ $framework }}' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: "{{ $v }}" + default: "{{ $image }}" description: "dotnet-sdk image version" type: string - name: changeNumber @@ -103,3 +104,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/csharp/gerrit-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/csharp/gerrit-build-lib-edp.yaml index d1a2cb8a..61541240 100644 --- a/charts/pipelines-library/templates/pipelines/csharp/gerrit-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/csharp/gerrit-build-lib-edp.yaml @@ -1,15 +1,16 @@ {{ if has "gerrit" .Values.global.gitProviders }} -{{- $resourceMapping := dict "dotnet-3.1" "mcr.microsoft.com/dotnet/sdk:3.1.423-alpine3.16" "dotnet-6.0" "mcr.microsoft.com/dotnet/sdk:6.0.407-alpine3.17" -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( index .Values.pipelines.deployableResources.cs "dotnet3.1" ) ( index .Values.pipelines.deployableResources.cs "dotnet6.0" ) }} +{{- $raw := include "edp-tekton.resourceMapping.cs" . | fromYaml -}} +{{- range $framework, $image:= $raw }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-dotnet-{{ $k }}-lib-build-edp + name: gerrit-dotnet-{{ $framework }}-lib-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} library (EDP versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -18,7 +19,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/csharp-dotnet-{{ $k }}" + default: "https://github.com/epmd-edp/csharp-dotnet-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -26,14 +27,14 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: 'csharp-dotnet-{{ $k }}' + default: 'csharp-dotnet-{{ $framework }}' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: "{{ $v }}" + default: "{{ $image }}" description: "dotnet-sdk image version" type: string - name: changeNumber @@ -114,3 +115,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/csharp/gerrit-review-lib.yaml b/charts/pipelines-library/templates/pipelines/csharp/gerrit-review-lib.yaml index 2fcfe100..d1cf02b4 100644 --- a/charts/pipelines-library/templates/pipelines/csharp/gerrit-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/csharp/gerrit-review-lib.yaml @@ -1,15 +1,16 @@ {{ if has "gerrit" .Values.global.gitProviders }} -{{- $resourceMapping := dict "dotnet-3.1" "mcr.microsoft.com/dotnet/sdk:3.1.423-alpine3.16" "dotnet-6.0" "mcr.microsoft.com/dotnet/sdk:6.0.407-alpine3.17" -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( index .Values.pipelines.deployableResources.cs "dotnet3.1" ) ( index .Values.pipelines.deployableResources.cs "dotnet6.0" ) }} +{{- $raw := include "edp-tekton.resourceMapping.cs" . | fromYaml -}} +{{- range $framework, $image:= $raw }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-dotnet-{{ $k }}-lib-review + name: gerrit-dotnet-{{ $framework }}-lib-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} with Dotnet" + description: "The Review pipeline for building {{ $framework }} with Dotnet" workspaces: - name: shared-workspace - name: ssh-creds @@ -18,7 +19,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/csharp-dotnet-{{ $k }}" + default: "https://github.com/epmd-edp/csharp-dotnet-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -30,11 +31,11 @@ spec: default: "" type: string - name: CODEBASE_NAME - default: 'csharp-dotnet-{{ $k }}' + default: 'csharp-dotnet-{{ $framework }}' description: "Project name" type: string - name: image - default: "{{ $v }}" + default: "{{ $image }}" description: "dotnet-sdk image version" type: string - name: targetBranch @@ -57,3 +58,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/csharp/gerrit-review.yaml b/charts/pipelines-library/templates/pipelines/csharp/gerrit-review.yaml index 7d74db31..ef55bbfe 100644 --- a/charts/pipelines-library/templates/pipelines/csharp/gerrit-review.yaml +++ b/charts/pipelines-library/templates/pipelines/csharp/gerrit-review.yaml @@ -1,15 +1,16 @@ {{ if has "gerrit" .Values.global.gitProviders }} -{{- $resourceMapping := dict "dotnet-3.1" "mcr.microsoft.com/dotnet/sdk:3.1.423-alpine3.16" "dotnet-6.0" "mcr.microsoft.com/dotnet/sdk:6.0.407-alpine3.17" -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( index .Values.pipelines.deployableResources.cs "dotnet3.1" ) ( index .Values.pipelines.deployableResources.cs "dotnet6.0" ) }} +{{- $raw := include "edp-tekton.resourceMapping.cs" . | fromYaml -}} +{{- range $framework, $image:= $raw }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-dotnet-{{ $k }}-app-review + name: gerrit-dotnet-{{ $framework }}-app-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} with Dotnet" + description: "The Review pipeline for building {{ $framework }} with Dotnet" workspaces: - name: shared-workspace - name: ssh-creds @@ -18,7 +19,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/csharp-dotnet-{{ $k }}" + default: "https://github.com/epmd-edp/csharp-dotnet-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -30,11 +31,11 @@ spec: default: "" type: string - name: CODEBASE_NAME - default: 'csharp-dotnet-{{ $k }}' + default: 'csharp-dotnet-{{ $framework }}' description: "Project name" type: string - name: image - default: "{{ $v }}" + default: "{{ $image }}" description: "dotnet-sdk image version" type: string - name: targetBranch @@ -112,3 +113,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/csharp/github-build-default.yaml b/charts/pipelines-library/templates/pipelines/csharp/github-build-default.yaml index 6733d2ba..f462dd8f 100644 --- a/charts/pipelines-library/templates/pipelines/csharp/github-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/csharp/github-build-default.yaml @@ -1,15 +1,16 @@ {{ if has "github" .Values.global.gitProviders }} -{{- $resourceMapping := dict "dotnet-3.1" "mcr.microsoft.com/dotnet/sdk:3.1.423-alpine3.16" "dotnet-6.0" "mcr.microsoft.com/dotnet/sdk:6.0.407-alpine3.17" -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( index .Values.pipelines.deployableResources.cs "dotnet3.1" ) ( index .Values.pipelines.deployableResources.cs "dotnet6.0" ) }} +{{- $raw := include "edp-tekton.resourceMapping.cs" . | fromYaml -}} +{{- range $framework, $image:= $raw }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-dotnet-{{ $k }}-app-build-default + name: github-dotnet-{{ $framework }}-app-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application (default versioning)" + description: "The Build pipeline for building {{ $framework }} application (default versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -18,7 +19,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/csharp-dotnet-{{ $k }}" + default: "https://github.com/epmd-edp/csharp-dotnet-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -26,7 +27,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: 'csharp-dotnet-{{ $k }}' + default: 'csharp-dotnet-{{ $framework }}' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -37,7 +38,7 @@ spec: default: "" type: string - name: image - default: "{{ $v }}" + default: "{{ $image }}" description: "dotnet-sdk image version" type: string - name: TICKET_NAME_PATTERN @@ -123,3 +124,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/csharp/github-build-edp.yaml b/charts/pipelines-library/templates/pipelines/csharp/github-build-edp.yaml index d4c84a66..0fd4050f 100644 --- a/charts/pipelines-library/templates/pipelines/csharp/github-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/csharp/github-build-edp.yaml @@ -1,15 +1,16 @@ {{ if has "github" .Values.global.gitProviders }} -{{- $resourceMapping := dict "dotnet-3.1" "mcr.microsoft.com/dotnet/sdk:3.1.423-alpine3.16" "dotnet-6.0" "mcr.microsoft.com/dotnet/sdk:6.0.407-alpine3.17" -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( index .Values.pipelines.deployableResources.cs "dotnet3.1" ) ( index .Values.pipelines.deployableResources.cs "dotnet6.0" ) }} +{{- $raw := include "edp-tekton.resourceMapping.cs" . | fromYaml -}} +{{- range $framework, $image:= $raw }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-dotnet-{{ $k }}-app-build-edp + name: github-dotnet-{{ $framework }}-app-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} application (EDP versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -18,7 +19,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/csharp-dotnet-{{ $k }}" + default: "https://github.com/epmd-edp/csharp-dotnet-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -26,7 +27,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: 'csharp-dotnet-{{ $k }}' + default: 'csharp-dotnet-{{ $framework }}' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -37,7 +38,7 @@ spec: default: "" type: string - name: image - default: "{{ $v }}" + default: "{{ $image }}" description: "dotnet-sdk image version" type: string - name: TICKET_NAME_PATTERN @@ -134,3 +135,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/csharp/github-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/csharp/github-build-lib-default.yaml index 53bfeeda..780f6bc3 100644 --- a/charts/pipelines-library/templates/pipelines/csharp/github-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/csharp/github-build-lib-default.yaml @@ -1,15 +1,16 @@ {{ if has "github" .Values.global.gitProviders }} -{{- $resourceMapping := dict "dotnet-3.1" "mcr.microsoft.com/dotnet/sdk:3.1.423-alpine3.16" "dotnet-6.0" "mcr.microsoft.com/dotnet/sdk:6.0.407-alpine3.17" -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( index .Values.pipelines.deployableResources.cs "dotnet3.1" ) ( index .Values.pipelines.deployableResources.cs "dotnet6.0" ) }} +{{- $raw := include "edp-tekton.resourceMapping.cs" . | fromYaml -}} +{{- range $framework, $image:= $raw }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-dotnet-{{ $k }}-lib-build-default + name: github-dotnet-{{ $framework }}-lib-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library (default versioning)" + description: "The Build pipeline for building {{ $framework }} library (default versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -18,7 +19,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/csharp-dotnet-{{ $k }}" + default: "https://github.com/epmd-edp/csharp-dotnet-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -26,7 +27,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: 'csharp-dotnet-{{ $k }}' + default: 'csharp-dotnet-{{ $framework }}' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -37,7 +38,7 @@ spec: default: "" type: string - name: image - default: "{{ $v }}" + default: "{{ $image }}" description: "dotnet-sdk image version" type: string - name: TICKET_NAME_PATTERN @@ -105,3 +106,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/csharp/github-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/csharp/github-build-lib-edp.yaml index 75b29adb..4d2086f4 100644 --- a/charts/pipelines-library/templates/pipelines/csharp/github-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/csharp/github-build-lib-edp.yaml @@ -1,15 +1,16 @@ {{ if has "github" .Values.global.gitProviders }} -{{- $resourceMapping := dict "dotnet-3.1" "mcr.microsoft.com/dotnet/sdk:3.1.423-alpine3.16" "dotnet-6.0" "mcr.microsoft.com/dotnet/sdk:6.0.407-alpine3.17" -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( index .Values.pipelines.deployableResources.cs "dotnet3.1" ) ( index .Values.pipelines.deployableResources.cs "dotnet6.0" ) }} +{{- $raw := include "edp-tekton.resourceMapping.cs" . | fromYaml -}} +{{- range $framework, $image:= $raw }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-dotnet-{{ $k }}-lib-build-edp + name: github-dotnet-{{ $framework }}-lib-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} library (EDP versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -18,7 +19,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/csharp-dotnet-{{ $k }}" + default: "https://github.com/epmd-edp/csharp-dotnet-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -26,7 +27,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: 'csharp-dotnet-{{ $k }}' + default: 'csharp-dotnet-{{ $framework }}' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -37,7 +38,7 @@ spec: default: "" type: string - name: image - default: "{{ $v }}" + default: "{{ $image }}" description: "dotnet-sdk image version" type: string - name: TICKET_NAME_PATTERN @@ -114,3 +115,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/csharp/github-review-lib.yaml b/charts/pipelines-library/templates/pipelines/csharp/github-review-lib.yaml index dcfbf369..91e03673 100644 --- a/charts/pipelines-library/templates/pipelines/csharp/github-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/csharp/github-review-lib.yaml @@ -1,15 +1,16 @@ {{ if has "github" .Values.global.gitProviders }} -{{- $resourceMapping := dict "dotnet-3.1" "mcr.microsoft.com/dotnet/sdk:3.1.423-alpine3.16" "dotnet-6.0" "mcr.microsoft.com/dotnet/sdk:6.0.407-alpine3.17" -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( index .Values.pipelines.deployableResources.cs "dotnet3.1" ) ( index .Values.pipelines.deployableResources.cs "dotnet6.0" ) }} +{{- $raw := include "edp-tekton.resourceMapping.cs" . | fromYaml -}} +{{- range $framework, $image:= $raw }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-dotnet-{{ $k }}-lib-review + name: github-dotnet-{{ $framework }}-lib-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} with Dotnet" + description: "The Review pipeline for building {{ $framework }} with Dotnet" workspaces: - name: shared-workspace - name: ssh-creds @@ -18,7 +19,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/csharp-dotnet-{{ $k }}" + default: "https://github.com/epmd-edp/csharp-dotnet-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -34,14 +35,14 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: 'csharp-dotnet-{{ $k }}' + default: 'csharp-dotnet-{{ $framework }}' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: "{{ $v }}" + default: "{{ $image }}" description: "dotnet-sdk image version" type: string - name: gitfullrepositoryname @@ -113,3 +114,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/csharp/github-review.yaml b/charts/pipelines-library/templates/pipelines/csharp/github-review.yaml index 5a643b94..4fc41d77 100644 --- a/charts/pipelines-library/templates/pipelines/csharp/github-review.yaml +++ b/charts/pipelines-library/templates/pipelines/csharp/github-review.yaml @@ -1,15 +1,16 @@ {{ if has "github" .Values.global.gitProviders }} -{{- $resourceMapping := dict "dotnet-3.1" "mcr.microsoft.com/dotnet/sdk:3.1.423-alpine3.16" "dotnet-6.0" "mcr.microsoft.com/dotnet/sdk:6.0.407-alpine3.17" -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( index .Values.pipelines.deployableResources.cs "dotnet3.1" ) ( index .Values.pipelines.deployableResources.cs "dotnet6.0" ) }} +{{- $raw := include "edp-tekton.resourceMapping.cs" . | fromYaml -}} +{{- range $framework, $image:= $raw }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-dotnet-{{ $k }}-app-review + name: github-dotnet-{{ $framework }}-app-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} with Dotnet" + description: "The Review pipeline for building {{ $framework }} with Dotnet" workspaces: - name: shared-workspace - name: ssh-creds @@ -18,7 +19,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/csharp-dotnet-{{ $k }}" + default: "https://github.com/epmd-edp/csharp-dotnet-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -34,14 +35,14 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: 'csharp-dotnet-{{ $k }}' + default: 'csharp-dotnet-{{ $framework }}' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: "{{ $v }}" + default: "{{ $image }}" description: "dotnet-sdk image version" type: string - name: gitfullrepositoryname @@ -169,3 +170,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/csharp/gitlab-build-default.yaml b/charts/pipelines-library/templates/pipelines/csharp/gitlab-build-default.yaml index 8d715562..729f0f71 100644 --- a/charts/pipelines-library/templates/pipelines/csharp/gitlab-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/csharp/gitlab-build-default.yaml @@ -1,15 +1,16 @@ {{ if has "gitlab" .Values.global.gitProviders }} -{{- $resourceMapping := dict "dotnet-3.1" "mcr.microsoft.com/dotnet/sdk:3.1.423-alpine3.16" "dotnet-6.0" "mcr.microsoft.com/dotnet/sdk:6.0.407-alpine3.17" -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( index .Values.pipelines.deployableResources.cs "dotnet3.1" ) ( index .Values.pipelines.deployableResources.cs "dotnet6.0" ) }} +{{- $raw := include "edp-tekton.resourceMapping.cs" . | fromYaml -}} +{{- range $framework, $image:= $raw }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-dotnet-{{ $k }}-app-build-default + name: gitlab-dotnet-{{ $framework }}-app-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application (default versioning)" + description: "The Build pipeline for building {{ $framework }} application (default versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -18,7 +19,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/csharp-dotnet-{{ $k }}" + default: "https://github.com/epmd-edp/csharp-dotnet-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -26,7 +27,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: 'csharp-dotnet-{{ $k }}' + default: 'csharp-dotnet-{{ $framework }}' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -37,7 +38,7 @@ spec: default: "" type: string - name: image - default: "{{ $v }}" + default: "{{ $image }}" description: "dotnet-sdk image version" type: string - name: TICKET_NAME_PATTERN @@ -123,3 +124,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/csharp/gitlab-build-edp.yaml b/charts/pipelines-library/templates/pipelines/csharp/gitlab-build-edp.yaml index 91636b96..15dce5ee 100644 --- a/charts/pipelines-library/templates/pipelines/csharp/gitlab-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/csharp/gitlab-build-edp.yaml @@ -1,15 +1,16 @@ {{ if has "gitlab" .Values.global.gitProviders }} -{{- $resourceMapping := dict "dotnet-3.1" "mcr.microsoft.com/dotnet/sdk:3.1.423-alpine3.16" "dotnet-6.0" "mcr.microsoft.com/dotnet/sdk:6.0.407-alpine3.17" -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( index .Values.pipelines.deployableResources.cs "dotnet3.1" ) ( index .Values.pipelines.deployableResources.cs "dotnet6.0" ) }} +{{- $raw := include "edp-tekton.resourceMapping.cs" . | fromYaml -}} +{{- range $framework, $image:= $raw }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-dotnet-{{ $k }}-app-build-edp + name: gitlab-dotnet-{{ $framework }}-app-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} application (EDP versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -18,7 +19,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/csharp-dotnet-{{ $k }}" + default: "https://github.com/epmd-edp/csharp-dotnet-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -26,7 +27,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: 'csharp-dotnet-{{ $k }}' + default: 'csharp-dotnet-{{ $framework }}' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -37,7 +38,7 @@ spec: default: "" type: string - name: image - default: "{{ $v }}" + default: "{{ $image }}" description: "dotnet-sdk image version" type: string - name: TICKET_NAME_PATTERN @@ -134,3 +135,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/csharp/gitlab-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/csharp/gitlab-build-lib-default.yaml index 66f204c9..55f32032 100644 --- a/charts/pipelines-library/templates/pipelines/csharp/gitlab-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/csharp/gitlab-build-lib-default.yaml @@ -1,15 +1,16 @@ {{ if has "gitlab" .Values.global.gitProviders }} -{{- $resourceMapping := dict "dotnet-3.1" "mcr.microsoft.com/dotnet/sdk:3.1.423-alpine3.16" "dotnet-6.0" "mcr.microsoft.com/dotnet/sdk:6.0.407-alpine3.17" -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( index .Values.pipelines.deployableResources.cs "dotnet3.1" ) ( index .Values.pipelines.deployableResources.cs "dotnet6.0" ) }} +{{- $raw := include "edp-tekton.resourceMapping.cs" . | fromYaml -}} +{{- range $framework, $image:= $raw }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-dotnet-{{ $k }}-lib-build-default + name: gitlab-dotnet-{{ $framework }}-lib-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library (default versioning)" + description: "The Build pipeline for building {{ $framework }} library (default versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -18,7 +19,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/csharp-dotnet-{{ $k }}" + default: "https://github.com/epmd-edp/csharp-dotnet-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -26,7 +27,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: 'csharp-dotnet-{{ $k }}' + default: 'csharp-dotnet-{{ $framework }}' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -37,7 +38,7 @@ spec: default: "" type: string - name: image - default: "{{ $v }}" + default: "{{ $image }}" description: "dotnet-sdk image version" type: string - name: TICKET_NAME_PATTERN @@ -103,3 +104,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/csharp/gitlab-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/csharp/gitlab-build-lib-edp.yaml index c0cfa4c6..5219cff5 100644 --- a/charts/pipelines-library/templates/pipelines/csharp/gitlab-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/csharp/gitlab-build-lib-edp.yaml @@ -1,15 +1,16 @@ {{ if has "gitlab" .Values.global.gitProviders }} -{{- $resourceMapping := dict "dotnet-3.1" "mcr.microsoft.com/dotnet/sdk:3.1.423-alpine3.16" "dotnet-6.0" "mcr.microsoft.com/dotnet/sdk:6.0.407-alpine3.17" -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( index .Values.pipelines.deployableResources.cs "dotnet3.1" ) ( index .Values.pipelines.deployableResources.cs "dotnet6.0" ) }} +{{- $raw := include "edp-tekton.resourceMapping.cs" . | fromYaml -}} +{{- range $framework, $image:= $raw }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-dotnet-{{ $k }}-lib-build-edp + name: gitlab-dotnet-{{ $framework }}-lib-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} library (EDP versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -18,7 +19,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/csharp-dotnet-{{ $k }}" + default: "https://github.com/epmd-edp/csharp-dotnet-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -26,7 +27,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: 'csharp-dotnet-{{ $k }}' + default: 'csharp-dotnet-{{ $framework }}' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -37,7 +38,7 @@ spec: default: "" type: string - name: image - default: "{{ $v }}" + default: "{{ $image }}" description: "dotnet-sdk image version" type: string - name: TICKET_NAME_PATTERN @@ -114,3 +115,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/csharp/gitlab-review-lib.yaml b/charts/pipelines-library/templates/pipelines/csharp/gitlab-review-lib.yaml index a9b90aaf..c3adbdb2 100644 --- a/charts/pipelines-library/templates/pipelines/csharp/gitlab-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/csharp/gitlab-review-lib.yaml @@ -1,15 +1,16 @@ {{ if has "gitlab" .Values.global.gitProviders }} -{{- $resourceMapping := dict "dotnet-3.1" "mcr.microsoft.com/dotnet/sdk:3.1.423-alpine3.16" "dotnet-6.0" "mcr.microsoft.com/dotnet/sdk:6.0.407-alpine3.17" -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( index .Values.pipelines.deployableResources.cs "dotnet3.1" ) ( index .Values.pipelines.deployableResources.cs "dotnet6.0" ) }} +{{- $raw := include "edp-tekton.resourceMapping.cs" . | fromYaml -}} +{{- range $framework, $image:= $raw }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-dotnet-{{ $k }}-lib-review + name: gitlab-dotnet-{{ $framework }}-lib-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} with Dotnet" + description: "The Review pipeline for building {{ $framework }} with Dotnet" workspaces: - name: shared-workspace - name: ssh-creds @@ -18,7 +19,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/csharp-dotnet-{{ $k }}" + default: "https://github.com/epmd-edp/csharp-dotnet-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -34,14 +35,14 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: 'csharp-dotnet-{{ $k }}' + default: 'csharp-dotnet-{{ $framework }}' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: "{{ $v }}" + default: "{{ $image }}" description: "dotnet-sdk image version" type: string - name: gitfullrepositoryname @@ -110,3 +111,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/csharp/gitlab-review.yaml b/charts/pipelines-library/templates/pipelines/csharp/gitlab-review.yaml index 8e0727ee..c300458b 100644 --- a/charts/pipelines-library/templates/pipelines/csharp/gitlab-review.yaml +++ b/charts/pipelines-library/templates/pipelines/csharp/gitlab-review.yaml @@ -1,15 +1,16 @@ {{ if has "gitlab" .Values.global.gitProviders }} -{{- $resourceMapping := dict "dotnet-3.1" "mcr.microsoft.com/dotnet/sdk:3.1.423-alpine3.16" "dotnet-6.0" "mcr.microsoft.com/dotnet/sdk:6.0.407-alpine3.17" -}} -{{- range $k, $v := $resourceMapping }} +{{ if or ( index .Values.pipelines.deployableResources.cs "dotnet3.1" ) ( index .Values.pipelines.deployableResources.cs "dotnet6.0" ) }} +{{- $raw := include "edp-tekton.resourceMapping.cs" . | fromYaml -}} +{{- range $framework, $image:= $raw }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-dotnet-{{ $k }}-app-review + name: gitlab-dotnet-{{ $framework }}-app-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} with Dotnet" + description: "The Review pipeline for building {{ $framework }} with Dotnet" workspaces: - name: shared-workspace - name: ssh-creds @@ -18,7 +19,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/csharp-dotnet-{{ $k }}" + default: "https://github.com/epmd-edp/csharp-dotnet-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -34,14 +35,14 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: 'csharp-dotnet-{{ $k }}' + default: 'csharp-dotnet-{{ $framework }}' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: "{{ $v }}" + default: "{{ $image }}" description: "dotnet-sdk image version" type: string - name: gitfullrepositoryname @@ -165,3 +166,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/docker/kaniko/bitbucket-build-default.yaml b/charts/pipelines-library/templates/pipelines/docker/kaniko/bitbucket-build-default.yaml index 4e9280f3..b5168b85 100644 --- a/charts/pipelines-library/templates/pipelines/docker/kaniko/bitbucket-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/docker/kaniko/bitbucket-build-default.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.docker }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -86,3 +87,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/docker/kaniko/bitbucket-build-edp.yaml b/charts/pipelines-library/templates/pipelines/docker/kaniko/bitbucket-build-edp.yaml index 2bf41148..973ec911 100644 --- a/charts/pipelines-library/templates/pipelines/docker/kaniko/bitbucket-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/docker/kaniko/bitbucket-build-edp.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.docker }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -86,3 +87,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/docker/kaniko/bitbucket-review.yaml b/charts/pipelines-library/templates/pipelines/docker/kaniko/bitbucket-review.yaml index 17195296..63515eda 100644 --- a/charts/pipelines-library/templates/pipelines/docker/kaniko/bitbucket-review.yaml +++ b/charts/pipelines-library/templates/pipelines/docker/kaniko/bitbucket-review.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.docker }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -93,3 +94,4 @@ spec: {{ include "bitbucket-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/docker/kaniko/gerrit-build-default.yaml b/charts/pipelines-library/templates/pipelines/docker/kaniko/gerrit-build-default.yaml index 04b27f3c..5ec0d5a7 100644 --- a/charts/pipelines-library/templates/pipelines/docker/kaniko/gerrit-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/docker/kaniko/gerrit-build-default.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.docker }} {{- $registry := .Values.pipelines.image.registry | default "ghcr.io" -}} apiVersion: tekton.dev/v1 kind: Pipeline @@ -91,3 +92,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/docker/kaniko/gerrit-build-edp.yaml b/charts/pipelines-library/templates/pipelines/docker/kaniko/gerrit-build-edp.yaml index aa0dfc16..3b9e577b 100644 --- a/charts/pipelines-library/templates/pipelines/docker/kaniko/gerrit-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/docker/kaniko/gerrit-build-edp.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.docker }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -90,3 +91,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/docker/kaniko/gerrit-review.yaml b/charts/pipelines-library/templates/pipelines/docker/kaniko/gerrit-review.yaml index be0b46d1..5021536f 100644 --- a/charts/pipelines-library/templates/pipelines/docker/kaniko/gerrit-review.yaml +++ b/charts/pipelines-library/templates/pipelines/docker/kaniko/gerrit-review.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.docker }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -84,3 +85,4 @@ spec: {{ include "gerrit-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/docker/kaniko/github-build-default.yaml b/charts/pipelines-library/templates/pipelines/docker/kaniko/github-build-default.yaml index 9fe9ceee..5034a1f8 100644 --- a/charts/pipelines-library/templates/pipelines/docker/kaniko/github-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/docker/kaniko/github-build-default.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.docker }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -86,3 +87,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/docker/kaniko/github-build-edp.yaml b/charts/pipelines-library/templates/pipelines/docker/kaniko/github-build-edp.yaml index c15d4690..4b13eb09 100644 --- a/charts/pipelines-library/templates/pipelines/docker/kaniko/github-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/docker/kaniko/github-build-edp.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.docker }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -86,3 +87,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/docker/kaniko/github-review.yaml b/charts/pipelines-library/templates/pipelines/docker/kaniko/github-review.yaml index 485d5673..aa1f4a95 100644 --- a/charts/pipelines-library/templates/pipelines/docker/kaniko/github-review.yaml +++ b/charts/pipelines-library/templates/pipelines/docker/kaniko/github-review.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.docker }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -94,3 +95,4 @@ spec: {{ include "github-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/docker/kaniko/gitlab-build-default.yaml b/charts/pipelines-library/templates/pipelines/docker/kaniko/gitlab-build-default.yaml index 69e9a021..bfa2bafd 100644 --- a/charts/pipelines-library/templates/pipelines/docker/kaniko/gitlab-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/docker/kaniko/gitlab-build-default.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.docker }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -86,3 +87,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/docker/kaniko/gitlab-build-edp.yaml b/charts/pipelines-library/templates/pipelines/docker/kaniko/gitlab-build-edp.yaml index 9d6ed9fc..d34f7c2c 100644 --- a/charts/pipelines-library/templates/pipelines/docker/kaniko/gitlab-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/docker/kaniko/gitlab-build-edp.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.docker }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -86,3 +87,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/docker/kaniko/gitlab-review.yaml b/charts/pipelines-library/templates/pipelines/docker/kaniko/gitlab-review.yaml index ef31c120..afa88ace 100644 --- a/charts/pipelines-library/templates/pipelines/docker/kaniko/gitlab-review.yaml +++ b/charts/pipelines-library/templates/pipelines/docker/kaniko/gitlab-review.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.docker }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -94,3 +95,4 @@ spec: {{ include "gitlab-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/go/bitbucket-build-default.yaml b/charts/pipelines-library/templates/pipelines/go/bitbucket-build-default.yaml index 6d33d8ba..dd6e8795 100644 --- a/charts/pipelines-library/templates/pipelines/go/bitbucket-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/go/bitbucket-build-default.yaml @@ -1,16 +1,18 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.go.beego ) ( .Values.pipelines.deployableResources.go.gin ) ( .Values.pipelines.deployableResources.go.operatorsdk )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "beego" "gin" "operator-sdk" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.go" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-go-{{ $k }}-app-build-default + name: bitbucket-go-{{ $framework }}-app-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application (default versioning)" + description: "The Build pipeline for building {{ $framework }} application (default versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -19,7 +21,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/go-go-{{ $k }}" + default: "https://github.com/epmd-edp/go-go-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -27,7 +29,7 @@ spec: default: "master" type: string - name: CODEBASE_NAME - default: "{{ $k }}-go" + default: "{{ $framework }}-go" description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -90,3 +92,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/go/bitbucket-build-edp.yaml b/charts/pipelines-library/templates/pipelines/go/bitbucket-build-edp.yaml index b5b0af80..1e47ca87 100644 --- a/charts/pipelines-library/templates/pipelines/go/bitbucket-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/go/bitbucket-build-edp.yaml @@ -1,16 +1,18 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.go.beego ) ( .Values.pipelines.deployableResources.go.gin ) ( .Values.pipelines.deployableResources.go.operatorsdk )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "beego" "gin" "operator-sdk" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.go" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-go-{{ $k }}-app-build-edp + name: bitbucket-go-{{ $framework }}-app-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} application (EDP versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -19,7 +21,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/go-go-{{ $k }}" + default: "https://github.com/epmd-edp/go-go-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -27,7 +29,7 @@ spec: default: "master" type: string - name: CODEBASE_NAME - default: "{{ $k }}-go" + default: "{{ $framework }}-go" description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -90,3 +92,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/go/bitbucket-review.yaml b/charts/pipelines-library/templates/pipelines/go/bitbucket-review.yaml index 9c79c1ed..014356c1 100644 --- a/charts/pipelines-library/templates/pipelines/go/bitbucket-review.yaml +++ b/charts/pipelines-library/templates/pipelines/go/bitbucket-review.yaml @@ -1,16 +1,18 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.go.beego ) ( .Values.pipelines.deployableResources.go.gin ) ( .Values.pipelines.deployableResources.go.operatorsdk )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "beego" "gin" "operator-sdk" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.go" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-go-{{ $k }}-app-review + name: bitbucket-go-{{ $framework }}-app-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }}" + description: "The Review pipeline for building {{ $framework }}" workspaces: - name: shared-workspace - name: ssh-creds @@ -19,7 +21,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/go-go-{{ $k }}" + default: "https://github.com/epmd-edp/go-go-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -35,7 +37,7 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: "{{ $k }}-go" + default: "{{ $framework }}-go" description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -100,3 +102,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/go/gerrit-build-default.yaml b/charts/pipelines-library/templates/pipelines/go/gerrit-build-default.yaml index edd50bd9..20c60760 100644 --- a/charts/pipelines-library/templates/pipelines/go/gerrit-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/go/gerrit-build-default.yaml @@ -1,16 +1,18 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.go.beego ) ( .Values.pipelines.deployableResources.go.gin ) ( .Values.pipelines.deployableResources.go.operatorsdk )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "beego" "gin" "operator-sdk" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.go" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-go-{{ $k }}-app-build-default + name: gerrit-go-{{ $framework }}-app-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application (default versioning)" + description: "The Build pipeline for building {{ $framework }} application (default versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -19,7 +21,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/go-go-{{ $k }}" + default: "https://github.com/epmd-edp/go-go-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -27,7 +29,7 @@ spec: default: "master" type: string - name: CODEBASE_NAME - default: "{{ $k }}-go" + default: "{{ $framework }}-go" description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -90,3 +92,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/go/gerrit-build-edp.yaml b/charts/pipelines-library/templates/pipelines/go/gerrit-build-edp.yaml index d1f70d67..39322963 100644 --- a/charts/pipelines-library/templates/pipelines/go/gerrit-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/go/gerrit-build-edp.yaml @@ -1,16 +1,18 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.go.beego ) ( .Values.pipelines.deployableResources.go.gin ) ( .Values.pipelines.deployableResources.go.operatorsdk )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "beego" "gin" "operator-sdk" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.go" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-go-{{ $k }}-app-build-edp + name: gerrit-go-{{ $framework }}-app-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} application (EDP versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -19,7 +21,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/go-go-{{ $k }}" + default: "https://github.com/epmd-edp/go-go-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -27,7 +29,7 @@ spec: default: "master" type: string - name: CODEBASE_NAME - default: "{{ $k }}-go" + default: "{{ $framework }}-go" description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -90,3 +92,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/go/gerrit-review.yaml b/charts/pipelines-library/templates/pipelines/go/gerrit-review.yaml index 81aeb475..4901895d 100644 --- a/charts/pipelines-library/templates/pipelines/go/gerrit-review.yaml +++ b/charts/pipelines-library/templates/pipelines/go/gerrit-review.yaml @@ -1,16 +1,18 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.go.beego ) ( .Values.pipelines.deployableResources.go.gin ) ( .Values.pipelines.deployableResources.go.operatorsdk )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "beego" "gin" "operator-sdk" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.go" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-go-{{ $k }}-app-review + name: gerrit-go-{{ $framework }}-app-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }}" + description: "The Review pipeline for building {{ $framework }}" workspaces: - name: shared-workspace - name: ssh-creds @@ -19,7 +21,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/go-go-{{ $k }}" + default: "https://github.com/epmd-edp/go-go-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -31,7 +33,7 @@ spec: default: "" type: string - name: CODEBASE_NAME - default: "{{ $k }}-go" + default: "{{ $framework }}-go" description: "Project name" type: string - name: image @@ -138,3 +140,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/go/github-build-default.yaml b/charts/pipelines-library/templates/pipelines/go/github-build-default.yaml index 297be54c..d6aa65b7 100644 --- a/charts/pipelines-library/templates/pipelines/go/github-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/go/github-build-default.yaml @@ -1,16 +1,18 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.go.beego ) ( .Values.pipelines.deployableResources.go.gin ) ( .Values.pipelines.deployableResources.go.operatorsdk )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "beego" "gin" "operator-sdk" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.go" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-go-{{ $k }}-app-build-default + name: github-go-{{ $framework }}-app-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application (default versioning)" + description: "The Build pipeline for building {{ $framework }} application (default versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -19,7 +21,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/go-go-{{ $k }}" + default: "https://github.com/epmd-edp/go-go-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -27,7 +29,7 @@ spec: default: "master" type: string - name: CODEBASE_NAME - default: "{{ $k }}-go" + default: "{{ $framework }}-go" description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -90,3 +92,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/go/github-build-edp.yaml b/charts/pipelines-library/templates/pipelines/go/github-build-edp.yaml index a5fde2c4..5d751176 100644 --- a/charts/pipelines-library/templates/pipelines/go/github-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/go/github-build-edp.yaml @@ -1,16 +1,18 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.go.beego ) ( .Values.pipelines.deployableResources.go.gin ) ( .Values.pipelines.deployableResources.go.operatorsdk )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "beego" "gin" "operator-sdk" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.go" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-go-{{ $k }}-app-build-edp + name: github-go-{{ $framework }}-app-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} application (EDP versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -19,7 +21,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/go-go-{{ $k }}" + default: "https://github.com/epmd-edp/go-go-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -27,7 +29,7 @@ spec: default: "master" type: string - name: CODEBASE_NAME - default: "{{ $k }}-go" + default: "{{ $framework }}-go" description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -90,3 +92,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/go/github-review.yaml b/charts/pipelines-library/templates/pipelines/go/github-review.yaml index 3d46af93..394100fc 100644 --- a/charts/pipelines-library/templates/pipelines/go/github-review.yaml +++ b/charts/pipelines-library/templates/pipelines/go/github-review.yaml @@ -1,16 +1,18 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.go.beego ) ( .Values.pipelines.deployableResources.go.gin ) ( .Values.pipelines.deployableResources.go.operatorsdk )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "beego" "gin" "operator-sdk" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.go" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-go-{{ $k }}-app-review + name: github-go-{{ $framework }}-app-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }}" + description: "The Review pipeline for building {{ $framework }}" workspaces: - name: shared-workspace - name: ssh-creds @@ -19,7 +21,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/go-go-{{ $k }}" + default: "https://github.com/epmd-edp/go-go-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -35,7 +37,7 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: "{{ $k }}-go" + default: "{{ $framework }}-go" description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -103,3 +105,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/go/gitlab-build-default.yaml b/charts/pipelines-library/templates/pipelines/go/gitlab-build-default.yaml index 8ed7ef65..a5fd34c6 100644 --- a/charts/pipelines-library/templates/pipelines/go/gitlab-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/go/gitlab-build-default.yaml @@ -1,16 +1,18 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.go.beego ) ( .Values.pipelines.deployableResources.go.gin ) ( .Values.pipelines.deployableResources.go.operatorsdk )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "beego" "gin" "operator-sdk" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.go" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-go-{{ $k }}-app-build-default + name: gitlab-go-{{ $framework }}-app-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application (default versioning)" + description: "The Build pipeline for building {{ $framework }} application (default versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -19,7 +21,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/go-go-{{ $k }}" + default: "https://github.com/epmd-edp/go-go-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -27,7 +29,7 @@ spec: default: "master" type: string - name: CODEBASE_NAME - default: "{{ $k }}-go" + default: "{{ $framework }}-go" description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -90,3 +92,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/go/gitlab-build-edp.yaml b/charts/pipelines-library/templates/pipelines/go/gitlab-build-edp.yaml index 0364f69a..f8e73848 100644 --- a/charts/pipelines-library/templates/pipelines/go/gitlab-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/go/gitlab-build-edp.yaml @@ -1,16 +1,18 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.go.beego ) ( .Values.pipelines.deployableResources.go.gin ) ( .Values.pipelines.deployableResources.go.operatorsdk )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "beego" "gin" "operator-sdk" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.go" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-go-{{ $k }}-app-build-edp + name: gitlab-go-{{ $framework }}-app-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} application (EDP versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -19,7 +21,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/go-go-{{ $k }}" + default: "https://github.com/epmd-edp/go-go-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -27,7 +29,7 @@ spec: default: "master" type: string - name: CODEBASE_NAME - default: "{{ $k }}-go" + default: "{{ $framework }}-go" description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -90,3 +92,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/go/gitlab-review.yaml b/charts/pipelines-library/templates/pipelines/go/gitlab-review.yaml index 2315bc98..a4558829 100644 --- a/charts/pipelines-library/templates/pipelines/go/gitlab-review.yaml +++ b/charts/pipelines-library/templates/pipelines/go/gitlab-review.yaml @@ -1,16 +1,18 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.go.beego ) ( .Values.pipelines.deployableResources.go.gin ) ( .Values.pipelines.deployableResources.go.operatorsdk )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "beego" "gin" "operator-sdk" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.go" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-go-{{ $k }}-app-review + name: gitlab-go-{{ $framework }}-app-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }}" + description: "The Review pipeline for building {{ $framework }}" workspaces: - name: shared-workspace - name: ssh-creds @@ -19,7 +21,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/go-go-{{ $k }}" + default: "https://github.com/epmd-edp/go-go-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -35,7 +37,7 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: "{{ $k }}-go" + default: "{{ $framework }}-go" description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -100,3 +102,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/groovy/bitbucket-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/groovy/bitbucket-build-lib-default.yaml index e9df8165..a9abec7b 100644 --- a/charts/pipelines-library/templates/pipelines/groovy/bitbucket-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/groovy/bitbucket-build-lib-default.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.groovy }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -170,3 +171,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/groovy/bitbucket-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/groovy/bitbucket-build-lib-edp.yaml index 417d7053..f9d2c37d 100644 --- a/charts/pipelines-library/templates/pipelines/groovy/bitbucket-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/groovy/bitbucket-build-lib-edp.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.groovy }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -172,3 +173,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/groovy/bitbucket-review-lib.yaml b/charts/pipelines-library/templates/pipelines/groovy/bitbucket-review-lib.yaml index a9a5dc29..92056305 100644 --- a/charts/pipelines-library/templates/pipelines/groovy/bitbucket-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/groovy/bitbucket-review-lib.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.groovy }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -100,3 +101,4 @@ spec: {{ include "bitbucket-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/groovy/gerrit-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/groovy/gerrit-build-lib-default.yaml index c9fd2400..70265851 100644 --- a/charts/pipelines-library/templates/pipelines/groovy/gerrit-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/groovy/gerrit-build-lib-default.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.groovy }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -170,3 +171,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/groovy/gerrit-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/groovy/gerrit-build-lib-edp.yaml index ed323a14..135dce34 100644 --- a/charts/pipelines-library/templates/pipelines/groovy/gerrit-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/groovy/gerrit-build-lib-edp.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.groovy }} {{- $registry := include "edp-tekton.registry" . -}} apiVersion: tekton.dev/v1 kind: Pipeline @@ -173,3 +174,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/groovy/gerrit-review-lib.yaml b/charts/pipelines-library/templates/pipelines/groovy/gerrit-review-lib.yaml index aa96b873..57c16c20 100644 --- a/charts/pipelines-library/templates/pipelines/groovy/gerrit-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/groovy/gerrit-review-lib.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.groovy }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -96,3 +97,4 @@ spec: {{ include "gerrit-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/groovy/github-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/groovy/github-build-lib-default.yaml index 09c75ee9..c7a27ba2 100644 --- a/charts/pipelines-library/templates/pipelines/groovy/github-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/groovy/github-build-lib-default.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.groovy }} {{- $registry := include "edp-tekton.registry" . -}} apiVersion: tekton.dev/v1 kind: Pipeline @@ -171,3 +172,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/groovy/github-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/groovy/github-build-lib-edp.yaml index 7119d8b3..3a5a6cf1 100644 --- a/charts/pipelines-library/templates/pipelines/groovy/github-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/groovy/github-build-lib-edp.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.groovy }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -172,3 +173,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/groovy/github-review-lib.yaml b/charts/pipelines-library/templates/pipelines/groovy/github-review-lib.yaml index 06c482c4..86a0b4b2 100644 --- a/charts/pipelines-library/templates/pipelines/groovy/github-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/groovy/github-review-lib.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.groovy }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -103,3 +104,4 @@ spec: {{ include "github-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/groovy/gitlab-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/groovy/gitlab-build-lib-default.yaml index 013ed173..2477d688 100644 --- a/charts/pipelines-library/templates/pipelines/groovy/gitlab-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/groovy/gitlab-build-lib-default.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.groovy }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -170,3 +171,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/groovy/gitlab-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/groovy/gitlab-build-lib-edp.yaml index 93ace44d..f8b32993 100644 --- a/charts/pipelines-library/templates/pipelines/groovy/gitlab-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/groovy/gitlab-build-lib-edp.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.groovy }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -172,3 +173,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/groovy/gitlab-review-lib.yaml b/charts/pipelines-library/templates/pipelines/groovy/gitlab-review-lib.yaml index 433e3e43..01baba4a 100644 --- a/charts/pipelines-library/templates/pipelines/groovy/gitlab-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/groovy/gitlab-review-lib.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.groovy }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -100,3 +101,4 @@ spec: {{ include "gitlab-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm-pipelines/bitbucket-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/helm-pipelines/bitbucket-build-lib-default.yaml index 97fcee01..55aa16fe 100644 --- a/charts/pipelines-library/templates/pipelines/helm-pipelines/bitbucket-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/helm-pipelines/bitbucket-build-lib-default.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if ( index .Values.pipelines.deployableResources "helm-pipeline" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -154,3 +155,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm-pipelines/bitbucket-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/helm-pipelines/bitbucket-build-lib-edp.yaml index 0e7fa387..35d286db 100644 --- a/charts/pipelines-library/templates/pipelines/helm-pipelines/bitbucket-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/helm-pipelines/bitbucket-build-lib-edp.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if ( index .Values.pipelines.deployableResources "helm-pipeline" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -173,3 +174,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm-pipelines/bitbucket-review-lib.yaml b/charts/pipelines-library/templates/pipelines/helm-pipelines/bitbucket-review-lib.yaml index 183b81ca..b26a13eb 100644 --- a/charts/pipelines-library/templates/pipelines/helm-pipelines/bitbucket-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/helm-pipelines/bitbucket-review-lib.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if ( index .Values.pipelines.deployableResources "helm-pipeline" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -149,3 +150,4 @@ spec: {{ include "bitbucket-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm-pipelines/gerrit-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/helm-pipelines/gerrit-build-lib-default.yaml index c7416f6e..200f47b2 100644 --- a/charts/pipelines-library/templates/pipelines/helm-pipelines/gerrit-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/helm-pipelines/gerrit-build-lib-default.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if ( index .Values.pipelines.deployableResources "helm-pipeline" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -170,3 +171,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm-pipelines/gerrit-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/helm-pipelines/gerrit-build-lib-edp.yaml index 47accd22..2ae19575 100644 --- a/charts/pipelines-library/templates/pipelines/helm-pipelines/gerrit-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/helm-pipelines/gerrit-build-lib-edp.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if ( index .Values.pipelines.deployableResources "helm-pipeline" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -189,3 +190,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm-pipelines/gerrit-review-lib.yaml b/charts/pipelines-library/templates/pipelines/helm-pipelines/gerrit-review-lib.yaml index 64637a32..224d3af5 100644 --- a/charts/pipelines-library/templates/pipelines/helm-pipelines/gerrit-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/helm-pipelines/gerrit-review-lib.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if ( index .Values.pipelines.deployableResources "helm-pipeline" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -139,3 +140,4 @@ spec: {{ include "gerrit-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm-pipelines/github-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/helm-pipelines/github-build-lib-default.yaml index 44140556..95dab78e 100644 --- a/charts/pipelines-library/templates/pipelines/helm-pipelines/github-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/helm-pipelines/github-build-lib-default.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if ( index .Values.pipelines.deployableResources "helm-pipeline" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -154,3 +155,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm-pipelines/github-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/helm-pipelines/github-build-lib-edp.yaml index ce09e573..c77b4831 100644 --- a/charts/pipelines-library/templates/pipelines/helm-pipelines/github-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/helm-pipelines/github-build-lib-edp.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if ( index .Values.pipelines.deployableResources "helm-pipeline" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -173,3 +174,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm-pipelines/github-review-lib.yaml b/charts/pipelines-library/templates/pipelines/helm-pipelines/github-review-lib.yaml index 6f5a7e40..498b9cf9 100644 --- a/charts/pipelines-library/templates/pipelines/helm-pipelines/github-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/helm-pipelines/github-review-lib.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if ( index .Values.pipelines.deployableResources "helm-pipeline" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -153,3 +154,4 @@ spec: {{ include "github-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm-pipelines/gitlab-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/helm-pipelines/gitlab-build-lib-default.yaml index bdf4571e..edc7bfa6 100644 --- a/charts/pipelines-library/templates/pipelines/helm-pipelines/gitlab-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/helm-pipelines/gitlab-build-lib-default.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if ( index .Values.pipelines.deployableResources "helm-pipeline" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -154,3 +155,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm-pipelines/gitlab-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/helm-pipelines/gitlab-build-lib-edp.yaml index c92c6bbc..b4c5e18a 100644 --- a/charts/pipelines-library/templates/pipelines/helm-pipelines/gitlab-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/helm-pipelines/gitlab-build-lib-edp.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if ( index .Values.pipelines.deployableResources "helm-pipeline" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -173,3 +174,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm-pipelines/gitlab-review-lib.yaml b/charts/pipelines-library/templates/pipelines/helm-pipelines/gitlab-review-lib.yaml index 326c7661..cbfff7ad 100644 --- a/charts/pipelines-library/templates/pipelines/helm-pipelines/gitlab-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/helm-pipelines/gitlab-review-lib.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if ( index .Values.pipelines.deployableResources "helm-pipeline" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -153,3 +154,4 @@ spec: {{ include "gitlab-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm/bitbucket-build-default.yaml b/charts/pipelines-library/templates/pipelines/helm/bitbucket-build-default.yaml index 775f954e..b011e9ad 100644 --- a/charts/pipelines-library/templates/pipelines/helm/bitbucket-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/helm/bitbucket-build-default.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.helm }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -188,3 +189,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm/bitbucket-build-edp.yaml b/charts/pipelines-library/templates/pipelines/helm/bitbucket-build-edp.yaml index 97b9fc86..47c84647 100644 --- a/charts/pipelines-library/templates/pipelines/helm/bitbucket-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/helm/bitbucket-build-edp.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.helm }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -201,3 +202,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm/bitbucket-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/helm/bitbucket-build-lib-default.yaml index 82fa1840..d937fd9a 100644 --- a/charts/pipelines-library/templates/pipelines/helm/bitbucket-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/helm/bitbucket-build-lib-default.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.helm }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -109,3 +110,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm/bitbucket-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/helm/bitbucket-build-lib-edp.yaml index efd9f43f..00f1f2f1 100644 --- a/charts/pipelines-library/templates/pipelines/helm/bitbucket-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/helm/bitbucket-build-lib-edp.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.helm }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -112,3 +113,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm/bitbucket-review-lib.yaml b/charts/pipelines-library/templates/pipelines/helm/bitbucket-review-lib.yaml index 2595a241..98061f00 100644 --- a/charts/pipelines-library/templates/pipelines/helm/bitbucket-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/helm/bitbucket-review-lib.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.helm }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -114,3 +115,4 @@ spec: {{ include "bitbucket-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm/bitbucket-review.yaml b/charts/pipelines-library/templates/pipelines/helm/bitbucket-review.yaml index 71b350ee..c58c2e8c 100644 --- a/charts/pipelines-library/templates/pipelines/helm/bitbucket-review.yaml +++ b/charts/pipelines-library/templates/pipelines/helm/bitbucket-review.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.helm }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -164,3 +165,4 @@ spec: {{ include "bitbucket-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm/gerrit-build-default.yaml b/charts/pipelines-library/templates/pipelines/helm/gerrit-build-default.yaml index 5272727b..c5735e32 100644 --- a/charts/pipelines-library/templates/pipelines/helm/gerrit-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/helm/gerrit-build-default.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.helm }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -188,3 +189,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm/gerrit-build-edp.yaml b/charts/pipelines-library/templates/pipelines/helm/gerrit-build-edp.yaml index e957dbf0..ab491175 100644 --- a/charts/pipelines-library/templates/pipelines/helm/gerrit-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/helm/gerrit-build-edp.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.helm }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -200,3 +201,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm/gerrit-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/helm/gerrit-build-lib-default.yaml index a2e028b2..3473942e 100644 --- a/charts/pipelines-library/templates/pipelines/helm/gerrit-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/helm/gerrit-build-lib-default.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.helm }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -113,3 +114,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm/gerrit-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/helm/gerrit-build-lib-edp.yaml index 0e5d1e07..383e5850 100644 --- a/charts/pipelines-library/templates/pipelines/helm/gerrit-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/helm/gerrit-build-lib-edp.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.helm }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -112,3 +113,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm/gerrit-review-lib.yaml b/charts/pipelines-library/templates/pipelines/helm/gerrit-review-lib.yaml index 6e6aedd5..25ab2422 100644 --- a/charts/pipelines-library/templates/pipelines/helm/gerrit-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/helm/gerrit-review-lib.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.helm }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -102,3 +103,4 @@ spec: {{ include "gerrit-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm/gerrit-review.yaml b/charts/pipelines-library/templates/pipelines/helm/gerrit-review.yaml index a9d1bc58..5a233e5a 100644 --- a/charts/pipelines-library/templates/pipelines/helm/gerrit-review.yaml +++ b/charts/pipelines-library/templates/pipelines/helm/gerrit-review.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.helm }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -154,3 +155,4 @@ spec: {{ include "gerrit-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm/github-build-default.yaml b/charts/pipelines-library/templates/pipelines/helm/github-build-default.yaml index 85e4d3e4..7b8196c7 100644 --- a/charts/pipelines-library/templates/pipelines/helm/github-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/helm/github-build-default.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.helm }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -188,3 +189,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm/github-build-edp.yaml b/charts/pipelines-library/templates/pipelines/helm/github-build-edp.yaml index 881ceaa9..1c2364a2 100644 --- a/charts/pipelines-library/templates/pipelines/helm/github-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/helm/github-build-edp.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.helm }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -201,3 +202,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm/github-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/helm/github-build-lib-default.yaml index 8599da98..404109ef 100644 --- a/charts/pipelines-library/templates/pipelines/helm/github-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/helm/github-build-lib-default.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.helm }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -111,3 +112,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm/github-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/helm/github-build-lib-edp.yaml index 89ce5a9e..66cb4d5a 100644 --- a/charts/pipelines-library/templates/pipelines/helm/github-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/helm/github-build-lib-edp.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.helm }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -112,3 +113,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm/github-review-lib.yaml b/charts/pipelines-library/templates/pipelines/helm/github-review-lib.yaml index 5b1a26e0..b17f4a2f 100644 --- a/charts/pipelines-library/templates/pipelines/helm/github-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/helm/github-review-lib.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.helm }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -118,3 +119,4 @@ spec: {{ include "github-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm/github-review.yaml b/charts/pipelines-library/templates/pipelines/helm/github-review.yaml index 28b44177..40e81b40 100644 --- a/charts/pipelines-library/templates/pipelines/helm/github-review.yaml +++ b/charts/pipelines-library/templates/pipelines/helm/github-review.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.helm }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -168,3 +169,4 @@ spec: {{ include "github-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm/gitlab-build-default.yaml b/charts/pipelines-library/templates/pipelines/helm/gitlab-build-default.yaml index ed9231a4..1b1e4438 100644 --- a/charts/pipelines-library/templates/pipelines/helm/gitlab-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/helm/gitlab-build-default.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.helm }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -188,3 +189,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm/gitlab-build-edp.yaml b/charts/pipelines-library/templates/pipelines/helm/gitlab-build-edp.yaml index 34b1a999..e9b0c5c8 100644 --- a/charts/pipelines-library/templates/pipelines/helm/gitlab-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/helm/gitlab-build-edp.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.helm }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -201,3 +202,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm/gitlab-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/helm/gitlab-build-lib-default.yaml index 3544d3f2..51544aa8 100644 --- a/charts/pipelines-library/templates/pipelines/helm/gitlab-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/helm/gitlab-build-lib-default.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.helm }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -109,3 +110,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm/gitlab-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/helm/gitlab-build-lib-edp.yaml index 276e8a96..ec643efb 100644 --- a/charts/pipelines-library/templates/pipelines/helm/gitlab-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/helm/gitlab-build-lib-edp.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.helm }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -112,3 +113,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm/gitlab-review-lib.yaml b/charts/pipelines-library/templates/pipelines/helm/gitlab-review-lib.yaml index bfa9c0ec..21e0e076 100644 --- a/charts/pipelines-library/templates/pipelines/helm/gitlab-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/helm/gitlab-review-lib.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.helm }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -118,3 +119,4 @@ spec: {{ include "gitlab-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/helm/gitlab-review.yaml b/charts/pipelines-library/templates/pipelines/helm/gitlab-review.yaml index 043d3495..0b219f7f 100644 --- a/charts/pipelines-library/templates/pipelines/helm/gitlab-review.yaml +++ b/charts/pipelines-library/templates/pipelines/helm/gitlab-review.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.helm }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -168,3 +169,4 @@ spec: {{ include "gitlab-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/infrastructure/bitbucket-build-default.yaml b/charts/pipelines-library/templates/pipelines/infrastructure/bitbucket-build-default.yaml index 8fccc1d4..31a2cb6e 100644 --- a/charts/pipelines-library/templates/pipelines/infrastructure/bitbucket-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/infrastructure/bitbucket-build-default.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.infrastructure }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -72,3 +73,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/infrastructure/bitbucket-build-edp.yaml b/charts/pipelines-library/templates/pipelines/infrastructure/bitbucket-build-edp.yaml index e0738820..62f4620f 100644 --- a/charts/pipelines-library/templates/pipelines/infrastructure/bitbucket-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/infrastructure/bitbucket-build-edp.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.infrastructure }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -75,3 +76,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/infrastructure/bitbucket-review.yaml b/charts/pipelines-library/templates/pipelines/infrastructure/bitbucket-review.yaml index b938cf32..22b79eb6 100644 --- a/charts/pipelines-library/templates/pipelines/infrastructure/bitbucket-review.yaml +++ b/charts/pipelines-library/templates/pipelines/infrastructure/bitbucket-review.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.infrastructure }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -52,3 +53,4 @@ spec: {{ include "bitbucket-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/infrastructure/gerrit-build-default.yaml b/charts/pipelines-library/templates/pipelines/infrastructure/gerrit-build-default.yaml index ffb028d4..eaced920 100644 --- a/charts/pipelines-library/templates/pipelines/infrastructure/gerrit-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/infrastructure/gerrit-build-default.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.infrastructure }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -72,3 +73,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/infrastructure/gerrit-build-edp.yaml b/charts/pipelines-library/templates/pipelines/infrastructure/gerrit-build-edp.yaml index 40c5fb83..eb76b8a6 100644 --- a/charts/pipelines-library/templates/pipelines/infrastructure/gerrit-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/infrastructure/gerrit-build-edp.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.infrastructure }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -75,3 +76,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/infrastructure/gerrit-review.yaml b/charts/pipelines-library/templates/pipelines/infrastructure/gerrit-review.yaml index 7b18a44c..33dcf892 100644 --- a/charts/pipelines-library/templates/pipelines/infrastructure/gerrit-review.yaml +++ b/charts/pipelines-library/templates/pipelines/infrastructure/gerrit-review.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.infrastructure }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -51,3 +52,4 @@ spec: {{ include "gerrit-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/infrastructure/github-build-default.yaml b/charts/pipelines-library/templates/pipelines/infrastructure/github-build-default.yaml index a86bea39..f065efae 100644 --- a/charts/pipelines-library/templates/pipelines/infrastructure/github-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/infrastructure/github-build-default.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.infrastructure }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -72,3 +73,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/infrastructure/github-build-edp.yaml b/charts/pipelines-library/templates/pipelines/infrastructure/github-build-edp.yaml index a40257aa..b49c231a 100644 --- a/charts/pipelines-library/templates/pipelines/infrastructure/github-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/infrastructure/github-build-edp.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.infrastructure }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -75,3 +76,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/infrastructure/github-review.yaml b/charts/pipelines-library/templates/pipelines/infrastructure/github-review.yaml index 5567b02a..57f0ca7f 100644 --- a/charts/pipelines-library/templates/pipelines/infrastructure/github-review.yaml +++ b/charts/pipelines-library/templates/pipelines/infrastructure/github-review.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.infrastructure }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -55,3 +56,4 @@ spec: {{ include "github-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/infrastructure/gitlab-build-default.yaml b/charts/pipelines-library/templates/pipelines/infrastructure/gitlab-build-default.yaml index 375f5aac..62ebf766 100644 --- a/charts/pipelines-library/templates/pipelines/infrastructure/gitlab-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/infrastructure/gitlab-build-default.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.infrastructure }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -72,3 +73,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/infrastructure/gitlab-build-edp.yaml b/charts/pipelines-library/templates/pipelines/infrastructure/gitlab-build-edp.yaml index 6c29685d..c13c4798 100644 --- a/charts/pipelines-library/templates/pipelines/infrastructure/gitlab-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/infrastructure/gitlab-build-edp.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.infrastructure }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -75,3 +76,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/infrastructure/gitlab-review.yaml b/charts/pipelines-library/templates/pipelines/infrastructure/gitlab-review.yaml index a365bf81..d0d18ef9 100644 --- a/charts/pipelines-library/templates/pipelines/infrastructure/gitlab-review.yaml +++ b/charts/pipelines-library/templates/pipelines/infrastructure/gitlab-review.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.infrastructure }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -52,3 +53,4 @@ spec: {{ include "gitlab-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/gradle/bitbucket-build-default.yaml b/charts/pipelines-library/templates/pipelines/java/gradle/bitbucket-build-default.yaml index 340f4343..9b7b96b1 100644 --- a/charts/pipelines-library/templates/pipelines/java/gradle/bitbucket-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/java/gradle/bitbucket-build-default.yaml @@ -1,26 +1,19 @@ {{ if has "bitbucket" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.gradle" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.gradleSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-gradle-{{ $k }}-app-build-default + name: bitbucket-gradle-{{ $framework}}-app-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with Gradle (default versioning)" + description: "The Build pipeline for building {{ $framework}} application with Gradle (default versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -37,7 +30,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-gradle' + default: '{{ $framework}}-gradle' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -48,11 +41,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: TICKET_NAME_PATTERN @@ -122,3 +115,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/gradle/bitbucket-build-edp.yaml b/charts/pipelines-library/templates/pipelines/java/gradle/bitbucket-build-edp.yaml index bbe2d67c..1a27a58f 100644 --- a/charts/pipelines-library/templates/pipelines/java/gradle/bitbucket-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/java/gradle/bitbucket-build-edp.yaml @@ -1,26 +1,19 @@ {{ if has "bitbucket" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.gradle" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.gradleSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-gradle-{{ $k }}-app-build-edp + name: bitbucket-gradle-{{ $framework }}-app-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with Gradle (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} application with Gradle (EDP versioning)" workspaces: - name: shared-workspace @@ -39,7 +32,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -50,11 +43,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: TICKET_NAME_PATTERN @@ -126,3 +119,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/gradle/bitbucket-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/java/gradle/bitbucket-build-lib-default.yaml index c0e8ae40..f0cef182 100644 --- a/charts/pipelines-library/templates/pipelines/java/gradle/bitbucket-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/java/gradle/bitbucket-build-lib-default.yaml @@ -1,26 +1,19 @@ {{ if has "bitbucket" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.gradle" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.gradleSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-gradle-{{ $k }}-lib-build-default + name: bitbucket-gradle-{{ $framework }}-lib-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library with Gradle (default versioning)" + description: "The Build pipeline for building {{ $framework }} library with Gradle (default versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -37,7 +30,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-gradle' + default: '{{ $framework }}-gradle' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -48,11 +41,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: TICKET_NAME_PATTERN @@ -120,3 +113,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/gradle/bitbucket-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/java/gradle/bitbucket-build-lib-edp.yaml index b3d8a1f5..356d6f18 100644 --- a/charts/pipelines-library/templates/pipelines/java/gradle/bitbucket-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/java/gradle/bitbucket-build-lib-edp.yaml @@ -1,26 +1,19 @@ {{ if has "bitbucket" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.gradle" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.gradleSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-gradle-{{ $k }}-lib-build-edp + name: bitbucket-gradle-{{ $framework }}-lib-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library with Gradle (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} library with Gradle (EDP versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -37,7 +30,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -48,11 +41,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: TICKET_NAME_PATTERN @@ -122,3 +115,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/gradle/bitbucket-review-lib.yaml b/charts/pipelines-library/templates/pipelines/java/gradle/bitbucket-review-lib.yaml index 15130815..e9bcb744 100644 --- a/charts/pipelines-library/templates/pipelines/java/gradle/bitbucket-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/java/gradle/bitbucket-review-lib.yaml @@ -1,26 +1,19 @@ {{ if has "bitbucket" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.gradle" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.gradleSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-gradle-{{ $k }}-lib-review + name: bitbucket-gradle-{{ $framework }}-lib-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} library with Gradle" + description: "The Review pipeline for building {{ $framework }} library with Gradle" workspaces: - name: shared-workspace - name: ssh-creds @@ -45,18 +38,18 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: gitfullrepositoryname @@ -77,3 +70,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/gradle/bitbucket-review.yaml b/charts/pipelines-library/templates/pipelines/java/gradle/bitbucket-review.yaml index 89d6cd8b..d458f2e6 100644 --- a/charts/pipelines-library/templates/pipelines/java/gradle/bitbucket-review.yaml +++ b/charts/pipelines-library/templates/pipelines/java/gradle/bitbucket-review.yaml @@ -1,26 +1,19 @@ {{ if has "bitbucket" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.gradle" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.gradleSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-gradle-{{ $k }}-app-review + name: bitbucket-gradle-{{ $framework }}-app-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} application with Gradle" + description: "The Review pipeline for building {{ $framework }} application with Gradle" workspaces: - name: shared-workspace - name: ssh-creds @@ -45,18 +38,18 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: gitfullrepositoryname @@ -114,3 +107,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/gradle/gerrit-build-default.yaml b/charts/pipelines-library/templates/pipelines/java/gradle/gerrit-build-default.yaml index b5e58d81..2e60a7d3 100644 --- a/charts/pipelines-library/templates/pipelines/java/gradle/gerrit-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/java/gradle/gerrit-build-default.yaml @@ -1,26 +1,19 @@ {{ if has "gerrit" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.gradle" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.gradleSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-gradle-{{ $k }}-app-build-default + name: gerrit-gradle-{{ $framework }}-app-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with Gradle (default versioning)" + description: "The Build pipeline for building {{ $framework }} application with Gradle (default versioning)" workspaces: - name: shared-workspace @@ -39,18 +32,18 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-gradle' + default: '{{ $framework }}-gradle' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: changeNumber @@ -124,3 +117,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/gradle/gerrit-build-edp.yaml b/charts/pipelines-library/templates/pipelines/java/gradle/gerrit-build-edp.yaml index 1f35821e..9cda7caa 100644 --- a/charts/pipelines-library/templates/pipelines/java/gradle/gerrit-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/java/gradle/gerrit-build-edp.yaml @@ -1,26 +1,19 @@ {{ if has "gerrit" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.gradle" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.gradleSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-gradle-{{ $k }}-app-build-edp + name: gerrit-gradle-{{ $framework }}-app-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with Gradle (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} application with Gradle (EDP versioning)" workspaces: - name: shared-workspace @@ -39,18 +32,18 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: changeNumber @@ -126,3 +119,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/gradle/gerrit-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/java/gradle/gerrit-build-lib-default.yaml index dc650246..f160a28a 100644 --- a/charts/pipelines-library/templates/pipelines/java/gradle/gerrit-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/java/gradle/gerrit-build-lib-default.yaml @@ -1,26 +1,19 @@ {{ if has "gerrit" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.gradle" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.gradleSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-gradle-{{ $k }}-lib-build-default + name: gerrit-gradle-{{ $framework }}-lib-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library with Gradle (default versioning)" + description: "The Build pipeline for building {{ $framework }} library with Gradle (default versioning)" workspaces: - name: shared-workspace @@ -39,18 +32,18 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-gradle' + default: '{{ $framework }}-gradle' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: changeNumber @@ -122,3 +115,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/gradle/gerrit-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/java/gradle/gerrit-build-lib-edp.yaml index b00927db..7db520c5 100644 --- a/charts/pipelines-library/templates/pipelines/java/gradle/gerrit-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/java/gradle/gerrit-build-lib-edp.yaml @@ -1,26 +1,19 @@ {{ if has "gerrit" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.gradle" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.gradleSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-gradle-{{ $k }}-lib-build-edp + name: gerrit-gradle-{{ $framework }}-lib-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library with Gradle (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} library with Gradle (EDP versioning)" workspaces: - name: shared-workspace @@ -39,18 +32,18 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: changeNumber @@ -124,3 +117,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/gradle/gerrit-review-lib.yaml b/charts/pipelines-library/templates/pipelines/java/gradle/gerrit-review-lib.yaml index c36cf9e7..41072ff9 100644 --- a/charts/pipelines-library/templates/pipelines/java/gradle/gerrit-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/java/gradle/gerrit-review-lib.yaml @@ -1,26 +1,19 @@ {{ if has "gerrit" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.gradle" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.gradleSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-gradle-{{ $k }}-lib-review + name: gerrit-gradle-{{ $framework }}-lib-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} library with Gradle" + description: "The Review pipeline for building {{ $framework }} library with Gradle" workspaces: - name: shared-workspace @@ -43,15 +36,15 @@ spec: default: "" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: targetBranch @@ -75,3 +68,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/gradle/gerrit-review.yaml b/charts/pipelines-library/templates/pipelines/java/gradle/gerrit-review.yaml index 9c24ee12..5b290da0 100644 --- a/charts/pipelines-library/templates/pipelines/java/gradle/gerrit-review.yaml +++ b/charts/pipelines-library/templates/pipelines/java/gradle/gerrit-review.yaml @@ -1,26 +1,19 @@ {{ if has "gerrit" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.gradle" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.gradleSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-gradle-{{ $k }}-app-review + name: gerrit-gradle-{{ $framework }}-app-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} application with Gradle" + description: "The Review pipeline for building {{ $framework }} application with Gradle" workspaces: - name: shared-workspace @@ -47,11 +40,11 @@ spec: description: "Project name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: targetBranch @@ -113,3 +106,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/gradle/github-build-default.yaml b/charts/pipelines-library/templates/pipelines/java/gradle/github-build-default.yaml index 980df99f..7e3b5594 100644 --- a/charts/pipelines-library/templates/pipelines/java/gradle/github-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/java/gradle/github-build-default.yaml @@ -1,26 +1,19 @@ {{ if has "github" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.gradle" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.gradleSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-gradle-{{ $k }}-app-build-default + name: github-gradle-{{ $framework }}-app-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with Gradle (default versioning)" + description: "The Build pipeline for building {{ $framework }} application with Gradle (default versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -37,7 +30,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-gradle' + default: '{{ $framework }}-gradle' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -48,11 +41,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: TICKET_NAME_PATTERN @@ -122,3 +115,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/gradle/github-build-edp.yaml b/charts/pipelines-library/templates/pipelines/java/gradle/github-build-edp.yaml index 08a7ff00..6cb6a2df 100644 --- a/charts/pipelines-library/templates/pipelines/java/gradle/github-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/java/gradle/github-build-edp.yaml @@ -1,26 +1,19 @@ {{ if has "github" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.gradle" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.gradleSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-gradle-{{ $k }}-app-build-edp + name: github-gradle-{{ $framework }}-app-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with Gradle (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} application with Gradle (EDP versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -37,7 +30,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -48,11 +41,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: TICKET_NAME_PATTERN @@ -124,3 +117,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/gradle/github-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/java/gradle/github-build-lib-default.yaml index 54c5808d..eedb8c68 100644 --- a/charts/pipelines-library/templates/pipelines/java/gradle/github-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/java/gradle/github-build-lib-default.yaml @@ -1,26 +1,19 @@ {{ if has "github" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.gradle" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.gradleSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-gradle-{{ $k }}-lib-build-default + name: github-gradle-{{ $framework }}-lib-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library with Gradle (default versioning)" + description: "The Build pipeline for building {{ $framework }} library with Gradle (default versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -37,7 +30,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-gradle' + default: '{{ $framework }}-gradle' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -48,11 +41,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: TICKET_NAME_PATTERN @@ -120,3 +113,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/gradle/github-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/java/gradle/github-build-lib-edp.yaml index 35a937cc..8266e007 100644 --- a/charts/pipelines-library/templates/pipelines/java/gradle/github-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/java/gradle/github-build-lib-edp.yaml @@ -1,26 +1,19 @@ {{ if has "github" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.gradle" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.gradleSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-gradle-{{ $k }}-lib-build-edp + name: github-gradle-{{ $framework }}-lib-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library with Gradle (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} library with Gradle (EDP versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -37,7 +30,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -48,11 +41,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: TICKET_NAME_PATTERN @@ -122,3 +115,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/gradle/github-review-lib.yaml b/charts/pipelines-library/templates/pipelines/java/gradle/github-review-lib.yaml index 3c19bd1c..ed797dc8 100644 --- a/charts/pipelines-library/templates/pipelines/java/gradle/github-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/java/gradle/github-review-lib.yaml @@ -1,26 +1,19 @@ {{ if has "github" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.gradle" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.gradleSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-gradle-{{ $k }}-lib-review + name: github-gradle-{{ $framework }}-lib-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} library with Gradle" + description: "The Review pipeline for building {{ $framework }} library with Gradle" workspaces: - name: shared-workspace - name: ssh-creds @@ -45,18 +38,18 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: gitfullrepositoryname @@ -80,3 +73,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/gradle/github-review.yaml b/charts/pipelines-library/templates/pipelines/java/gradle/github-review.yaml index 6d79b0cf..f6f5cc71 100644 --- a/charts/pipelines-library/templates/pipelines/java/gradle/github-review.yaml +++ b/charts/pipelines-library/templates/pipelines/java/gradle/github-review.yaml @@ -1,26 +1,19 @@ {{ if has "github" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.gradle" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.gradleSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-gradle-{{ $k }}-app-review + name: github-gradle-{{ $framework }}-app-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} application with Gradle" + description: "The Review pipeline for building {{ $framework }} application with Gradle" workspaces: - name: shared-workspace - name: ssh-creds @@ -45,18 +38,18 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: gitfullrepositoryname @@ -117,3 +110,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/gradle/gitlab-build-default.yaml b/charts/pipelines-library/templates/pipelines/java/gradle/gitlab-build-default.yaml index 6eb28db5..c8d6b06e 100644 --- a/charts/pipelines-library/templates/pipelines/java/gradle/gitlab-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/java/gradle/gitlab-build-default.yaml @@ -1,26 +1,19 @@ {{ if has "gitlab" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.gradle" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.gradleSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-gradle-{{ $k }}-app-build-default + name: gitlab-gradle-{{ $framework }}-app-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with Gradle (default versioning)" + description: "The Build pipeline for building {{ $framework }} application with Gradle (default versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -37,7 +30,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-gradle' + default: '{{ $framework }}-gradle' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -48,11 +41,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: TICKET_NAME_PATTERN @@ -122,3 +115,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/gradle/gitlab-build-edp.yaml b/charts/pipelines-library/templates/pipelines/java/gradle/gitlab-build-edp.yaml index 28a41431..17557906 100644 --- a/charts/pipelines-library/templates/pipelines/java/gradle/gitlab-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/java/gradle/gitlab-build-edp.yaml @@ -1,26 +1,19 @@ {{ if has "gitlab" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.gradle" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.gradleSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-gradle-{{ $k }}-app-build-edp + name: gitlab-gradle-{{ $framework }}-app-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with Gradle (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} application with Gradle (EDP versioning)" workspaces: - name: shared-workspace @@ -39,7 +32,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -50,11 +43,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: TICKET_NAME_PATTERN @@ -126,3 +119,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/gradle/gitlab-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/java/gradle/gitlab-build-lib-default.yaml index 9fe4b668..a9dd0d72 100644 --- a/charts/pipelines-library/templates/pipelines/java/gradle/gitlab-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/java/gradle/gitlab-build-lib-default.yaml @@ -1,26 +1,19 @@ {{ if has "gitlab" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.gradle" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.gradleSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-gradle-{{ $k }}-lib-build-default + name: gitlab-gradle-{{ $framework }}-lib-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library with Gradle (default versioning)" + description: "The Build pipeline for building {{ $framework }} library with Gradle (default versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -37,7 +30,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-gradle' + default: '{{ $framework }}-gradle' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -48,11 +41,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: TICKET_NAME_PATTERN @@ -120,3 +113,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/gradle/gitlab-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/java/gradle/gitlab-build-lib-edp.yaml index 929fb54e..5149c5b1 100644 --- a/charts/pipelines-library/templates/pipelines/java/gradle/gitlab-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/java/gradle/gitlab-build-lib-edp.yaml @@ -1,26 +1,19 @@ {{ if has "gitlab" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.gradle" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.gradleSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-gradle-{{ $k }}-lib-build-edp + name: gitlab-gradle-{{ $framework }}-lib-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library with Gradle (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} library with Gradle (EDP versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -37,7 +30,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -48,11 +41,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: TICKET_NAME_PATTERN @@ -122,3 +115,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/gradle/gitlab-review-lib.yaml b/charts/pipelines-library/templates/pipelines/java/gradle/gitlab-review-lib.yaml index a4d3bf5c..0f886ea5 100644 --- a/charts/pipelines-library/templates/pipelines/java/gradle/gitlab-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/java/gradle/gitlab-review-lib.yaml @@ -1,26 +1,19 @@ {{ if has "gitlab" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.gradle" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.gradleSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-gradle-{{ $k }}-lib-review + name: gitlab-gradle-{{ $framework }}-lib-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} library with Gradle" + description: "The Review pipeline for building {{ $framework }} library with Gradle" workspaces: - name: shared-workspace - name: ssh-creds @@ -45,18 +38,18 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: gitfullrepositoryname @@ -77,3 +70,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/gradle/gitlab-review.yaml b/charts/pipelines-library/templates/pipelines/java/gradle/gitlab-review.yaml index 38868486..ec8ac027 100644 --- a/charts/pipelines-library/templates/pipelines/java/gradle/gitlab-review.yaml +++ b/charts/pipelines-library/templates/pipelines/java/gradle/gitlab-review.yaml @@ -1,26 +1,19 @@ {{ if has "gitlab" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk8" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java11" (printf "%s/gradle:7.5.1-jdk11" $registry) - "java17" (printf "%s/gradle:7.5.1-jdk17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.gradle" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.gradleSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-gradle-{{ $k }}-app-review + name: gitlab-gradle-{{ $framework }}-app-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} application with Gradle" + description: "The Review pipeline for building {{ $framework }} application with Gradle" workspaces: - name: shared-workspace - name: ssh-creds @@ -45,18 +38,18 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "gradle image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: gitfullrepositoryname @@ -114,3 +107,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/maven/bitbucket-build-default.yaml b/charts/pipelines-library/templates/pipelines/java/maven/bitbucket-build-default.yaml index 28f82f4f..891687a4 100644 --- a/charts/pipelines-library/templates/pipelines/java/maven/bitbucket-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/java/maven/bitbucket-build-default.yaml @@ -1,26 +1,19 @@ {{ if has "bitbucket" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-maven-{{ $k }}-app-build-default + name: bitbucket-maven-{{ $framework }}-app-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with Maven (default versioning)" + description: "The Build pipeline for building {{ $framework }} application with Maven (default versioning)" workspaces: - name: shared-workspace @@ -39,7 +32,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -50,11 +43,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: TICKET_NAME_PATTERN @@ -130,3 +123,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/maven/bitbucket-build-edp.yaml b/charts/pipelines-library/templates/pipelines/java/maven/bitbucket-build-edp.yaml index 9d3dd034..ac8533bd 100644 --- a/charts/pipelines-library/templates/pipelines/java/maven/bitbucket-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/java/maven/bitbucket-build-edp.yaml @@ -1,26 +1,19 @@ {{ if has "bitbucket" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-maven-{{ $k }}-app-build-edp + name: bitbucket-maven-{{ $framework }}-app-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with Maven (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} application with Maven (EDP versioning)" workspaces: - name: shared-workspace @@ -39,7 +32,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -50,11 +43,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: TICKET_NAME_PATTERN @@ -128,3 +121,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/maven/bitbucket-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/java/maven/bitbucket-build-lib-default.yaml index aef40e6c..7756c271 100644 --- a/charts/pipelines-library/templates/pipelines/java/maven/bitbucket-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/java/maven/bitbucket-build-lib-default.yaml @@ -1,26 +1,19 @@ {{ if has "bitbucket" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-maven-{{ $k }}-lib-build-default + name: bitbucket-maven-{{ $framework }}-lib-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library with Maven (default versioning)" + description: "The Build pipeline for building {{ $framework }} library with Maven (default versioning)" workspaces: - name: shared-workspace @@ -39,7 +32,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -50,11 +43,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: TICKET_NAME_PATTERN @@ -126,3 +119,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/maven/bitbucket-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/java/maven/bitbucket-build-lib-edp.yaml index 09a2daf3..18de21fb 100644 --- a/charts/pipelines-library/templates/pipelines/java/maven/bitbucket-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/java/maven/bitbucket-build-lib-edp.yaml @@ -1,26 +1,19 @@ {{ if has "bitbucket" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-maven-{{ $k }}-lib-build-edp + name: bitbucket-maven-{{ $framework }}-lib-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library with Maven (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} library with Maven (EDP versioning)" workspaces: - name: shared-workspace @@ -39,7 +32,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -50,11 +43,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: TICKET_NAME_PATTERN @@ -124,3 +117,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/maven/bitbucket-review-lib.yaml b/charts/pipelines-library/templates/pipelines/java/maven/bitbucket-review-lib.yaml index 694fd2c1..6c6ca61b 100644 --- a/charts/pipelines-library/templates/pipelines/java/maven/bitbucket-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/java/maven/bitbucket-review-lib.yaml @@ -1,26 +1,19 @@ {{ if has "bitbucket" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-maven-{{ $k }}-lib-review + name: bitbucket-maven-{{ $framework }}-lib-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} library with Maven" + description: "The Review pipeline for building {{ $framework }} library with Maven" workspaces: - name: shared-workspace @@ -47,18 +40,18 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: gitfullrepositoryname @@ -80,3 +73,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/maven/bitbucket-review.yaml b/charts/pipelines-library/templates/pipelines/java/maven/bitbucket-review.yaml index 87adf51c..92480be9 100644 --- a/charts/pipelines-library/templates/pipelines/java/maven/bitbucket-review.yaml +++ b/charts/pipelines-library/templates/pipelines/java/maven/bitbucket-review.yaml @@ -1,26 +1,19 @@ {{ if has "bitbucket" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-maven-{{ $k }}-app-review + name: bitbucket-maven-{{ $framework }}-app-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} application with Maven" + description: "The Review pipeline for building {{ $framework }} application with Maven" workspaces: - name: shared-workspace @@ -50,18 +43,18 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: CHART_DIR @@ -118,3 +111,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/maven/gerrit-build-default.yaml b/charts/pipelines-library/templates/pipelines/java/maven/gerrit-build-default.yaml index 83a6d511..27c4c83e 100644 --- a/charts/pipelines-library/templates/pipelines/java/maven/gerrit-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/java/maven/gerrit-build-default.yaml @@ -1,26 +1,19 @@ {{ if has "gerrit" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-maven-{{ $k }}-app-build-default + name: gerrit-maven-{{ $framework }}-app-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with Maven (default versioning)" + description: "The Build pipeline for building {{ $framework }} application with Maven (default versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -37,18 +30,18 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: changeNumber @@ -127,3 +120,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/maven/gerrit-build-edp.yaml b/charts/pipelines-library/templates/pipelines/java/maven/gerrit-build-edp.yaml index 2af4e823..85ae4511 100644 --- a/charts/pipelines-library/templates/pipelines/java/maven/gerrit-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/java/maven/gerrit-build-edp.yaml @@ -1,26 +1,19 @@ {{ if has "gerrit" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-maven-{{ $k }}-app-build-edp + name: gerrit-maven-{{ $framework }}-app-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with Maven (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} application with Maven (EDP versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -37,18 +30,18 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: changeNumber @@ -126,3 +119,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/maven/gerrit-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/java/maven/gerrit-build-lib-default.yaml index 39cbda54..5c6823f5 100644 --- a/charts/pipelines-library/templates/pipelines/java/maven/gerrit-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/java/maven/gerrit-build-lib-default.yaml @@ -1,26 +1,19 @@ {{ if has "gerrit" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-maven-{{ $k }}-lib-build-default + name: gerrit-maven-{{ $framework }}-lib-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library with Maven (default versioning)" + description: "The Build pipeline for building {{ $framework }} library with Maven (default versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -37,18 +30,18 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: changeNumber @@ -124,3 +117,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/maven/gerrit-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/java/maven/gerrit-build-lib-edp.yaml index 3d1b81f2..ddb49ed3 100644 --- a/charts/pipelines-library/templates/pipelines/java/maven/gerrit-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/java/maven/gerrit-build-lib-edp.yaml @@ -1,26 +1,19 @@ {{ if has "gerrit" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-maven-{{ $k }}-lib-build-edp + name: gerrit-maven-{{ $framework }}-lib-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library with Maven (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} library with Maven (EDP versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -37,18 +30,18 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: changeNumber @@ -122,3 +115,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/maven/gerrit-review-lib.yaml b/charts/pipelines-library/templates/pipelines/java/maven/gerrit-review-lib.yaml index 2f9adc0c..842aa729 100644 --- a/charts/pipelines-library/templates/pipelines/java/maven/gerrit-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/java/maven/gerrit-review-lib.yaml @@ -1,26 +1,19 @@ {{ if has "gerrit" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-maven-{{ $k }}-lib-review + name: gerrit-maven-{{ $framework }}-lib-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} library with Maven" + description: "The Review pipeline for building {{ $framework }} library with Maven" workspaces: - name: shared-workspace - name: ssh-creds @@ -41,15 +34,15 @@ spec: default: "" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: targetBranch @@ -73,3 +66,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/maven/gerrit-review.yaml b/charts/pipelines-library/templates/pipelines/java/maven/gerrit-review.yaml index 46ea902e..e58c3f59 100644 --- a/charts/pipelines-library/templates/pipelines/java/maven/gerrit-review.yaml +++ b/charts/pipelines-library/templates/pipelines/java/maven/gerrit-review.yaml @@ -1,26 +1,19 @@ {{ if has "gerrit" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-maven-{{ $k }}-app-review + name: gerrit-maven-{{ $framework }}-app-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} application with Maven" + description: "The Review pipeline for building {{ $framework }} application with Maven" workspaces: - name: shared-workspace - name: ssh-creds @@ -41,15 +34,15 @@ spec: default: "" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: targetBranch @@ -112,3 +105,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/maven/github-build-default.yaml b/charts/pipelines-library/templates/pipelines/java/maven/github-build-default.yaml index 3bdda560..298b9ea4 100644 --- a/charts/pipelines-library/templates/pipelines/java/maven/github-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/java/maven/github-build-default.yaml @@ -1,26 +1,19 @@ {{ if has "github" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-maven-{{ $k }}-app-build-default + name: github-maven-{{ $framework }}-app-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with Maven (default versioning)" + description: "The Build pipeline for building {{ $framework }} application with Maven (default versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -37,7 +30,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -48,11 +41,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: TICKET_NAME_PATTERN @@ -128,3 +121,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/maven/github-build-edp.yaml b/charts/pipelines-library/templates/pipelines/java/maven/github-build-edp.yaml index 00409b7b..75925ac0 100644 --- a/charts/pipelines-library/templates/pipelines/java/maven/github-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/java/maven/github-build-edp.yaml @@ -1,26 +1,19 @@ {{ if has "github" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-maven-{{ $k }}-app-build-edp + name: github-maven-{{ $framework }}-app-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with Maven (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} application with Maven (EDP versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -37,7 +30,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -48,11 +41,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: TICKET_NAME_PATTERN @@ -126,3 +119,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/maven/github-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/java/maven/github-build-lib-default.yaml index b2ee8532..01b16734 100644 --- a/charts/pipelines-library/templates/pipelines/java/maven/github-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/java/maven/github-build-lib-default.yaml @@ -1,26 +1,19 @@ {{ if has "github" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-maven-{{ $k }}-lib-build-default + name: github-maven-{{ $framework }}-lib-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library with Maven (default versioning)" + description: "The Build pipeline for building {{ $framework }} library with Maven (default versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -37,7 +30,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -48,11 +41,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: TICKET_NAME_PATTERN @@ -124,3 +117,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/maven/github-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/java/maven/github-build-lib-edp.yaml index f2805732..c83b6d7b 100644 --- a/charts/pipelines-library/templates/pipelines/java/maven/github-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/java/maven/github-build-lib-edp.yaml @@ -1,26 +1,19 @@ {{ if has "github" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-maven-{{ $k }}-lib-build-edp + name: github-maven-{{ $framework }}-lib-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library with Maven (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} library with Maven (EDP versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -37,7 +30,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -48,11 +41,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: TICKET_NAME_PATTERN @@ -122,3 +115,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/maven/github-review-lib.yaml b/charts/pipelines-library/templates/pipelines/java/maven/github-review-lib.yaml index f0660952..443f4c0a 100644 --- a/charts/pipelines-library/templates/pipelines/java/maven/github-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/java/maven/github-review-lib.yaml @@ -1,26 +1,19 @@ {{ if has "github" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-maven-{{ $k }}-lib-review + name: github-maven-{{ $framework }}-lib-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} library with Maven" + description: "The Review pipeline for building {{ $framework }} library with Maven" workspaces: - name: shared-workspace - name: ssh-creds @@ -45,18 +38,18 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: gitfullrepositoryname @@ -80,3 +73,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/maven/github-review.yaml b/charts/pipelines-library/templates/pipelines/java/maven/github-review.yaml index cb6a6caf..85bcc77e 100644 --- a/charts/pipelines-library/templates/pipelines/java/maven/github-review.yaml +++ b/charts/pipelines-library/templates/pipelines/java/maven/github-review.yaml @@ -1,26 +1,19 @@ {{ if has "github" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-maven-{{ $k }}-app-review + name: github-maven-{{ $framework }}-app-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} application with Maven" + description: "The Review pipeline for building {{ $framework }} application with Maven" workspaces: - name: shared-workspace - name: ssh-creds @@ -45,18 +38,18 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: gitfullrepositoryname @@ -119,3 +112,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/maven/gitlab-build-default.yaml b/charts/pipelines-library/templates/pipelines/java/maven/gitlab-build-default.yaml index 91590022..ca7afc0f 100644 --- a/charts/pipelines-library/templates/pipelines/java/maven/gitlab-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/java/maven/gitlab-build-default.yaml @@ -1,26 +1,19 @@ {{ if has "gitlab" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-maven-{{ $k }}-app-build-default + name: gitlab-maven-{{ $framework }}-app-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with Maven (default versioning)" + description: "The Build pipeline for building {{ $framework }} application with Maven (default versioning)" workspaces: - name: shared-workspace @@ -39,7 +32,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -50,11 +43,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: TICKET_NAME_PATTERN @@ -130,3 +123,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/maven/gitlab-build-edp.yaml b/charts/pipelines-library/templates/pipelines/java/maven/gitlab-build-edp.yaml index e0ef2a1b..11d391f4 100644 --- a/charts/pipelines-library/templates/pipelines/java/maven/gitlab-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/java/maven/gitlab-build-edp.yaml @@ -1,26 +1,19 @@ {{ if has "gitlab" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-maven-{{ $k }}-app-build-edp + name: gitlab-maven-{{ $framework }}-app-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with Maven (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} application with Maven (EDP versioning)" workspaces: - name: shared-workspace @@ -39,7 +32,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -50,11 +43,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: TICKET_NAME_PATTERN @@ -128,3 +121,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/maven/gitlab-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/java/maven/gitlab-build-lib-default.yaml index 879fecb6..b5bfa14c 100644 --- a/charts/pipelines-library/templates/pipelines/java/maven/gitlab-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/java/maven/gitlab-build-lib-default.yaml @@ -1,26 +1,19 @@ {{ if has "gitlab" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-maven-{{ $k }}-lib-build-default + name: gitlab-maven-{{ $framework }}-lib-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library with Maven (default versioning)" + description: "The Build pipeline for building {{ $framework }} library with Maven (default versioning)" workspaces: - name: shared-workspace @@ -39,7 +32,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -50,11 +43,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: TICKET_NAME_PATTERN @@ -126,3 +119,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/maven/gitlab-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/java/maven/gitlab-build-lib-edp.yaml index 1bcffb6a..1288ae11 100644 --- a/charts/pipelines-library/templates/pipelines/java/maven/gitlab-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/java/maven/gitlab-build-lib-edp.yaml @@ -1,26 +1,19 @@ {{ if has "gitlab" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-maven-{{ $k }}-lib-build-edp + name: gitlab-maven-{{ $framework }}-lib-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library with Maven (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} library with Maven (EDP versioning)" workspaces: - name: shared-workspace @@ -39,7 +32,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -50,11 +43,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: TICKET_NAME_PATTERN @@ -124,3 +117,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/maven/gitlab-review-lib.yaml b/charts/pipelines-library/templates/pipelines/java/maven/gitlab-review-lib.yaml index b57aa41f..e248319e 100644 --- a/charts/pipelines-library/templates/pipelines/java/maven/gitlab-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/java/maven/gitlab-review-lib.yaml @@ -1,26 +1,19 @@ {{ if has "gitlab" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-maven-{{ $k }}-lib-review + name: gitlab-maven-{{ $framework }}-lib-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} library with Maven" + description: "The Review pipeline for building {{ $framework }} library with Maven" workspaces: - name: shared-workspace @@ -47,18 +40,18 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: gitfullrepositoryname @@ -80,3 +73,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/java/maven/gitlab-review.yaml b/charts/pipelines-library/templates/pipelines/java/maven/gitlab-review.yaml index 785c4a59..9bd04e1b 100644 --- a/charts/pipelines-library/templates/pipelines/java/maven/gitlab-review.yaml +++ b/charts/pipelines-library/templates/pipelines/java/maven/gitlab-review.yaml @@ -1,26 +1,19 @@ {{ if has "gitlab" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-maven-{{ $k }}-app-review + name: gitlab-maven-{{ $framework }}-app-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} application with Maven" + description: "The Review pipeline for building {{ $framework }} application with Maven" workspaces: - name: shared-workspace @@ -50,18 +43,18 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: CHART_DIR @@ -118,3 +111,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/js/npm/antora/bitbucket-build-default.yaml b/charts/pipelines-library/templates/pipelines/js/npm/antora/bitbucket-build-default.yaml index df386bfa..bb061650 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/antora/bitbucket-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/antora/bitbucket-build-default.yaml @@ -1,16 +1,14 @@ {{ if has "bitbucket" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict "antora" (printf "%s/%s" $registry "antora/antora:3.1.4") -}} -{{- range $k, $v := $resourceMapping }} +{{ if .Values.pipelines.deployableResources.js.antora }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-npm-{{ $k }}-app-build-default + name: bitbucket-npm-antora-app-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with NPM (default versioning)" + description: "The Build pipeline for building antora application with NPM (default versioning)" workspaces: - name: shared-workspace @@ -21,7 +19,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-antora" description: git url to clone type: string - name: git-source-revision @@ -29,7 +27,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: 'antora-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -40,7 +38,7 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ include "edp-tekton.registry" . }}/antora/antora:3.1.4' description: "npm image version" type: string - name: TICKET_NAME_PATTERN diff --git a/charts/pipelines-library/templates/pipelines/js/npm/antora/bitbucket-build-edp.yaml b/charts/pipelines-library/templates/pipelines/js/npm/antora/bitbucket-build-edp.yaml index 2d63b05c..192fe53f 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/antora/bitbucket-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/antora/bitbucket-build-edp.yaml @@ -1,16 +1,14 @@ {{ if has "bitbucket" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict "antora" (printf "%s/%s" $registry "antora/antora:3.1.4") -}} -{{- range $k, $v := $resourceMapping }} +{{ if .Values.pipelines.deployableResources.js.antora }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-npm-{{ $k }}-app-build-edp + name: bitbucket-npm-antora-app-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with NPM (EDP versioning)" + description: "The Build pipeline for building antora application with NPM (EDP versioning)" workspaces: - name: shared-workspace @@ -21,7 +19,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-antora" description: git url to clone type: string - name: git-source-revision @@ -29,7 +27,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: 'antora-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -40,7 +38,7 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ include "edp-tekton.registry" . }}/antora/antora:3.1.4' description: "npm image version" type: string - name: TICKET_NAME_PATTERN diff --git a/charts/pipelines-library/templates/pipelines/js/npm/antora/bitbucket-review.yaml b/charts/pipelines-library/templates/pipelines/js/npm/antora/bitbucket-review.yaml index 5c9fcaae..2887d48a 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/antora/bitbucket-review.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/antora/bitbucket-review.yaml @@ -1,16 +1,14 @@ {{ if has "bitbucket" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict "antora" (printf "%s/%s" $registry "antora/antora:3.1.4") -}} -{{- range $k, $v := $resourceMapping }} +{{ if .Values.pipelines.deployableResources.js.antora }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-npm-{{ $k }}-app-review + name: bitbucket-npm-antora-app-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} application with NPM" + description: "The Review pipeline for building antora application with NPM" workspaces: - name: shared-workspace @@ -21,7 +19,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-antora" description: git url to clone type: string - name: git-source-revision @@ -33,7 +31,7 @@ spec: default: "" type: string - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: 'antora-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -44,7 +42,7 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ include "edp-tekton.registry" . }}/antora/antora:3.1.4' description: "npm image version" type: string - name: gitfullrepositoryname diff --git a/charts/pipelines-library/templates/pipelines/js/npm/antora/gerrit-build-default.yaml b/charts/pipelines-library/templates/pipelines/js/npm/antora/gerrit-build-default.yaml index 53e235a8..20d4bada 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/antora/gerrit-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/antora/gerrit-build-default.yaml @@ -1,16 +1,14 @@ {{ if has "gerrit" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict "antora" (printf "%s/%s" $registry "antora/antora:3.1.4") -}} -{{- range $k, $v := $resourceMapping }} +{{ if .Values.pipelines.deployableResources.js.antora }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-npm-{{ $k }}-app-build-default + name: gerrit-npm-antora-app-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with NPM (default versioning)" + description: "The Build pipeline for building antora application with NPM (default versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -19,7 +17,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-antora" description: git url to clone type: string - name: git-source-revision @@ -27,14 +25,14 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: 'antora-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ include "edp-tekton.registry" . }}/antora/antora:3.1.4' description: "npm image version" type: string - name: changeNumber diff --git a/charts/pipelines-library/templates/pipelines/js/npm/antora/gerrit-build-edp.yaml b/charts/pipelines-library/templates/pipelines/js/npm/antora/gerrit-build-edp.yaml index 903dad12..a30ee152 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/antora/gerrit-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/antora/gerrit-build-edp.yaml @@ -1,16 +1,14 @@ {{ if has "gerrit" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict "antora" (printf "%s/%s" $registry "antora/antora:3.1.4") -}} -{{- range $k, $v := $resourceMapping }} +{{ if .Values.pipelines.deployableResources.js.antora }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-npm-{{ $k }}-app-build-edp + name: gerrit-npm-antora-app-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with NPM (EDP versioning)" + description: "The Build pipeline for building antora application with NPM (EDP versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -19,7 +17,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-antora" description: git url to clone type: string - name: git-source-revision @@ -27,14 +25,14 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: 'antora-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ include "edp-tekton.registry" . }}/antora/antora:3.1.4' description: "npm image version" type: string - name: changeNumber diff --git a/charts/pipelines-library/templates/pipelines/js/npm/antora/gerrit-review.yaml b/charts/pipelines-library/templates/pipelines/js/npm/antora/gerrit-review.yaml index 217d347b..c9fc4d4e 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/antora/gerrit-review.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/antora/gerrit-review.yaml @@ -1,17 +1,16 @@ {{ if has "gerrit" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict "antora" (printf "%s/%s" $registry "antora/antora:3.1.4") -}} -{{- range $k, $v := $resourceMapping }} +{{ if .Values.pipelines.deployableResources.js.antora }} {{- $gerritSSHPort := $.Values.global.gerritSSHPort -}} + apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-npm-{{ $k }}-app-review + name: gerrit-npm-antora-app-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} application with NPM" + description: "The Review pipeline for building antora application with NPM" workspaces: - name: shared-workspace - name: ssh-creds @@ -20,7 +19,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-antora" description: git url to clone type: string - name: git-source-revision @@ -32,11 +31,11 @@ spec: default: "" type: string - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: 'antora-npm-edp-version' description: "Project name" type: string - name: image - default: '{{ $v }}' + default: '{{ include "edp-tekton.registry" . }}/antora/antora:3.1.4' description: "npm image version" type: string - name: targetBranch diff --git a/charts/pipelines-library/templates/pipelines/js/npm/antora/github-build-default.yaml b/charts/pipelines-library/templates/pipelines/js/npm/antora/github-build-default.yaml index 756439fa..2f3e5414 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/antora/github-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/antora/github-build-default.yaml @@ -1,16 +1,14 @@ {{ if has "github" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict "antora" (printf "%s/%s" $registry "antora/antora:3.1.4") -}} -{{- range $k, $v := $resourceMapping }} +{{ if .Values.pipelines.deployableResources.js.antora }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-npm-{{ $k }}-app-build-default + name: github-npm-antora-app-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with NPM (default versioning)" + description: "The Build pipeline for building antora application with NPM (default versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -19,7 +17,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-antora" description: git url to clone type: string - name: git-source-revision @@ -27,7 +25,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: 'antora-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -38,7 +36,7 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ include "edp-tekton.registry" . }}/antora/antora:3.1.4' description: "npm image version" type: string - name: TICKET_NAME_PATTERN diff --git a/charts/pipelines-library/templates/pipelines/js/npm/antora/github-build-edp.yaml b/charts/pipelines-library/templates/pipelines/js/npm/antora/github-build-edp.yaml index 53788285..15b793fc 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/antora/github-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/antora/github-build-edp.yaml @@ -1,16 +1,14 @@ {{ if has "github" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict "antora" (printf "%s/%s" $registry "antora/antora:3.1.4") -}} -{{- range $k, $v := $resourceMapping }} +{{ if .Values.pipelines.deployableResources.js.antora }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-npm-{{ $k }}-app-build-edp + name: github-npm-antora-app-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with NPM (EDP versioning)" + description: "The Build pipeline for building antora application with NPM (EDP versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -19,7 +17,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-antora" description: git url to clone type: string - name: git-source-revision @@ -27,7 +25,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: 'antora-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -38,7 +36,7 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ include "edp-tekton.registry" . }}/antora/antora:3.1.4' description: "npm image version" type: string - name: TICKET_NAME_PATTERN diff --git a/charts/pipelines-library/templates/pipelines/js/npm/antora/github-review.yaml b/charts/pipelines-library/templates/pipelines/js/npm/antora/github-review.yaml index 551a8d95..5148621c 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/antora/github-review.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/antora/github-review.yaml @@ -1,16 +1,14 @@ {{ if has "github" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict "antora" (printf "%s/%s" $registry "antora/antora:3.1.4") -}} -{{- range $k, $v := $resourceMapping }} +{{ if .Values.pipelines.deployableResources.js.antora }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-npm-{{ $k }}-app-review + name: github-npm-antora-app-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} application with NPM" + description: "The Review pipeline for building antora application with NPM" workspaces: - name: shared-workspace - name: ssh-creds @@ -19,7 +17,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-antora" description: git url to clone type: string - name: git-source-revision @@ -31,7 +29,7 @@ spec: default: "" type: string - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: 'antora-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -42,7 +40,7 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ include "edp-tekton.registry" . }}/antora/antora:3.1.4' description: "npm image version" type: string - name: gitfullrepositoryname diff --git a/charts/pipelines-library/templates/pipelines/js/npm/antora/gitlab-build-default.yaml b/charts/pipelines-library/templates/pipelines/js/npm/antora/gitlab-build-default.yaml index 00702e0f..78aed7cf 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/antora/gitlab-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/antora/gitlab-build-default.yaml @@ -1,16 +1,14 @@ {{ if has "gitlab" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict "antora" (printf "%s/%s" $registry "antora/antora:3.1.4") -}} -{{- range $k, $v := $resourceMapping }} +{{ if .Values.pipelines.deployableResources.js.antora }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-npm-{{ $k }}-app-build-default + name: gitlab-npm-antora-app-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with NPM (default versioning)" + description: "The Build pipeline for building antora application with NPM (default versioning)" workspaces: - name: shared-workspace @@ -21,7 +19,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-antora" description: git url to clone type: string - name: git-source-revision @@ -29,7 +27,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: 'antora-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -40,7 +38,7 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ include "edp-tekton.registry" . }}/antora/antora:3.1.4' description: "npm image version" type: string - name: TICKET_NAME_PATTERN diff --git a/charts/pipelines-library/templates/pipelines/js/npm/antora/gitlab-build-edp.yaml b/charts/pipelines-library/templates/pipelines/js/npm/antora/gitlab-build-edp.yaml index 82dbd353..14a07018 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/antora/gitlab-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/antora/gitlab-build-edp.yaml @@ -1,16 +1,14 @@ {{ if has "gitlab" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict "antora" (printf "%s/%s" $registry "antora/antora:3.1.4") -}} -{{- range $k, $v := $resourceMapping }} +{{ if .Values.pipelines.deployableResources.js.antora }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-npm-{{ $k }}-app-build-edp + name: gitlab-npm-antora-app-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with NPM (EDP versioning)" + description: "The Build pipeline for building antora application with NPM (EDP versioning)" workspaces: - name: shared-workspace @@ -21,7 +19,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-antora" description: git url to clone type: string - name: git-source-revision @@ -29,7 +27,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: 'antora-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -40,7 +38,7 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ include "edp-tekton.registry" . }}/antora/antora:3.1.4' description: "npm image version" type: string - name: TICKET_NAME_PATTERN diff --git a/charts/pipelines-library/templates/pipelines/js/npm/antora/gitlab-review.yaml b/charts/pipelines-library/templates/pipelines/js/npm/antora/gitlab-review.yaml index 85d4e6d7..f56173e4 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/antora/gitlab-review.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/antora/gitlab-review.yaml @@ -1,16 +1,14 @@ {{ if has "gitlab" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict "antora" (printf "%s/%s" $registry "antora/antora:3.1.4") -}} -{{- range $k, $v := $resourceMapping }} +{{ if .Values.pipelines.deployableResources.js.antora }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-npm-{{ $k }}-app-review + name: gitlab-npm-antora-app-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} application with NPM" + description: "The Review pipeline for building antora application with NPM" workspaces: - name: shared-workspace @@ -21,7 +19,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-antora" description: git url to clone type: string - name: git-source-revision @@ -33,7 +31,7 @@ spec: default: "" type: string - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: 'antora-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -44,7 +42,7 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ include "edp-tekton.registry" . }}/antora/antora:3.1.4' description: "npm image version" type: string - name: gitfullrepositoryname diff --git a/charts/pipelines-library/templates/pipelines/js/npm/bitbucket-build-default.yaml b/charts/pipelines-library/templates/pipelines/js/npm/bitbucket-build-default.yaml index 2b35e069..9f435c05 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/bitbucket-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/bitbucket-build-default.yaml @@ -1,16 +1,18 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.js.angular ) ( .Values.pipelines.deployableResources.js.express ) ( .Values.pipelines.deployableResources.js.next ) ( .Values.pipelines.deployableResources.js.react ) ( .Values.pipelines.deployableResources.js.vue )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "react" "angular" "vue" "express" "next" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.js" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-npm-{{ $k }}-app-build-default + name: bitbucket-npm-{{ $framework }}-app-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with NPM (default versioning)" + description: "The Build pipeline for building {{ $framework }} application with NPM (default versioning)" workspaces: - name: shared-workspace @@ -21,7 +23,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -29,7 +31,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: '{{ $framework }}-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -110,3 +112,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/js/npm/bitbucket-build-edp.yaml b/charts/pipelines-library/templates/pipelines/js/npm/bitbucket-build-edp.yaml index f27ea12a..0457574f 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/bitbucket-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/bitbucket-build-edp.yaml @@ -1,16 +1,18 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.js.angular ) ( .Values.pipelines.deployableResources.js.express ) ( .Values.pipelines.deployableResources.js.next ) ( .Values.pipelines.deployableResources.js.react ) ( .Values.pipelines.deployableResources.js.vue )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "react" "angular" "vue" "express" "next" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.js" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-npm-{{ $k }}-app-build-edp + name: bitbucket-npm-{{ $framework }}-app-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with NPM (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} application with NPM (EDP versioning)" workspaces: - name: shared-workspace @@ -21,7 +23,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -29,7 +31,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: '{{ $framework }}-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -110,3 +112,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/js/npm/bitbucket-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/js/npm/bitbucket-build-lib-default.yaml index ef6da8bf..b2dfeb5d 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/bitbucket-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/bitbucket-build-lib-default.yaml @@ -1,16 +1,18 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.js.angular ) ( .Values.pipelines.deployableResources.js.express ) ( .Values.pipelines.deployableResources.js.next ) ( .Values.pipelines.deployableResources.js.react ) ( .Values.pipelines.deployableResources.js.vue )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "react" "angular" "vue" "express" "next" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.js" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-npm-{{ $k }}-lib-build-default + name: bitbucket-npm-{{ $framework }}-lib-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library with NPM (default versioning)" + description: "The Build pipeline for building {{ $framework }} library with NPM (default versioning)" workspaces: - name: shared-workspace @@ -21,7 +23,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -29,7 +31,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: '{{ $framework }}-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -108,3 +110,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/js/npm/bitbucket-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/js/npm/bitbucket-build-lib-edp.yaml index be2059f2..2f8af06e 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/bitbucket-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/bitbucket-build-lib-edp.yaml @@ -1,16 +1,18 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.js.angular ) ( .Values.pipelines.deployableResources.js.express ) ( .Values.pipelines.deployableResources.js.next ) ( .Values.pipelines.deployableResources.js.react ) ( .Values.pipelines.deployableResources.js.vue )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "react" "angular" "vue" "express" "next" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.js" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-npm-{{ $k }}-lib-build-edp + name: bitbucket-npm-{{ $framework }}-lib-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library with NPM (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} library with NPM (EDP versioning)" workspaces: - name: shared-workspace @@ -21,7 +23,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -29,7 +31,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: '{{ $framework }}-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -108,3 +110,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/js/npm/bitbucket-review-lib.yaml b/charts/pipelines-library/templates/pipelines/js/npm/bitbucket-review-lib.yaml index fb526402..a59fcb50 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/bitbucket-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/bitbucket-review-lib.yaml @@ -1,16 +1,18 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.js.angular ) ( .Values.pipelines.deployableResources.js.express ) ( .Values.pipelines.deployableResources.js.next ) ( .Values.pipelines.deployableResources.js.react ) ( .Values.pipelines.deployableResources.js.vue )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "react" "angular" "vue" "express" "next" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.js" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-npm-{{ $k }}-lib-review + name: bitbucket-npm-{{ $framework }}-lib-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} library with NPM" + description: "The Review pipeline for building {{ $framework }} library with NPM" workspaces: - name: shared-workspace @@ -21,7 +23,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -37,7 +39,7 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: '{{ $framework }}-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -99,3 +101,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/js/npm/bitbucket-review.yaml b/charts/pipelines-library/templates/pipelines/js/npm/bitbucket-review.yaml index 249d7411..60ab8264 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/bitbucket-review.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/bitbucket-review.yaml @@ -1,16 +1,18 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.js.angular ) ( .Values.pipelines.deployableResources.js.express ) ( .Values.pipelines.deployableResources.js.next ) ( .Values.pipelines.deployableResources.js.react ) ( .Values.pipelines.deployableResources.js.vue )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "react" "angular" "vue" "express" "next" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.js" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-npm-{{ $k }}-app-review + name: bitbucket-npm-{{ $framework }}-app-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} application with NPM" + description: "The Review pipeline for building {{ $framework }} application with NPM" workspaces: - name: shared-workspace @@ -21,7 +23,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -37,7 +39,7 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: '{{ $framework }}-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -136,3 +138,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/js/npm/gerrit-build-default.yaml b/charts/pipelines-library/templates/pipelines/js/npm/gerrit-build-default.yaml index b88398bc..ae14e95d 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/gerrit-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/gerrit-build-default.yaml @@ -1,16 +1,18 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.js.angular ) ( .Values.pipelines.deployableResources.js.express ) ( .Values.pipelines.deployableResources.js.next ) ( .Values.pipelines.deployableResources.js.react ) ( .Values.pipelines.deployableResources.js.vue )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "react" "angular" "vue" "express" "next" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.js" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-npm-{{ $k }}-app-build-default + name: gerrit-npm-{{ $framework }}-app-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with NPM (default versioning)" + description: "The Build pipeline for building {{ $framework }} application with NPM (default versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -19,7 +21,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -27,7 +29,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: '{{ $framework }}-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -108,3 +110,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/js/npm/gerrit-build-edp.yaml b/charts/pipelines-library/templates/pipelines/js/npm/gerrit-build-edp.yaml index 2be69e37..d1a3add7 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/gerrit-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/gerrit-build-edp.yaml @@ -1,16 +1,18 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.js.angular ) ( .Values.pipelines.deployableResources.js.express ) ( .Values.pipelines.deployableResources.js.next ) ( .Values.pipelines.deployableResources.js.react ) ( .Values.pipelines.deployableResources.js.vue )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "react" "angular" "vue" "express" "next" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.js" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-npm-{{ $k }}-app-build-edp + name: gerrit-npm-{{ $framework }}-app-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with NPM (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} application with NPM (EDP versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -19,7 +21,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -27,7 +29,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: '{{ $framework }}-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -108,3 +110,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/js/npm/gerrit-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/js/npm/gerrit-build-lib-default.yaml index 5439e2ad..6ad855de 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/gerrit-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/gerrit-build-lib-default.yaml @@ -1,16 +1,18 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.js.angular ) ( .Values.pipelines.deployableResources.js.express ) ( .Values.pipelines.deployableResources.js.next ) ( .Values.pipelines.deployableResources.js.react ) ( .Values.pipelines.deployableResources.js.vue )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "react" "angular" "vue" "express" "next" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.js" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-npm-{{ $k }}-lib-build-default + name: gerrit-npm-{{ $framework }}-lib-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library with NPM (default versioning)" + description: "The Build pipeline for building {{ $framework }} library with NPM (default versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -19,7 +21,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -27,7 +29,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: '{{ $framework }}-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -106,3 +108,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/js/npm/gerrit-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/js/npm/gerrit-build-lib-edp.yaml index f4c0dad8..0d389751 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/gerrit-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/gerrit-build-lib-edp.yaml @@ -1,16 +1,18 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.js.angular ) ( .Values.pipelines.deployableResources.js.express ) ( .Values.pipelines.deployableResources.js.next ) ( .Values.pipelines.deployableResources.js.react ) ( .Values.pipelines.deployableResources.js.vue )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "react" "angular" "vue" "express" "next" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.js" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-npm-{{ $k }}-lib-build-edp + name: gerrit-npm-{{ $framework }}-lib-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library with NPM (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} library with NPM (EDP versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -19,7 +21,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -27,7 +29,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: '{{ $framework }}-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -106,3 +108,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/js/npm/gerrit-review-lib.yaml b/charts/pipelines-library/templates/pipelines/js/npm/gerrit-review-lib.yaml index 2afac2ee..4b66d9f5 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/gerrit-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/gerrit-review-lib.yaml @@ -1,16 +1,18 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.js.angular ) ( .Values.pipelines.deployableResources.js.express ) ( .Values.pipelines.deployableResources.js.next ) ( .Values.pipelines.deployableResources.js.react ) ( .Values.pipelines.deployableResources.js.vue )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "react" "angular" "vue" "express" "next" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.js" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-npm-{{ $k }}-lib-review + name: gerrit-npm-{{ $framework }}-lib-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} library with NPM" + description: "The Review pipeline for building {{ $framework }} library with NPM" workspaces: - name: shared-workspace - name: ssh-creds @@ -19,7 +21,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -31,7 +33,7 @@ spec: default: "" type: string - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: '{{ $framework }}-npm-edp-version' description: "Project name" type: string - name: image @@ -59,3 +61,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/js/npm/gerrit-review.yaml b/charts/pipelines-library/templates/pipelines/js/npm/gerrit-review.yaml index a613e303..6e4c5e1a 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/gerrit-review.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/gerrit-review.yaml @@ -1,16 +1,18 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.js.angular ) ( .Values.pipelines.deployableResources.js.express ) ( .Values.pipelines.deployableResources.js.next ) ( .Values.pipelines.deployableResources.js.react ) ( .Values.pipelines.deployableResources.js.vue )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "react" "angular" "vue" "express" "next" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.js" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-npm-{{ $k }}-app-review + name: gerrit-npm-{{ $framework }}-app-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} application with NPM" + description: "The Review pipeline for building {{ $framework }} application with NPM" workspaces: - name: shared-workspace - name: ssh-creds @@ -19,7 +21,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -31,7 +33,7 @@ spec: default: "" type: string - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: '{{ $framework }}-npm-edp-version' description: "Project name" type: string - name: image @@ -96,3 +98,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/js/npm/github-build-default.yaml b/charts/pipelines-library/templates/pipelines/js/npm/github-build-default.yaml index 8e126c9c..26694816 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/github-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/github-build-default.yaml @@ -1,16 +1,18 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.js.angular ) ( .Values.pipelines.deployableResources.js.express ) ( .Values.pipelines.deployableResources.js.next ) ( .Values.pipelines.deployableResources.js.react ) ( .Values.pipelines.deployableResources.js.vue )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "react" "angular" "vue" "express" "next" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.js" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-npm-{{ $k }}-app-build-default + name: github-npm-{{ $framework }}-app-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with NPM (default versioning)" + description: "The Build pipeline for building {{ $framework }} application with NPM (default versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -19,7 +21,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -27,7 +29,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: '{{ $framework }}-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -108,3 +110,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/js/npm/github-build-edp.yaml b/charts/pipelines-library/templates/pipelines/js/npm/github-build-edp.yaml index 9f03d443..f971bc3a 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/github-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/github-build-edp.yaml @@ -1,16 +1,18 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.js.angular ) ( .Values.pipelines.deployableResources.js.express ) ( .Values.pipelines.deployableResources.js.next ) ( .Values.pipelines.deployableResources.js.react ) ( .Values.pipelines.deployableResources.js.vue )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "react" "angular" "vue" "express" "next" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.js" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-npm-{{ $k }}-app-build-edp + name: github-npm-{{ $framework }}-app-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with NPM (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} application with NPM (EDP versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -19,7 +21,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -27,7 +29,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: '{{ $framework }}-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -108,3 +110,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/js/npm/github-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/js/npm/github-build-lib-default.yaml index 0ddb1a2f..48082ce6 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/github-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/github-build-lib-default.yaml @@ -1,16 +1,18 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.js.angular ) ( .Values.pipelines.deployableResources.js.express ) ( .Values.pipelines.deployableResources.js.next ) ( .Values.pipelines.deployableResources.js.react ) ( .Values.pipelines.deployableResources.js.vue )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "react" "angular" "vue" "express" "next" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.js" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-npm-{{ $k }}-lib-build-default + name: github-npm-{{ $framework }}-lib-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library with NPM (default versioning)" + description: "The Build pipeline for building {{ $framework }} library with NPM (default versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -19,7 +21,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -27,7 +29,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: '{{ $framework }}-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -106,3 +108,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/js/npm/github-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/js/npm/github-build-lib-edp.yaml index 88e9515c..aac728bd 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/github-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/github-build-lib-edp.yaml @@ -1,16 +1,18 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.js.angular ) ( .Values.pipelines.deployableResources.js.express ) ( .Values.pipelines.deployableResources.js.next ) ( .Values.pipelines.deployableResources.js.react ) ( .Values.pipelines.deployableResources.js.vue )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "react" "angular" "vue" "express" "next" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.js" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-npm-{{ $k }}-lib-build-edp + name: github-npm-{{ $framework }}-lib-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library with NPM (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} library with NPM (EDP versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -19,7 +21,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -27,7 +29,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: '{{ $framework }}-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -106,3 +108,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/js/npm/github-review-lib.yaml b/charts/pipelines-library/templates/pipelines/js/npm/github-review-lib.yaml index 6302861e..09b82410 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/github-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/github-review-lib.yaml @@ -1,16 +1,18 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.js.angular ) ( .Values.pipelines.deployableResources.js.express ) ( .Values.pipelines.deployableResources.js.next ) ( .Values.pipelines.deployableResources.js.react ) ( .Values.pipelines.deployableResources.js.vue )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "react" "angular" "vue" "express" "next" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.js" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-npm-{{ $k }}-lib-review + name: github-npm-{{ $framework }}-lib-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} library with NPM" + description: "The Review pipeline for building {{ $framework }} library with NPM" workspaces: - name: shared-workspace - name: ssh-creds @@ -19,7 +21,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -35,7 +37,7 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: '{{ $framework }}-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -100,3 +102,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/js/npm/github-review.yaml b/charts/pipelines-library/templates/pipelines/js/npm/github-review.yaml index 6129d1f3..064a95b2 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/github-review.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/github-review.yaml @@ -1,16 +1,18 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.js.angular ) ( .Values.pipelines.deployableResources.js.express ) ( .Values.pipelines.deployableResources.js.next ) ( .Values.pipelines.deployableResources.js.react ) ( .Values.pipelines.deployableResources.js.vue )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "react" "angular" "vue" "express" "next" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.js" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-npm-{{ $k }}-app-review + name: github-npm-{{ $framework }}-app-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} application with NPM" + description: "The Review pipeline for building {{ $framework }} application with NPM" workspaces: - name: shared-workspace - name: ssh-creds @@ -19,7 +21,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -35,7 +37,7 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: '{{ $framework }}-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -136,3 +138,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/js/npm/gitlab-build-default.yaml b/charts/pipelines-library/templates/pipelines/js/npm/gitlab-build-default.yaml index dfd2cee7..e68b42d5 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/gitlab-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/gitlab-build-default.yaml @@ -1,16 +1,18 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.js.angular ) ( .Values.pipelines.deployableResources.js.express ) ( .Values.pipelines.deployableResources.js.next ) ( .Values.pipelines.deployableResources.js.react ) ( .Values.pipelines.deployableResources.js.vue )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "react" "angular" "vue" "express" "next" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.js" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-npm-{{ $k }}-app-build-default + name: gitlab-npm-{{ $framework }}-app-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with NPM (default versioning)" + description: "The Build pipeline for building {{ $framework }} application with NPM (default versioning)" workspaces: - name: shared-workspace @@ -21,7 +23,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -29,7 +31,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: '{{ $framework }}-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -110,3 +112,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/js/npm/gitlab-build-edp.yaml b/charts/pipelines-library/templates/pipelines/js/npm/gitlab-build-edp.yaml index 513497de..ed986db8 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/gitlab-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/gitlab-build-edp.yaml @@ -1,16 +1,18 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.js.angular ) ( .Values.pipelines.deployableResources.js.express ) ( .Values.pipelines.deployableResources.js.next ) ( .Values.pipelines.deployableResources.js.react ) ( .Values.pipelines.deployableResources.js.vue )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "react" "angular" "vue" "express" "next" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.js" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-npm-{{ $k }}-app-build-edp + name: gitlab-npm-{{ $framework }}-app-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with NPM (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} application with NPM (EDP versioning)" workspaces: - name: shared-workspace @@ -21,7 +23,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -29,7 +31,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: '{{ $framework }}-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -110,3 +112,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/js/npm/gitlab-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/js/npm/gitlab-build-lib-default.yaml index a0c23caf..d78e8951 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/gitlab-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/gitlab-build-lib-default.yaml @@ -1,16 +1,18 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.js.angular ) ( .Values.pipelines.deployableResources.js.express ) ( .Values.pipelines.deployableResources.js.next ) ( .Values.pipelines.deployableResources.js.react ) ( .Values.pipelines.deployableResources.js.vue )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "react" "angular" "vue" "express" "next" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.js" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-npm-{{ $k }}-lib-build-default + name: gitlab-npm-{{ $framework }}-lib-build-default labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library with NPM (default versioning)" + description: "The Build pipeline for building {{ $framework }} library with NPM (default versioning)" workspaces: - name: shared-workspace @@ -21,7 +23,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -29,7 +31,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: '{{ $framework }}-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -108,3 +110,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/js/npm/gitlab-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/js/npm/gitlab-build-lib-edp.yaml index 1bddb7ad..228c6a8e 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/gitlab-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/gitlab-build-lib-edp.yaml @@ -1,16 +1,18 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.js.angular ) ( .Values.pipelines.deployableResources.js.express ) ( .Values.pipelines.deployableResources.js.next ) ( .Values.pipelines.deployableResources.js.react ) ( .Values.pipelines.deployableResources.js.vue )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "react" "angular" "vue" "express" "next" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.js" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-npm-{{ $k }}-lib-build-edp + name: gitlab-npm-{{ $framework }}-lib-build-edp labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} library with NPM (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} library with NPM (EDP versioning)" workspaces: - name: shared-workspace @@ -21,7 +23,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -29,7 +31,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: '{{ $framework }}-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -108,3 +110,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/js/npm/gitlab-review-lib.yaml b/charts/pipelines-library/templates/pipelines/js/npm/gitlab-review-lib.yaml index a4ef15e1..54653e97 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/gitlab-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/gitlab-review-lib.yaml @@ -1,16 +1,18 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.js.angular ) ( .Values.pipelines.deployableResources.js.express ) ( .Values.pipelines.deployableResources.js.next ) ( .Values.pipelines.deployableResources.js.react ) ( .Values.pipelines.deployableResources.js.vue )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "react" "angular" "vue" "express" "next" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.js" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-npm-{{ $k }}-lib-review + name: gitlab-npm-{{ $framework }}-lib-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} library with NPM" + description: "The Review pipeline for building {{ $framework }} library with NPM" workspaces: - name: shared-workspace @@ -21,7 +23,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -37,7 +39,7 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: '{{ $framework }}-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -99,3 +101,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/js/npm/gitlab-review.yaml b/charts/pipelines-library/templates/pipelines/js/npm/gitlab-review.yaml index da8a31f7..b4a54655 100644 --- a/charts/pipelines-library/templates/pipelines/js/npm/gitlab-review.yaml +++ b/charts/pipelines-library/templates/pipelines/js/npm/gitlab-review.yaml @@ -1,16 +1,18 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if or ( .Values.pipelines.deployableResources.js.angular ) ( .Values.pipelines.deployableResources.js.express ) ( .Values.pipelines.deployableResources.js.next ) ( .Values.pipelines.deployableResources.js.react ) ( .Values.pipelines.deployableResources.js.vue )}} {{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := list "react" "angular" "vue" "express" "next" -}} -{{- range $k := $resourceMapping }} +{{- $raw := include "edp-tekton.resourceMapping.js" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-npm-{{ $k }}-app-review + name: gitlab-npm-{{ $framework }}-app-review labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} application with NPM" + description: "The Review pipeline for building {{ $framework }} application with NPM" workspaces: - name: shared-workspace @@ -21,7 +23,7 @@ spec: default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string - name: git-source-url - default: "https://github.com/epmd-edp/javascript-npm-{{ $k }}" + default: "https://github.com/epmd-edp/javascript-npm-{{ $framework }}" description: git url to clone type: string - name: git-source-revision @@ -37,7 +39,7 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: '{{ $k }}-npm-edp-version' + default: '{{ $framework }}-npm-edp-version' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -136,3 +138,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/opa/bitbucket-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/opa/bitbucket-build-lib-default.yaml index 023e1e85..a615cae7 100644 --- a/charts/pipelines-library/templates/pipelines/opa/bitbucket-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/opa/bitbucket-build-lib-default.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.opa }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -72,3 +73,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/opa/bitbucket-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/opa/bitbucket-build-lib-edp.yaml index 93adb039..f91625d1 100644 --- a/charts/pipelines-library/templates/pipelines/opa/bitbucket-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/opa/bitbucket-build-lib-edp.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.opa }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -75,3 +76,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/opa/bitbucket-review-lib.yaml b/charts/pipelines-library/templates/pipelines/opa/bitbucket-review-lib.yaml index 4d96ecfc..9e795d0d 100644 --- a/charts/pipelines-library/templates/pipelines/opa/bitbucket-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/opa/bitbucket-review-lib.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.opa }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -98,3 +99,4 @@ spec: {{ include "bitbucket-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/opa/gerrit-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/opa/gerrit-build-lib-default.yaml index c63de636..abdd8178 100644 --- a/charts/pipelines-library/templates/pipelines/opa/gerrit-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/opa/gerrit-build-lib-default.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.opa }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -72,3 +73,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/opa/gerrit-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/opa/gerrit-build-lib-edp.yaml index 6c57378c..d6475051 100644 --- a/charts/pipelines-library/templates/pipelines/opa/gerrit-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/opa/gerrit-build-lib-edp.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.opa }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -75,3 +76,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/opa/gerrit-review-lib.yaml b/charts/pipelines-library/templates/pipelines/opa/gerrit-review-lib.yaml index d0068eb1..02c380a5 100644 --- a/charts/pipelines-library/templates/pipelines/opa/gerrit-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/opa/gerrit-review-lib.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.opa }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -66,3 +67,4 @@ spec: {{ include "gerrit-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/opa/github-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/opa/github-build-lib-default.yaml index d182dcdc..95c2e088 100644 --- a/charts/pipelines-library/templates/pipelines/opa/github-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/opa/github-build-lib-default.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.opa }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -72,3 +73,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/opa/github-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/opa/github-build-lib-edp.yaml index eb01f376..6c32701e 100644 --- a/charts/pipelines-library/templates/pipelines/opa/github-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/opa/github-build-lib-edp.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.opa }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -75,3 +76,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/opa/github-review-lib.yaml b/charts/pipelines-library/templates/pipelines/opa/github-review-lib.yaml index ed46080e..0e2dbc74 100644 --- a/charts/pipelines-library/templates/pipelines/opa/github-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/opa/github-review-lib.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.opa }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -99,3 +100,4 @@ spec: {{ include "github-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/opa/gitlab-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/opa/gitlab-build-lib-default.yaml index e76edd8a..e6ead3d0 100644 --- a/charts/pipelines-library/templates/pipelines/opa/gitlab-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/opa/gitlab-build-lib-default.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.opa }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -72,3 +73,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/opa/gitlab-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/opa/gitlab-build-lib-edp.yaml index 133d4aee..87218e01 100644 --- a/charts/pipelines-library/templates/pipelines/opa/gitlab-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/opa/gitlab-build-lib-edp.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.opa }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -75,3 +76,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/opa/gitlab-review-lib.yaml b/charts/pipelines-library/templates/pipelines/opa/gitlab-review-lib.yaml index 4de023d0..6b6c3846 100644 --- a/charts/pipelines-library/templates/pipelines/opa/gitlab-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/opa/gitlab-review-lib.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.opa }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -98,3 +99,4 @@ spec: {{ include "gitlab-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/ansible/bitbucket-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/python/ansible/bitbucket-build-lib-default.yaml index ccff8ffb..16a83bee 100644 --- a/charts/pipelines-library/templates/pipelines/python/ansible/bitbucket-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/python/ansible/bitbucket-build-lib-default.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.python.ansible }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -68,3 +69,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/ansible/bitbucket-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/python/ansible/bitbucket-build-lib-edp.yaml index d3b9230c..f9b1cca2 100644 --- a/charts/pipelines-library/templates/pipelines/python/ansible/bitbucket-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/python/ansible/bitbucket-build-lib-edp.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.python.ansible }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -71,3 +72,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/ansible/bitbucket-review-lib.yaml b/charts/pipelines-library/templates/pipelines/python/ansible/bitbucket-review-lib.yaml index 3162afcb..2ec2d57c 100644 --- a/charts/pipelines-library/templates/pipelines/python/ansible/bitbucket-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/python/ansible/bitbucket-review-lib.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.python.ansible }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -44,3 +45,4 @@ spec: {{ include "bitbucket-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/ansible/gerrit-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/python/ansible/gerrit-build-lib-default.yaml index 60187efc..fdd7c903 100644 --- a/charts/pipelines-library/templates/pipelines/python/ansible/gerrit-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/python/ansible/gerrit-build-lib-default.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.python.ansible }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -68,3 +69,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/ansible/gerrit-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/python/ansible/gerrit-build-lib-edp.yaml index 7d842bfe..ac1863f7 100644 --- a/charts/pipelines-library/templates/pipelines/python/ansible/gerrit-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/python/ansible/gerrit-build-lib-edp.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.python.ansible }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -71,3 +72,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/ansible/gerrit-review-lib.yaml b/charts/pipelines-library/templates/pipelines/python/ansible/gerrit-review-lib.yaml index a06053ec..bfc5d831 100644 --- a/charts/pipelines-library/templates/pipelines/python/ansible/gerrit-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/python/ansible/gerrit-review-lib.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.python.ansible }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -47,3 +48,4 @@ spec: {{ include "gerrit-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/ansible/github-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/python/ansible/github-build-lib-default.yaml index 198afb84..8a10217a 100644 --- a/charts/pipelines-library/templates/pipelines/python/ansible/github-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/python/ansible/github-build-lib-default.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.python.ansible }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -68,3 +69,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/ansible/github-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/python/ansible/github-build-lib-edp.yaml index fbee9651..966ab3ad 100644 --- a/charts/pipelines-library/templates/pipelines/python/ansible/github-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/python/ansible/github-build-lib-edp.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.python.ansible }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -71,3 +72,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/ansible/github-review-lib.yaml b/charts/pipelines-library/templates/pipelines/python/ansible/github-review-lib.yaml index f0042410..94b8da3d 100644 --- a/charts/pipelines-library/templates/pipelines/python/ansible/github-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/python/ansible/github-review-lib.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.python.ansible }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -47,3 +48,4 @@ spec: {{ include "github-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/ansible/gitlab-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/python/ansible/gitlab-build-lib-default.yaml index ce688b27..f851562b 100644 --- a/charts/pipelines-library/templates/pipelines/python/ansible/gitlab-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/python/ansible/gitlab-build-lib-default.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.python.ansible }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -68,3 +69,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/ansible/gitlab-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/python/ansible/gitlab-build-lib-edp.yaml index fbab68ad..669ecdf6 100644 --- a/charts/pipelines-library/templates/pipelines/python/ansible/gitlab-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/python/ansible/gitlab-build-lib-edp.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.python.ansible }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -71,3 +72,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/ansible/gitlab-review-lib.yaml b/charts/pipelines-library/templates/pipelines/python/ansible/gitlab-review-lib.yaml index 90ea8319..e911b304 100644 --- a/charts/pipelines-library/templates/pipelines/python/ansible/gitlab-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/python/ansible/gitlab-review-lib.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.python.ansible }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -44,3 +45,4 @@ spec: {{ include "gitlab-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/fastapi/bitbucket-build-default.yaml b/charts/pipelines-library/templates/pipelines/python/flask/bitbucket-build-default.yaml similarity index 91% rename from charts/pipelines-library/templates/pipelines/python/fastapi/bitbucket-build-default.yaml rename to charts/pipelines-library/templates/pipelines/python/flask/bitbucket-build-default.yaml index 59077429..066977ae 100644 --- a/charts/pipelines-library/templates/pipelines/python/fastapi/bitbucket-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/python/flask/bitbucket-build-default.yaml @@ -1,6 +1,8 @@ {{ if has "bitbucket" .Values.global.gitProviders }} -{{- $frameworks := list "fastapi" "flask" -}} -{{- range $framework := $frameworks }} +{{ if or ( .Values.pipelines.deployableResources.python.flask ) ( .Values.pipelines.deployableResources.python.fastapi ) }} +{{- $raw := include "edp-tekton.resourceMapping.python" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -169,3 +171,4 @@ spec: --- {{- end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/fastapi/bitbucket-build-edp.yaml b/charts/pipelines-library/templates/pipelines/python/flask/bitbucket-build-edp.yaml similarity index 91% rename from charts/pipelines-library/templates/pipelines/python/fastapi/bitbucket-build-edp.yaml rename to charts/pipelines-library/templates/pipelines/python/flask/bitbucket-build-edp.yaml index 251fd623..521deef8 100644 --- a/charts/pipelines-library/templates/pipelines/python/fastapi/bitbucket-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/python/flask/bitbucket-build-edp.yaml @@ -1,6 +1,8 @@ {{ if has "bitbucket" .Values.global.gitProviders }} -{{- $frameworks := list "fastapi" "flask" -}} -{{- range $framework := $frameworks }} +{{ if or ( .Values.pipelines.deployableResources.python.flask ) ( .Values.pipelines.deployableResources.python.fastapi ) }} +{{- $raw := include "edp-tekton.resourceMapping.python" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -169,3 +171,4 @@ spec: --- {{- end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/fastapi/bitbucket-review.yaml b/charts/pipelines-library/templates/pipelines/python/flask/bitbucket-review.yaml similarity index 90% rename from charts/pipelines-library/templates/pipelines/python/fastapi/bitbucket-review.yaml rename to charts/pipelines-library/templates/pipelines/python/flask/bitbucket-review.yaml index 27b2f238..de4118ce 100644 --- a/charts/pipelines-library/templates/pipelines/python/fastapi/bitbucket-review.yaml +++ b/charts/pipelines-library/templates/pipelines/python/flask/bitbucket-review.yaml @@ -1,6 +1,8 @@ {{ if has "bitbucket" .Values.global.gitProviders }} -{{- $frameworks := list "fastapi" "flask" -}} -{{- range $framework := $frameworks }} +{{ if or ( .Values.pipelines.deployableResources.python.flask ) ( .Values.pipelines.deployableResources.python.fastapi ) }} +{{- $raw := include "edp-tekton.resourceMapping.python" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -144,3 +146,4 @@ spec: --- {{- end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/fastapi/gerrit-build-default.yaml b/charts/pipelines-library/templates/pipelines/python/flask/gerrit-build-default.yaml similarity index 94% rename from charts/pipelines-library/templates/pipelines/python/fastapi/gerrit-build-default.yaml rename to charts/pipelines-library/templates/pipelines/python/flask/gerrit-build-default.yaml index 0f986204..d7576dfd 100644 --- a/charts/pipelines-library/templates/pipelines/python/fastapi/gerrit-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/python/flask/gerrit-build-default.yaml @@ -1,6 +1,8 @@ {{ if has "gerrit" .Values.global.gitProviders }} -{{- $frameworks := list "fastapi" "flask" -}} -{{- range $framework := $frameworks }} +{{ if or ( .Values.pipelines.deployableResources.python.flask ) ( .Values.pipelines.deployableResources.python.fastapi ) }} +{{- $raw := include "edp-tekton.resourceMapping.python" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -169,3 +171,4 @@ spec: --- {{- end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/fastapi/gerrit-build-edp.yaml b/charts/pipelines-library/templates/pipelines/python/flask/gerrit-build-edp.yaml similarity index 94% rename from charts/pipelines-library/templates/pipelines/python/fastapi/gerrit-build-edp.yaml rename to charts/pipelines-library/templates/pipelines/python/flask/gerrit-build-edp.yaml index 1deca81c..9cca1330 100644 --- a/charts/pipelines-library/templates/pipelines/python/fastapi/gerrit-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/python/flask/gerrit-build-edp.yaml @@ -1,6 +1,8 @@ {{ if has "gerrit" .Values.global.gitProviders }} -{{- $frameworks := list "fastapi" "flask" -}} -{{- range $framework := $frameworks }} +{{ if or ( .Values.pipelines.deployableResources.python.flask ) ( .Values.pipelines.deployableResources.python.fastapi ) }} +{{- $raw := include "edp-tekton.resourceMapping.python" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -170,3 +172,4 @@ spec: --- {{- end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/fastapi/gerrit-review.yaml b/charts/pipelines-library/templates/pipelines/python/flask/gerrit-review.yaml similarity index 92% rename from charts/pipelines-library/templates/pipelines/python/fastapi/gerrit-review.yaml rename to charts/pipelines-library/templates/pipelines/python/flask/gerrit-review.yaml index c516b6fd..4546ce0b 100644 --- a/charts/pipelines-library/templates/pipelines/python/fastapi/gerrit-review.yaml +++ b/charts/pipelines-library/templates/pipelines/python/flask/gerrit-review.yaml @@ -1,6 +1,8 @@ {{ if has "gerrit" .Values.global.gitProviders }} -{{- $frameworks := list "fastapi" "flask" -}} -{{- range $framework := $frameworks }} +{{ if or ( .Values.pipelines.deployableResources.python.flask ) ( .Values.pipelines.deployableResources.python.fastapi ) }} +{{- $raw := include "edp-tekton.resourceMapping.python" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -136,3 +138,4 @@ spec: --- {{- end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/fastapi/github-build-default.yaml b/charts/pipelines-library/templates/pipelines/python/flask/github-build-default.yaml similarity index 91% rename from charts/pipelines-library/templates/pipelines/python/fastapi/github-build-default.yaml rename to charts/pipelines-library/templates/pipelines/python/flask/github-build-default.yaml index 43b7f850..390bcc2a 100644 --- a/charts/pipelines-library/templates/pipelines/python/fastapi/github-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/python/flask/github-build-default.yaml @@ -1,7 +1,9 @@ {{ if has "github" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $frameworks := list "fastapi" "flask" -}} -{{- range $framework := $frameworks }} +{{ if or ( .Values.pipelines.deployableResources.python.flask ) ( .Values.pipelines.deployableResources.python.fastapi ) }} +{{- $raw := include "edp-tekton.resourceMapping.python" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -175,3 +177,4 @@ spec: --- {{- end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/fastapi/github-build-edp.yaml b/charts/pipelines-library/templates/pipelines/python/flask/github-build-edp.yaml similarity index 91% rename from charts/pipelines-library/templates/pipelines/python/fastapi/github-build-edp.yaml rename to charts/pipelines-library/templates/pipelines/python/flask/github-build-edp.yaml index 504c2b7d..fca8bd04 100644 --- a/charts/pipelines-library/templates/pipelines/python/fastapi/github-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/python/flask/github-build-edp.yaml @@ -1,6 +1,8 @@ {{ if has "github" .Values.global.gitProviders }} -{{- $frameworks := list "fastapi" "flask" -}} -{{- range $framework := $frameworks }} +{{ if or ( .Values.pipelines.deployableResources.python.flask ) ( .Values.pipelines.deployableResources.python.fastapi ) }} +{{- $raw := include "edp-tekton.resourceMapping.python" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -170,3 +172,4 @@ spec: --- {{- end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/fastapi/github-review.yaml b/charts/pipelines-library/templates/pipelines/python/flask/github-review.yaml similarity index 90% rename from charts/pipelines-library/templates/pipelines/python/fastapi/github-review.yaml rename to charts/pipelines-library/templates/pipelines/python/flask/github-review.yaml index d5ddb4d0..c614f12d 100644 --- a/charts/pipelines-library/templates/pipelines/python/fastapi/github-review.yaml +++ b/charts/pipelines-library/templates/pipelines/python/flask/github-review.yaml @@ -1,7 +1,9 @@ {{ if has "github" .Values.global.gitProviders }} {{- $registry := include "edp-tekton.registry" . -}} -{{- $frameworks := list "fastapi" "flask" -}} -{{- range $framework := $frameworks }} +{{ if or ( .Values.pipelines.deployableResources.python.flask ) ( .Values.pipelines.deployableResources.python.fastapi ) }} +{{- $raw := include "edp-tekton.resourceMapping.python" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -152,3 +154,4 @@ spec: --- {{- end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/fastapi/gitlab-build-default.yaml b/charts/pipelines-library/templates/pipelines/python/flask/gitlab-build-default.yaml similarity index 91% rename from charts/pipelines-library/templates/pipelines/python/fastapi/gitlab-build-default.yaml rename to charts/pipelines-library/templates/pipelines/python/flask/gitlab-build-default.yaml index 3f8e1aca..baee2bee 100644 --- a/charts/pipelines-library/templates/pipelines/python/fastapi/gitlab-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/python/flask/gitlab-build-default.yaml @@ -1,6 +1,8 @@ {{ if has "gitlab" .Values.global.gitProviders }} -{{- $frameworks := list "fastapi" "flask" -}} -{{- range $framework := $frameworks }} +{{ if or ( .Values.pipelines.deployableResources.python.flask ) ( .Values.pipelines.deployableResources.python.fastapi ) }} +{{- $raw := include "edp-tekton.resourceMapping.python" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -170,3 +172,4 @@ spec: --- {{- end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/fastapi/gitlab-build-edp.yaml b/charts/pipelines-library/templates/pipelines/python/flask/gitlab-build-edp.yaml similarity index 91% rename from charts/pipelines-library/templates/pipelines/python/fastapi/gitlab-build-edp.yaml rename to charts/pipelines-library/templates/pipelines/python/flask/gitlab-build-edp.yaml index cb03cb2f..f49626bb 100644 --- a/charts/pipelines-library/templates/pipelines/python/fastapi/gitlab-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/python/flask/gitlab-build-edp.yaml @@ -1,6 +1,8 @@ {{ if has "gitlab" .Values.global.gitProviders }} -{{- $frameworks := list "fastapi" "flask" -}} -{{- range $framework := $frameworks }} +{{ if or ( .Values.pipelines.deployableResources.python.flask ) ( .Values.pipelines.deployableResources.python.fastapi ) }} +{{- $raw := include "edp-tekton.resourceMapping.python" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -170,3 +172,4 @@ spec: --- {{- end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/fastapi/gitlab-review.yaml b/charts/pipelines-library/templates/pipelines/python/flask/gitlab-review.yaml similarity index 90% rename from charts/pipelines-library/templates/pipelines/python/fastapi/gitlab-review.yaml rename to charts/pipelines-library/templates/pipelines/python/flask/gitlab-review.yaml index 7c8faa2a..294fceb4 100644 --- a/charts/pipelines-library/templates/pipelines/python/fastapi/gitlab-review.yaml +++ b/charts/pipelines-library/templates/pipelines/python/flask/gitlab-review.yaml @@ -1,6 +1,8 @@ {{ if has "gitlab" .Values.global.gitProviders }} -{{- $frameworks := list "fastapi" "flask" -}} -{{- range $framework := $frameworks }} +{{ if or ( .Values.pipelines.deployableResources.python.flask ) ( .Values.pipelines.deployableResources.python.fastapi ) }} +{{- $raw := include "edp-tekton.resourceMapping.python" . | trimAll "[]" -}} +{{- $resources := $raw | split " " -}} +{{- range $framework := $resources }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -144,3 +146,4 @@ spec: --- {{- end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/bitbucket-build-default.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-build-default.yaml similarity index 97% rename from charts/pipelines-library/templates/pipelines/python/bitbucket-build-default.yaml rename to charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-build-default.yaml index 072f0a79..044ec570 100644 --- a/charts/pipelines-library/templates/pipelines/python/bitbucket-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-build-default.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if (index .Values.pipelines.deployableResources.python "python3.8" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -101,3 +102,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/bitbucket-build-edp.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-build-edp.yaml similarity index 97% rename from charts/pipelines-library/templates/pipelines/python/bitbucket-build-edp.yaml rename to charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-build-edp.yaml index 1432a557..ee22a2d0 100644 --- a/charts/pipelines-library/templates/pipelines/python/bitbucket-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-build-edp.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if (index .Values.pipelines.deployableResources.python "python3.8" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -99,3 +100,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/bitbucket-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-build-lib-default.yaml similarity index 97% rename from charts/pipelines-library/templates/pipelines/python/bitbucket-build-lib-default.yaml rename to charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-build-lib-default.yaml index 8b9c096c..2062dce3 100644 --- a/charts/pipelines-library/templates/pipelines/python/bitbucket-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-build-lib-default.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if (index .Values.pipelines.deployableResources.python "python3.8" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -99,3 +100,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/bitbucket-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-build-lib-edp.yaml similarity index 97% rename from charts/pipelines-library/templates/pipelines/python/bitbucket-build-lib-edp.yaml rename to charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-build-lib-edp.yaml index 8ef73062..4f6c9610 100644 --- a/charts/pipelines-library/templates/pipelines/python/bitbucket-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-build-lib-edp.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if (index .Values.pipelines.deployableResources.python "python3.8" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -97,3 +98,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/bitbucket-review-lib.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-review-lib.yaml similarity index 95% rename from charts/pipelines-library/templates/pipelines/python/bitbucket-review-lib.yaml rename to charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-review-lib.yaml index d68b49a6..25685d9c 100644 --- a/charts/pipelines-library/templates/pipelines/python/bitbucket-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-review-lib.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if (index .Values.pipelines.deployableResources.python "python3.8" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -62,3 +63,4 @@ spec: {{ include "bitbucket-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/bitbucket-review.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-review.yaml similarity index 97% rename from charts/pipelines-library/templates/pipelines/python/bitbucket-review.yaml rename to charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-review.yaml index 09332066..6df12d40 100644 --- a/charts/pipelines-library/templates/pipelines/python/bitbucket-review.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-review.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if (index .Values.pipelines.deployableResources.python "python3.8" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -99,3 +100,4 @@ spec: {{ include "bitbucket-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/gerrit-build-default.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/gerrit-build-default.yaml similarity index 97% rename from charts/pipelines-library/templates/pipelines/python/gerrit-build-default.yaml rename to charts/pipelines-library/templates/pipelines/python/python3.8/gerrit-build-default.yaml index 86c48c42..ab0fa2f0 100644 --- a/charts/pipelines-library/templates/pipelines/python/gerrit-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/gerrit-build-default.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if (index .Values.pipelines.deployableResources.python "python3.8" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -101,3 +102,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/gerrit-build-edp.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/gerrit-build-edp.yaml similarity index 97% rename from charts/pipelines-library/templates/pipelines/python/gerrit-build-edp.yaml rename to charts/pipelines-library/templates/pipelines/python/python3.8/gerrit-build-edp.yaml index 7a0b39bd..58a9b5d5 100644 --- a/charts/pipelines-library/templates/pipelines/python/gerrit-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/gerrit-build-edp.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if (index .Values.pipelines.deployableResources.python "python3.8" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -99,3 +100,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/gerrit-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/gerrit-build-lib-default.yaml similarity index 97% rename from charts/pipelines-library/templates/pipelines/python/gerrit-build-lib-default.yaml rename to charts/pipelines-library/templates/pipelines/python/python3.8/gerrit-build-lib-default.yaml index f49d871a..a0042bf8 100644 --- a/charts/pipelines-library/templates/pipelines/python/gerrit-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/gerrit-build-lib-default.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if (index .Values.pipelines.deployableResources.python "python3.8" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -99,3 +100,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/gerrit-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/gerrit-build-lib-edp.yaml similarity index 97% rename from charts/pipelines-library/templates/pipelines/python/gerrit-build-lib-edp.yaml rename to charts/pipelines-library/templates/pipelines/python/python3.8/gerrit-build-lib-edp.yaml index 482d3ba5..2a8c9801 100644 --- a/charts/pipelines-library/templates/pipelines/python/gerrit-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/gerrit-build-lib-edp.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if (index .Values.pipelines.deployableResources.python "python3.8" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -97,3 +98,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/gerrit-review-lib.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/gerrit-review-lib.yaml similarity index 95% rename from charts/pipelines-library/templates/pipelines/python/gerrit-review-lib.yaml rename to charts/pipelines-library/templates/pipelines/python/python3.8/gerrit-review-lib.yaml index 52f7cea7..85a583da 100644 --- a/charts/pipelines-library/templates/pipelines/python/gerrit-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/gerrit-review-lib.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if (index .Values.pipelines.deployableResources.python "python3.8" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -54,3 +55,4 @@ spec: {{ include "gerrit-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/gerrit-review.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/gerrit-review.yaml similarity index 96% rename from charts/pipelines-library/templates/pipelines/python/gerrit-review.yaml rename to charts/pipelines-library/templates/pipelines/python/python3.8/gerrit-review.yaml index d6d7f98f..7ebbfc16 100644 --- a/charts/pipelines-library/templates/pipelines/python/gerrit-review.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/gerrit-review.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if (index .Values.pipelines.deployableResources.python "python3.8" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -91,3 +92,4 @@ spec: {{ include "gerrit-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/github-build-default.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/github-build-default.yaml similarity index 97% rename from charts/pipelines-library/templates/pipelines/python/github-build-default.yaml rename to charts/pipelines-library/templates/pipelines/python/python3.8/github-build-default.yaml index c7cf5de2..8ceba818 100644 --- a/charts/pipelines-library/templates/pipelines/python/github-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/github-build-default.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if (index .Values.pipelines.deployableResources.python "python3.8" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -101,3 +102,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/github-build-edp.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/github-build-edp.yaml similarity index 97% rename from charts/pipelines-library/templates/pipelines/python/github-build-edp.yaml rename to charts/pipelines-library/templates/pipelines/python/python3.8/github-build-edp.yaml index 7cae047e..da917d9f 100644 --- a/charts/pipelines-library/templates/pipelines/python/github-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/github-build-edp.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if (index .Values.pipelines.deployableResources.python "python3.8" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -99,3 +100,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/github-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/github-build-lib-default.yaml similarity index 97% rename from charts/pipelines-library/templates/pipelines/python/github-build-lib-default.yaml rename to charts/pipelines-library/templates/pipelines/python/python3.8/github-build-lib-default.yaml index 421ef3b0..39fbc90d 100644 --- a/charts/pipelines-library/templates/pipelines/python/github-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/github-build-lib-default.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if (index .Values.pipelines.deployableResources.python "python3.8" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -99,3 +100,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/github-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/github-build-lib-edp.yaml similarity index 97% rename from charts/pipelines-library/templates/pipelines/python/github-build-lib-edp.yaml rename to charts/pipelines-library/templates/pipelines/python/python3.8/github-build-lib-edp.yaml index d47bc656..9a703437 100644 --- a/charts/pipelines-library/templates/pipelines/python/github-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/github-build-lib-edp.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if (index .Values.pipelines.deployableResources.python "python3.8" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -97,3 +98,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/github-review-lib.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/github-review-lib.yaml similarity index 95% rename from charts/pipelines-library/templates/pipelines/python/github-review-lib.yaml rename to charts/pipelines-library/templates/pipelines/python/python3.8/github-review-lib.yaml index 2775675e..0d1532a8 100644 --- a/charts/pipelines-library/templates/pipelines/python/github-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/github-review-lib.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if (index .Values.pipelines.deployableResources.python "python3.8" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -65,3 +66,4 @@ spec: {{ include "github-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/github-review.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/github-review.yaml similarity index 97% rename from charts/pipelines-library/templates/pipelines/python/github-review.yaml rename to charts/pipelines-library/templates/pipelines/python/python3.8/github-review.yaml index 66421062..de2030ff 100644 --- a/charts/pipelines-library/templates/pipelines/python/github-review.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/github-review.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if (index .Values.pipelines.deployableResources.python "python3.8" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -102,3 +103,4 @@ spec: {{ include "github-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/gitlab-build-default.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-build-default.yaml similarity index 97% rename from charts/pipelines-library/templates/pipelines/python/gitlab-build-default.yaml rename to charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-build-default.yaml index d431fc2b..0b28c8b6 100644 --- a/charts/pipelines-library/templates/pipelines/python/gitlab-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-build-default.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if (index .Values.pipelines.deployableResources.python "python3.8" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -101,3 +102,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/gitlab-build-edp.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-build-edp.yaml similarity index 97% rename from charts/pipelines-library/templates/pipelines/python/gitlab-build-edp.yaml rename to charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-build-edp.yaml index c94049b3..11920953 100644 --- a/charts/pipelines-library/templates/pipelines/python/gitlab-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-build-edp.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if (index .Values.pipelines.deployableResources.python "python3.8" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -99,3 +100,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/gitlab-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-build-lib-default.yaml similarity index 97% rename from charts/pipelines-library/templates/pipelines/python/gitlab-build-lib-default.yaml rename to charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-build-lib-default.yaml index dffdab8f..b3886e4e 100644 --- a/charts/pipelines-library/templates/pipelines/python/gitlab-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-build-lib-default.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if (index .Values.pipelines.deployableResources.python "python3.8" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -99,3 +100,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/gitlab-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-build-lib-edp.yaml similarity index 97% rename from charts/pipelines-library/templates/pipelines/python/gitlab-build-lib-edp.yaml rename to charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-build-lib-edp.yaml index e7a1fca7..b0ba5f83 100644 --- a/charts/pipelines-library/templates/pipelines/python/gitlab-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-build-lib-edp.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if (index .Values.pipelines.deployableResources.python "python3.8" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -97,3 +98,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/gitlab-review-lib.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-review-lib.yaml similarity index 95% rename from charts/pipelines-library/templates/pipelines/python/gitlab-review-lib.yaml rename to charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-review-lib.yaml index e5f23bbb..2e7b9678 100644 --- a/charts/pipelines-library/templates/pipelines/python/gitlab-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-review-lib.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if (index .Values.pipelines.deployableResources.python "python3.8" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -62,3 +63,4 @@ spec: {{ include "gitlab-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/gitlab-review.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-review.yaml similarity index 97% rename from charts/pipelines-library/templates/pipelines/python/gitlab-review.yaml rename to charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-review.yaml index c5abc896..2ef11cbb 100644 --- a/charts/pipelines-library/templates/pipelines/python/gitlab-review.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-review.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if (index .Values.pipelines.deployableResources.python "python3.8" ) }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -99,3 +100,4 @@ spec: {{ include "gitlab-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/rpm/maven/bitbucket-build-default.yaml b/charts/pipelines-library/templates/pipelines/rpm/maven/bitbucket-build-default.yaml index da18f815..6f18fb58 100644 --- a/charts/pipelines-library/templates/pipelines/rpm/maven/bitbucket-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/rpm/maven/bitbucket-build-default.yaml @@ -1,26 +1,18 @@ {{ if has "bitbucket" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-maven-{{ $k }}-app-build-default-rpm + name: bitbucket-maven-{{ $framework }}-app-build-default-rpm labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with Maven (default versioning)" + description: "The Build pipeline for building {{ $framework }} application with Maven (default versioning)" workspaces: - name: shared-workspace @@ -39,7 +31,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -50,11 +42,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: TICKET_NAME_PATTERN @@ -134,3 +126,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/rpm/maven/bitbucket-build-edp.yaml b/charts/pipelines-library/templates/pipelines/rpm/maven/bitbucket-build-edp.yaml index 2a26957c..9d42196c 100644 --- a/charts/pipelines-library/templates/pipelines/rpm/maven/bitbucket-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/rpm/maven/bitbucket-build-edp.yaml @@ -1,26 +1,18 @@ {{ if has "bitbucket" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-maven-{{ $k }}-app-build-edp-rpm + name: bitbucket-maven-{{ $framework }}-app-build-edp-rpm labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with Maven (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} application with Maven (EDP versioning)" workspaces: - name: shared-workspace @@ -39,7 +31,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -50,11 +42,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: TICKET_NAME_PATTERN @@ -128,3 +120,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/rpm/maven/bitbucket-review.yaml b/charts/pipelines-library/templates/pipelines/rpm/maven/bitbucket-review.yaml index 344bb822..8cb140c7 100644 --- a/charts/pipelines-library/templates/pipelines/rpm/maven/bitbucket-review.yaml +++ b/charts/pipelines-library/templates/pipelines/rpm/maven/bitbucket-review.yaml @@ -1,26 +1,18 @@ {{ if has "bitbucket" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: bitbucket-maven-{{ $k }}-app-review-rpm + name: bitbucket-maven-{{ $framework }}-app-review-rpm labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} application with Maven" + description: "The Review pipeline for building {{ $framework }} application with Maven" workspaces: - name: shared-workspace @@ -50,18 +42,18 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: CHART_DIR @@ -90,3 +82,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/rpm/maven/gerrit-build-default.yaml b/charts/pipelines-library/templates/pipelines/rpm/maven/gerrit-build-default.yaml index d574d67f..a0375f1a 100644 --- a/charts/pipelines-library/templates/pipelines/rpm/maven/gerrit-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/rpm/maven/gerrit-build-default.yaml @@ -1,26 +1,18 @@ {{ if has "gerrit" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-maven-{{ $k }}-app-build-default-rpm + name: gerrit-maven-{{ $framework }}-app-build-default-rpm labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with Maven (default versioning)" + description: "The Build pipeline for building {{ $framework }} application with Maven (default versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -37,18 +29,18 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: changeNumber @@ -131,3 +123,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/rpm/maven/gerrit-build-edp.yaml b/charts/pipelines-library/templates/pipelines/rpm/maven/gerrit-build-edp.yaml index 4368b40b..12a810bb 100644 --- a/charts/pipelines-library/templates/pipelines/rpm/maven/gerrit-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/rpm/maven/gerrit-build-edp.yaml @@ -1,26 +1,18 @@ {{ if has "gerrit" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-maven-{{ $k }}-app-build-edp-rpm + name: gerrit-maven-{{ $framework }}-app-build-edp-rpm labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with Maven (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} application with Maven (EDP versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -37,18 +29,18 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: changeNumber @@ -126,3 +118,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/rpm/maven/gerrit-review.yaml b/charts/pipelines-library/templates/pipelines/rpm/maven/gerrit-review.yaml index 5b87f9a5..cba3f658 100644 --- a/charts/pipelines-library/templates/pipelines/rpm/maven/gerrit-review.yaml +++ b/charts/pipelines-library/templates/pipelines/rpm/maven/gerrit-review.yaml @@ -1,26 +1,18 @@ {{ if has "gerrit" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gerrit-maven-{{ $k }}-app-review-rpm + name: gerrit-maven-{{ $framework }}-app-review-rpm labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} application with Maven" + description: "The Review pipeline for building {{ $framework }} application with Maven" workspaces: - name: shared-workspace - name: ssh-creds @@ -41,15 +33,15 @@ spec: default: "" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: targetBranch @@ -83,3 +75,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/rpm/maven/github-build-default.yaml b/charts/pipelines-library/templates/pipelines/rpm/maven/github-build-default.yaml index edf02f19..121e47d5 100644 --- a/charts/pipelines-library/templates/pipelines/rpm/maven/github-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/rpm/maven/github-build-default.yaml @@ -1,26 +1,18 @@ {{ if has "github" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-maven-{{ $k }}-app-build-default-rpm + name: github-maven-{{ $framework }}-app-build-default-rpm labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with Maven (default versioning)" + description: "The Build pipeline for building {{ $framework }} application with Maven (default versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -37,7 +29,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -48,11 +40,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: TICKET_NAME_PATTERN @@ -132,3 +124,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/rpm/maven/github-build-edp.yaml b/charts/pipelines-library/templates/pipelines/rpm/maven/github-build-edp.yaml index 10212e6e..dbf4bc26 100644 --- a/charts/pipelines-library/templates/pipelines/rpm/maven/github-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/rpm/maven/github-build-edp.yaml @@ -1,26 +1,18 @@ {{ if has "github" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-maven-{{ $k }}-app-build-edp-rpm + name: github-maven-{{ $framework }}-app-build-edp-rpm labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with Maven (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} application with Maven (EDP versioning)" workspaces: - name: shared-workspace - name: ssh-creds @@ -37,7 +29,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -48,11 +40,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: TICKET_NAME_PATTERN @@ -126,3 +118,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/rpm/maven/github-review.yaml b/charts/pipelines-library/templates/pipelines/rpm/maven/github-review.yaml index 6470a4d6..54faebdb 100644 --- a/charts/pipelines-library/templates/pipelines/rpm/maven/github-review.yaml +++ b/charts/pipelines-library/templates/pipelines/rpm/maven/github-review.yaml @@ -1,26 +1,18 @@ {{ if has "github" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: github-maven-{{ $k }}-app-review-rpm + name: github-maven-{{ $framework }}-app-review-rpm labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} application with Maven" + description: "The Review pipeline for building {{ $framework }} application with Maven" workspaces: - name: shared-workspace - name: ssh-creds @@ -45,18 +37,18 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: gitfullrepositoryname @@ -90,3 +82,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/rpm/maven/gitlab-build-default.yaml b/charts/pipelines-library/templates/pipelines/rpm/maven/gitlab-build-default.yaml index 1226878e..066cf474 100644 --- a/charts/pipelines-library/templates/pipelines/rpm/maven/gitlab-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/rpm/maven/gitlab-build-default.yaml @@ -1,26 +1,18 @@ {{ if has "gitlab" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-maven-{{ $k }}-app-build-default-rpm + name: gitlab-maven-{{ $framework }}-app-build-default-rpm labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with Maven (default versioning)" + description: "The Build pipeline for building {{ $framework }} application with Maven (default versioning)" workspaces: - name: shared-workspace @@ -39,7 +31,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -50,11 +42,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: TICKET_NAME_PATTERN @@ -135,3 +127,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/rpm/maven/gitlab-build-edp.yaml b/charts/pipelines-library/templates/pipelines/rpm/maven/gitlab-build-edp.yaml index a326a5ba..434b90c9 100644 --- a/charts/pipelines-library/templates/pipelines/rpm/maven/gitlab-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/rpm/maven/gitlab-build-edp.yaml @@ -1,26 +1,18 @@ {{ if has "gitlab" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-maven-{{ $k }}-app-build-edp-rpm + name: gitlab-maven-{{ $framework }}-app-build-edp-rpm labels: app.edp.epam.com/pipelinetype: build {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Build pipeline for building {{ $k }} application with Maven (EDP versioning)" + description: "The Build pipeline for building {{ $framework }} application with Maven (EDP versioning)" workspaces: - name: shared-workspace @@ -39,7 +31,7 @@ spec: default: "edp" type: string - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME @@ -50,11 +42,11 @@ spec: default: "" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: TICKET_NAME_PATTERN @@ -128,3 +120,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/rpm/maven/gitlab-review.yaml b/charts/pipelines-library/templates/pipelines/rpm/maven/gitlab-review.yaml index 46f7bccd..3d746548 100644 --- a/charts/pipelines-library/templates/pipelines/rpm/maven/gitlab-review.yaml +++ b/charts/pipelines-library/templates/pipelines/rpm/maven/gitlab-review.yaml @@ -1,26 +1,18 @@ {{ if has "gitlab" .Values.global.gitProviders }} -{{- $registry := include "edp-tekton.registry" . -}} -{{- $resourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-8" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- $altResourceMapping := dict - "java8" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java11" (printf "%s/maven:3.9.0-eclipse-temurin-11" $registry) - "java17" (printf "%s/maven:3.9.0-eclipse-temurin-17" $registry) - -}} -{{- range $k, $v := $resourceMapping }} -{{- $valueFromAlt := pluck $k $altResourceMapping | first -}} +{{ if or ( .Values.pipelines.deployableResources.java.java8 ) ( .Values.pipelines.deployableResources.java.java11 ) ( .Values.pipelines.deployableResources.java.java17 )}} +{{- $raw := include "edp-tekton.resourceMapping.maven" . | fromYaml -}} +{{- $rawSonar := include "edp-tekton.resourceMapping.mavenSonar" . | fromYaml -}} +{{- range $framework, $image := $raw }} +{{- $sonarImage := pluck $framework $rawSonar | first -}} apiVersion: tekton.dev/v1 kind: Pipeline metadata: - name: gitlab-maven-{{ $k }}-app-review-rpm + name: gitlab-maven-{{ $framework }}-app-review-rpm labels: app.edp.epam.com/pipelinetype: review {{- include "edp-tekton.labels" $ | nindent 4 }} spec: - description: "The Review pipeline for building {{ $k }} application with Maven" + description: "The Review pipeline for building {{ $framework }} application with Maven" workspaces: - name: shared-workspace @@ -50,18 +42,18 @@ spec: - name: changeNumber description: Change number from Merge Request - name: CODEBASE_NAME - default: '{{ $k }}-maven' + default: '{{ $framework }}-maven' description: "Project name" type: string - name: CODEBASEBRANCH_NAME description: "Codebasebranch name" type: string - name: image - default: '{{ $v }}' + default: '{{ $image }}' description: "maven image version" type: string - name: sonar_image - default: '{{ $valueFromAlt }}' + default: '{{ $sonarImage }}' description: "sonar image version" type: string - name: CHART_DIR @@ -90,3 +82,4 @@ spec: --- {{ end }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/terraform/bitbucket-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/terraform/bitbucket-build-lib-default.yaml index 110538ad..93b48644 100644 --- a/charts/pipelines-library/templates/pipelines/terraform/bitbucket-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/terraform/bitbucket-build-lib-default.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.terraform }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -72,3 +73,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/terraform/bitbucket-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/terraform/bitbucket-build-lib-edp.yaml index d938abce..e481064f 100644 --- a/charts/pipelines-library/templates/pipelines/terraform/bitbucket-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/terraform/bitbucket-build-lib-edp.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.terraform }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -75,3 +76,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/terraform/bitbucket-review-lib.yaml b/charts/pipelines-library/templates/pipelines/terraform/bitbucket-review-lib.yaml index 122b5b45..a16feb27 100644 --- a/charts/pipelines-library/templates/pipelines/terraform/bitbucket-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/terraform/bitbucket-review-lib.yaml @@ -1,4 +1,5 @@ {{ if has "bitbucket" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.terraform }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -48,3 +49,4 @@ spec: {{ include "bitbucket-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/terraform/gerrit-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/terraform/gerrit-build-lib-default.yaml index f3eede36..6ee5b4ce 100644 --- a/charts/pipelines-library/templates/pipelines/terraform/gerrit-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/terraform/gerrit-build-lib-default.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.terraform }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -72,3 +73,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/terraform/gerrit-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/terraform/gerrit-build-lib-edp.yaml index c4f1097f..01988a4d 100644 --- a/charts/pipelines-library/templates/pipelines/terraform/gerrit-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/terraform/gerrit-build-lib-edp.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.terraform }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -75,3 +76,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/terraform/gerrit-review-lib.yaml b/charts/pipelines-library/templates/pipelines/terraform/gerrit-review-lib.yaml index 2effc95d..7041ae51 100644 --- a/charts/pipelines-library/templates/pipelines/terraform/gerrit-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/terraform/gerrit-review-lib.yaml @@ -1,4 +1,5 @@ {{ if has "gerrit" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.terraform }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -51,3 +52,4 @@ spec: {{ include "gerrit-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/terraform/github-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/terraform/github-build-lib-default.yaml index c9fe478e..fb967199 100644 --- a/charts/pipelines-library/templates/pipelines/terraform/github-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/terraform/github-build-lib-default.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.terraform }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -72,3 +73,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/terraform/github-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/terraform/github-build-lib-edp.yaml index 01054e2e..d946e566 100644 --- a/charts/pipelines-library/templates/pipelines/terraform/github-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/terraform/github-build-lib-edp.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.terraform }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -75,3 +76,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/terraform/github-review-lib.yaml b/charts/pipelines-library/templates/pipelines/terraform/github-review-lib.yaml index 40bafad0..c83b631f 100644 --- a/charts/pipelines-library/templates/pipelines/terraform/github-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/terraform/github-review-lib.yaml @@ -1,4 +1,5 @@ {{ if has "github" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.terraform }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -51,3 +52,4 @@ spec: {{ include "github-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/terraform/gitlab-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/terraform/gitlab-build-lib-default.yaml index d3e5ab79..61df3ebf 100644 --- a/charts/pipelines-library/templates/pipelines/terraform/gitlab-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/terraform/gitlab-build-lib-default.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.terraform }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -72,3 +73,4 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/terraform/gitlab-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/terraform/gitlab-build-lib-edp.yaml index e96ad376..1ede7e99 100644 --- a/charts/pipelines-library/templates/pipelines/terraform/gitlab-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/terraform/gitlab-build-lib-edp.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.terraform }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -75,3 +76,4 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/pipelines/terraform/gitlab-review-lib.yaml b/charts/pipelines-library/templates/pipelines/terraform/gitlab-review-lib.yaml index 7d06979d..e590e24f 100644 --- a/charts/pipelines-library/templates/pipelines/terraform/gitlab-review-lib.yaml +++ b/charts/pipelines-library/templates/pipelines/terraform/gitlab-review-lib.yaml @@ -1,4 +1,5 @@ {{ if has "gitlab" .Values.global.gitProviders }} +{{ if .Values.pipelines.deployableResources.terraform }} apiVersion: tekton.dev/v1 kind: Pipeline metadata: @@ -48,3 +49,4 @@ spec: {{ include "gitlab-review-vote" . | nindent 2 }} {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/ansible.yaml b/charts/pipelines-library/templates/tasks/ansible.yaml index 9d0611aa..c4eb1ba7 100644 --- a/charts/pipelines-library/templates/tasks/ansible.yaml +++ b/charts/pipelines-library/templates/tasks/ansible.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -33,3 +34,4 @@ spec: set -ex $(params.EXTRA_COMMANDS) {{- include "resources" . | nindent 6 }} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/autotest-cd-pipeline/init-autotests.yaml b/charts/pipelines-library/templates/tasks/autotest-cd-pipeline/init-autotests.yaml index ac2c0cd5..8a3c22e6 100644 --- a/charts/pipelines-library/templates/tasks/autotest-cd-pipeline/init-autotests.yaml +++ b/charts/pipelines-library/templates/tasks/autotest-cd-pipeline/init-autotests.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -151,3 +152,4 @@ spec: {{- include "resources" . | nindent 6 }} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/autotest-cd-pipeline/run-autotests-java.yaml b/charts/pipelines-library/templates/tasks/autotest-cd-pipeline/run-autotests-java.yaml index 2d064d5b..1a10ef71 100644 --- a/charts/pipelines-library/templates/tasks/autotest-cd-pipeline/run-autotests-java.yaml +++ b/charts/pipelines-library/templates/tasks/autotest-cd-pipeline/run-autotests-java.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} {{- $resourceMapping := list "maven" "gradle" -}} {{- range $k := $resourceMapping }} apiVersion: tekton.dev/v1 @@ -45,3 +46,4 @@ spec: --- {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/autotest-cd-pipeline/wait-autotest.yaml b/charts/pipelines-library/templates/tasks/autotest-cd-pipeline/wait-autotest.yaml index 65312572..52f515fe 100644 --- a/charts/pipelines-library/templates/tasks/autotest-cd-pipeline/wait-autotest.yaml +++ b/charts/pipelines-library/templates/tasks/autotest-cd-pipeline/wait-autotest.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -47,3 +48,4 @@ spec: continue print("[TEKTON][DEBUG]: All autotests finished.") +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/autotests/TestsMavenAutotest.yaml b/charts/pipelines-library/templates/tasks/autotests/TestsMavenAutotest.yaml index 2711b16a..d7b1e2ad 100644 --- a/charts/pipelines-library/templates/tasks/autotests/TestsMavenAutotest.yaml +++ b/charts/pipelines-library/templates/tasks/autotests/TestsMavenAutotest.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -104,3 +105,4 @@ spec: -Dartifactory.groupPath=edp-maven-group \ --settings \ /var/configmap/settings.xml +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/bitbucket-set-status.yaml b/charts/pipelines-library/templates/tasks/bitbucket-set-status.yaml index f0075fe8..5ddc3745 100644 --- a/charts/pipelines-library/templates/tasks/bitbucket-set-status.yaml +++ b/charts/pipelines-library/templates/tasks/bitbucket-set-status.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -170,3 +171,4 @@ spec: state=os.getenv("STATE"), repo=os.getenv("REPO_FULL_NAME"), sha=os.getenv("SHA"))) +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/cd/clean.yaml b/charts/pipelines-library/templates/tasks/cd/clean.yaml index 9339f90e..0df4a760 100644 --- a/charts/pipelines-library/templates/tasks/cd/clean.yaml +++ b/charts/pipelines-library/templates/tasks/cd/clean.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1beta1 kind: Task metadata: @@ -45,3 +46,4 @@ spec: selector="app.edp.epam.com/stage=$(params.STAGE),app.edp.epam.com/pipeline=$(params.PIPELINE)" argocd app delete -l $selector -y +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/cd/deploy-ansible-awx.yaml b/charts/pipelines-library/templates/tasks/cd/deploy-ansible-awx.yaml index af23387e..6d828f64 100644 --- a/charts/pipelines-library/templates/tasks/cd/deploy-ansible-awx.yaml +++ b/charts/pipelines-library/templates/tasks/cd/deploy-ansible-awx.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -64,3 +65,4 @@ spec: tower-cli job launch --job-template=package-install \ --extra-vars="{\"APPLICATIONS_PAYLOAD\":${APPLICATIONS_PAYLOAD},\"STAGE\":\"${STAGE}\",\"PIPELINE\":\"${PIPELINE}\"}" \ --inventory=${PIPELINE} --wait --limit=${PIPELINE}_${STAGE} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/cd/deploy-ansible.yaml b/charts/pipelines-library/templates/tasks/cd/deploy-ansible.yaml index 6c4f7624..8949e1b6 100644 --- a/charts/pipelines-library/templates/tasks/cd/deploy-ansible.yaml +++ b/charts/pipelines-library/templates/tasks/cd/deploy-ansible.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1beta1 kind: Task metadata: @@ -183,3 +184,4 @@ spec: - name: nexus-credentials secret: secretName: ci-nexus +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/cd/deploy-applicationset-cli.yaml b/charts/pipelines-library/templates/tasks/cd/deploy-applicationset-cli.yaml index 14dfaa64..63e9d116 100644 --- a/charts/pipelines-library/templates/tasks/cd/deploy-applicationset-cli.yaml +++ b/charts/pipelines-library/templates/tasks/cd/deploy-applicationset-cli.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1beta1 kind: Task metadata: @@ -70,3 +71,4 @@ spec: argocd app sync -l $selector --prune --timeout 300 # TODO: we build our custom argocd-cli that has fixed issue with argocd app wait argocd app wait -l $selector --health --sync +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/cd/run-quality-gate.yaml b/charts/pipelines-library/templates/tasks/cd/run-quality-gate.yaml index f50edaed..1b588c6f 100644 --- a/charts/pipelines-library/templates/tasks/cd/run-quality-gate.yaml +++ b/charts/pipelines-library/templates/tasks/cd/run-quality-gate.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -46,3 +47,4 @@ spec: set -ex export KUBECONFIG="workspace/source/kube/config" $(params.EXTRA_COMMANDS) +{{ end }} diff --git "a/charts/pipelines-library/templates/tasks/cd/run-\321\201leanup-gate.yaml" "b/charts/pipelines-library/templates/tasks/cd/run-\321\201leanup-gate.yaml" index ed4f1355..fe3ec76d 100644 --- "a/charts/pipelines-library/templates/tasks/cd/run-\321\201leanup-gate.yaml" +++ "b/charts/pipelines-library/templates/tasks/cd/run-\321\201leanup-gate.yaml" @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -46,3 +47,4 @@ spec: set -ex export KUBECONFIG="workspace/source/kube/config" $(params.EXTRA_COMMANDS) +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/cdxgen.yaml b/charts/pipelines-library/templates/tasks/cdxgen.yaml index 22224a2d..6587e320 100644 --- a/charts/pipelines-library/templates/tasks/cdxgen.yaml +++ b/charts/pipelines-library/templates/tasks/cdxgen.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -49,3 +50,4 @@ spec: /opt/cdxgen/bin/cdxgen.js --api-key=$API_TOKEN --server-url=$DEPTRACK_URL --project-name=$PROJECT_NAME workingDir: $(workspaces.source.path) +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/check-helm-chart-name.yaml b/charts/pipelines-library/templates/tasks/check-helm-chart-name.yaml index e57b13f9..3defd600 100644 --- a/charts/pipelines-library/templates/tasks/check-helm-chart-name.yaml +++ b/charts/pipelines-library/templates/tasks/check-helm-chart-name.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1beta1 kind: Task metadata: @@ -36,4 +37,4 @@ spec: fi workingDir: $(workspaces.source.path) - +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/codenarc.yaml b/charts/pipelines-library/templates/tasks/codenarc.yaml index 98700523..78d4aaa1 100644 --- a/charts/pipelines-library/templates/tasks/codenarc.yaml +++ b/charts/pipelines-library/templates/tasks/codenarc.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -82,3 +83,4 @@ spec: workingDir: $(workspaces.source.path)/$(params.PROJECT_DIR) script: | cat /workspace/source/build/reports/codenarc/main.html +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/commit-validate.yaml b/charts/pipelines-library/templates/tasks/commit-validate.yaml index 8b52593d..e5ab610b 100644 --- a/charts/pipelines-library/templates/tasks/commit-validate.yaml +++ b/charts/pipelines-library/templates/tasks/commit-validate.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -73,3 +74,4 @@ spec: if len(line) > max_line_length: print(f"[TEKTON] A line in the commit message is too long. Each line should be no longer than {max_line_length} characters.") sys.exit(1) +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/create-ecr-repository.yaml b/charts/pipelines-library/templates/tasks/create-ecr-repository.yaml index bfb744f0..36a37f42 100644 --- a/charts/pipelines-library/templates/tasks/create-ecr-repository.yaml +++ b/charts/pipelines-library/templates/tasks/create-ecr-repository.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -43,3 +44,4 @@ spec: command: [ "/bin/sh" ] args: [ "-c", "echo 'Openshift cluster, create-ecr-repository stage skipped'" ] {{ end }} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/dotnet.yaml b/charts/pipelines-library/templates/tasks/dotnet.yaml index b6b59c50..0bfb8017 100644 --- a/charts/pipelines-library/templates/tasks/dotnet.yaml +++ b/charts/pipelines-library/templates/tasks/dotnet.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -83,3 +84,4 @@ spec: set -e $(params.EXTRA_COMMANDS) {{- include "resources" . | nindent 6 }} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/ecr-to-docker.yaml b/charts/pipelines-library/templates/tasks/ecr-to-docker.yaml index 9a3cec41..d52c0fe1 100644 --- a/charts/pipelines-library/templates/tasks/ecr-to-docker.yaml +++ b/charts/pipelines-library/templates/tasks/ecr-to-docker.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -104,3 +105,4 @@ spec: crane cp "${CONTAINER_REGISTRY_URL}/${CONTAINER_REGISTRY_SPACE}/${CODEBASE_NAME}:${IMAGE_TAG}" "${DOCKERHUB_IMAGE_TAGGED}" fi {{- include "resources" . | nindent 6 }} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/edp-c.yaml b/charts/pipelines-library/templates/tasks/edp-c.yaml index 6b6ed763..ebd35172 100644 --- a/charts/pipelines-library/templates/tasks/edp-c.yaml +++ b/charts/pipelines-library/templates/tasks/edp-c.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -45,3 +46,4 @@ spec: $(params.EXTRA_COMMANDS_TEST) {{- include "resources" . | nindent 6 }} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/edp-dotnet.yaml b/charts/pipelines-library/templates/tasks/edp-dotnet.yaml index 139af578..8dc3b8a0 100644 --- a/charts/pipelines-library/templates/tasks/edp-dotnet.yaml +++ b/charts/pipelines-library/templates/tasks/edp-dotnet.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -60,3 +61,4 @@ spec: do dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover "${file}"; done {{- include "resources" . | nindent 6 }} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/edp-gradle.yaml b/charts/pipelines-library/templates/tasks/edp-gradle.yaml index 513d88aa..0353a2c1 100644 --- a/charts/pipelines-library/templates/tasks/edp-gradle.yaml +++ b/charts/pipelines-library/templates/tasks/edp-gradle.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -158,3 +159,4 @@ spec: name: $(params.ci-nexus) key: url {{- include "resources" . | nindent 6 }} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/edp-npm.yaml b/charts/pipelines-library/templates/tasks/edp-npm.yaml index 1e450a92..055cbf38 100644 --- a/charts/pipelines-library/templates/tasks/edp-npm.yaml +++ b/charts/pipelines-library/templates/tasks/edp-npm.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -104,3 +105,4 @@ spec: {{ end }} {{- include "resources" . | nindent 6 }} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/edp-rpm.yaml b/charts/pipelines-library/templates/tasks/edp-rpm.yaml index d33aa29b..be581231 100644 --- a/charts/pipelines-library/templates/tasks/edp-rpm.yaml +++ b/charts/pipelines-library/templates/tasks/edp-rpm.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -96,3 +97,4 @@ spec: $(params.EXTRA_PUSH_COMMAND) {{- include "resources" . | nindent 6 }} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/gerrit-ssh-cmd.yaml b/charts/pipelines-library/templates/tasks/gerrit-ssh-cmd.yaml index ccce180b..b7dec214 100644 --- a/charts/pipelines-library/templates/tasks/gerrit-ssh-cmd.yaml +++ b/charts/pipelines-library/templates/tasks/gerrit-ssh-cmd.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -79,3 +80,4 @@ spec: fi ssh -o StrictHostKeyChecking=no -p ${GERRIT_PORT} ${USERNAME}@${GERRIT_HOST} gerrit ${SSH_GERRIT_COMMAND} || exit ${ERR_EXIT_CODE} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/get-cache.yaml b/charts/pipelines-library/templates/tasks/get-cache.yaml index 7f3ff146..b0f60c18 100644 --- a/charts/pipelines-library/templates/tasks/get-cache.yaml +++ b/charts/pipelines-library/templates/tasks/get-cache.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -63,3 +64,4 @@ spec: requests: cpu: 100m memory: 256Mi +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/getversion/defaulttype/GetVersion.yaml b/charts/pipelines-library/templates/tasks/getversion/defaulttype/GetVersion.yaml index da753fff..24fd382e 100644 --- a/charts/pipelines-library/templates/tasks/getversion/defaulttype/GetVersion.yaml +++ b/charts/pipelines-library/templates/tasks/getversion/defaulttype/GetVersion.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -58,3 +59,4 @@ spec: printf "%s" "${VCS_TAG}" > "$(results.VCS_TAG.path)" printf "%s" "${IS_TAG}" > "$(results.IS_TAG.path)" printf "%s" "${BUILD_ID}" > "$(results.VERSION.path)" +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/getversion/defaulttype/GetVersionHelm.yaml b/charts/pipelines-library/templates/tasks/getversion/defaulttype/GetVersionHelm.yaml index 933a21a4..817fec69 100644 --- a/charts/pipelines-library/templates/tasks/getversion/defaulttype/GetVersionHelm.yaml +++ b/charts/pipelines-library/templates/tasks/getversion/defaulttype/GetVersionHelm.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -46,3 +47,4 @@ spec: printf "%s" "${VCS_TAG}" > "$(results.VCS_TAG.path)" printf "%s" "${BUILD_VERSION}" > "$(results.VERSION.path)" printf "%s" "${IS_TAG}" > "$(results.IS_TAG.path)" +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/getversion/defaulttype/GetVersionRPM.yaml b/charts/pipelines-library/templates/tasks/getversion/defaulttype/GetVersionRPM.yaml index afb6b9ba..0536aa84 100644 --- a/charts/pipelines-library/templates/tasks/getversion/defaulttype/GetVersionRPM.yaml +++ b/charts/pipelines-library/templates/tasks/getversion/defaulttype/GetVersionRPM.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -49,3 +50,4 @@ spec: printf "%s" "${VERSION}" > "$(results.VERSION.path)" printf "%s" "${VCS_TAG}" > "$(results.VCS_TAG.path)" printf "%s" "${IS_TAG}" > "$(results.IS_TAG.path)" +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/getversion/defaulttype/UpdateBuildNumberDotnet.yaml b/charts/pipelines-library/templates/tasks/getversion/defaulttype/UpdateBuildNumberDotnet.yaml index f8e3c4bb..3a4d564c 100644 --- a/charts/pipelines-library/templates/tasks/getversion/defaulttype/UpdateBuildNumberDotnet.yaml +++ b/charts/pipelines-library/templates/tasks/getversion/defaulttype/UpdateBuildNumberDotnet.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -62,3 +63,4 @@ spec: DEPLOYABLE_MODULE_DIR="." printf "%s" "${DEPLOYABLE_MODULE_DIR}" > "$(results.DEPLOYABLE_MODULE_DIR.path)" +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/getversion/defaulttype/UpdateBuildNumberGradle.yaml b/charts/pipelines-library/templates/tasks/getversion/defaulttype/UpdateBuildNumberGradle.yaml index 2670d9e4..e9e5c715 100644 --- a/charts/pipelines-library/templates/tasks/getversion/defaulttype/UpdateBuildNumberGradle.yaml +++ b/charts/pipelines-library/templates/tasks/getversion/defaulttype/UpdateBuildNumberGradle.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -26,3 +27,4 @@ spec: set -ex sed -i "s/version = .*/version = \'${VERSION}\'/" build.gradle +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/getversion/defaulttype/UpdateBuildNumberNpm.yaml b/charts/pipelines-library/templates/tasks/getversion/defaulttype/UpdateBuildNumberNpm.yaml index f3c4db73..dbfcdcbd 100644 --- a/charts/pipelines-library/templates/tasks/getversion/defaulttype/UpdateBuildNumberNpm.yaml +++ b/charts/pipelines-library/templates/tasks/getversion/defaulttype/UpdateBuildNumberNpm.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -31,3 +32,4 @@ spec: BUILD_VERSION="${NPM_VERSION}-${VERSION}" npm --no-git-tag-version version ${BUILD_VERSION} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/getversion/defaulttype/UpdateBuildNumberPython.yaml b/charts/pipelines-library/templates/tasks/getversion/defaulttype/UpdateBuildNumberPython.yaml index f7af109e..4e1768f5 100644 --- a/charts/pipelines-library/templates/tasks/getversion/defaulttype/UpdateBuildNumberPython.yaml +++ b/charts/pipelines-library/templates/tasks/getversion/defaulttype/UpdateBuildNumberPython.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -28,3 +29,4 @@ spec: sed -i 's/\(__version__\s*=\s*\).*/\1'\"${VERSION}\"'/' version/__init__.py cat version/__init__.py +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/getversion/edptype/GetVersionEDP.yaml b/charts/pipelines-library/templates/tasks/getversion/edptype/GetVersionEDP.yaml index 1213412d..dbf9bbeb 100644 --- a/charts/pipelines-library/templates/tasks/getversion/edptype/GetVersionEDP.yaml +++ b/charts/pipelines-library/templates/tasks/getversion/edptype/GetVersionEDP.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -89,3 +90,4 @@ spec: printf "%s" "${DEPLOYABLE_MODULE_DIR}" > "$(results.DEPLOYABLE_MODULE_DIR.path)" printf "%s" "${NUMERIC_VERSION}" > "$(results.NUMERIC_VERSION.path)" printf "%s" "${SUFFIX}" > "$(results.SUFFIX.path)" +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/getversion/edptype/UpdateBuildNumberCsharp.yaml b/charts/pipelines-library/templates/tasks/getversion/edptype/UpdateBuildNumberCsharp.yaml index bc100968..8108ef8c 100644 --- a/charts/pipelines-library/templates/tasks/getversion/edptype/UpdateBuildNumberCsharp.yaml +++ b/charts/pipelines-library/templates/tasks/getversion/edptype/UpdateBuildNumberCsharp.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -27,3 +28,4 @@ spec: DEPLOYABLE_MODULE=$(find ./ -name '*.csproj') sed -i "s#\(\).*\(\)#\1${VERSION}\2#" ${DEPLOYABLE_MODULE} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/getversion/edptype/UpdateBuildNumberDotnet.yaml b/charts/pipelines-library/templates/tasks/getversion/edptype/UpdateBuildNumberDotnet.yaml index 851c6ebf..209490f4 100644 --- a/charts/pipelines-library/templates/tasks/getversion/edptype/UpdateBuildNumberDotnet.yaml +++ b/charts/pipelines-library/templates/tasks/getversion/edptype/UpdateBuildNumberDotnet.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -27,3 +28,4 @@ spec: DEPLOYABLE_MODULE=$(find ./ -name '*.csproj' | xargs awk -F '[><]' '// {print $3}') sed -i "s#\(\).*\(\)#\1${VERSION}\2#" ${DEPLOYABLE_MODULE}/${DEPLOYABLE_MODULE}.csproj +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/getversion/edptype/UpdateBuildNumberGradle.yaml b/charts/pipelines-library/templates/tasks/getversion/edptype/UpdateBuildNumberGradle.yaml index e91d3a26..aaba58e1 100644 --- a/charts/pipelines-library/templates/tasks/getversion/edptype/UpdateBuildNumberGradle.yaml +++ b/charts/pipelines-library/templates/tasks/getversion/edptype/UpdateBuildNumberGradle.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -37,3 +38,4 @@ spec: else sed -i "s/^version = .*/version = \'${BRANCH_VERSION}\'/" build.gradle fi +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/getversion/edptype/UpdateBuildNumberHelmChart.yaml b/charts/pipelines-library/templates/tasks/getversion/edptype/UpdateBuildNumberHelmChart.yaml index 0a40fc6c..51eefef7 100644 --- a/charts/pipelines-library/templates/tasks/getversion/edptype/UpdateBuildNumberHelmChart.yaml +++ b/charts/pipelines-library/templates/tasks/getversion/edptype/UpdateBuildNumberHelmChart.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -32,3 +33,4 @@ spec: set -ex sed -i "s/^version: .*$/version: ${VERSION}/" ${CHART_DIR}/Chart.yaml +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/getversion/edptype/UpdateBuildNumberNpm.yaml b/charts/pipelines-library/templates/tasks/getversion/edptype/UpdateBuildNumberNpm.yaml index 39b03dcc..f8bca482 100644 --- a/charts/pipelines-library/templates/tasks/getversion/edptype/UpdateBuildNumberNpm.yaml +++ b/charts/pipelines-library/templates/tasks/getversion/edptype/UpdateBuildNumberNpm.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -32,3 +33,4 @@ spec: set -ex npm --no-git-tag-version version ${BRANCH_VERSION}-${BUILD_ID} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/getversion/edptype/UpdateBuildNumberPython.yaml b/charts/pipelines-library/templates/tasks/getversion/edptype/UpdateBuildNumberPython.yaml index a43d825a..66d2b426 100644 --- a/charts/pipelines-library/templates/tasks/getversion/edptype/UpdateBuildNumberPython.yaml +++ b/charts/pipelines-library/templates/tasks/getversion/edptype/UpdateBuildNumberPython.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -31,3 +32,4 @@ spec: sed -i 's/\(__version__\s*=\s*\).*/\1'\"${VERSION}\"'/' version/__init__.py fi cat version/__init__.py +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/git-cli.yaml b/charts/pipelines-library/templates/tasks/git-cli.yaml index f69a3f52..f4f108b4 100644 --- a/charts/pipelines-library/templates/tasks/git-cli.yaml +++ b/charts/pipelines-library/templates/tasks/git-cli.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -141,3 +142,4 @@ spec: fi # Make sure we don't add a trailing newline to the result! printf "%s" "$RESULT_SHA" > "$(results.commit.path)" +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/git-clone.yaml b/charts/pipelines-library/templates/tasks/git-clone.yaml index 8fa5df7c..44eeac03 100644 --- a/charts/pipelines-library/templates/tasks/git-clone.yaml +++ b/charts/pipelines-library/templates/tasks/git-clone.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -236,3 +237,4 @@ spec: fi printf "%s" "${RESULT_SHA}" > "$(results.commit.path)" printf "%s" "${PARAM_URL}" > "$(results.url.path)" +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/github-set-status.yaml b/charts/pipelines-library/templates/tasks/github-set-status.yaml index c9440ffc..6d3f9d5f 100644 --- a/charts/pipelines-library/templates/tasks/github-set-status.yaml +++ b/charts/pipelines-library/templates/tasks/github-set-status.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -176,3 +177,4 @@ spec: state=os.getenv("STATE"), repo=os.getenv("REPO_FULL_NAME"), sha=os.getenv("SHA"))) +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/gitlab-set-status.yaml b/charts/pipelines-library/templates/tasks/gitlab-set-status.yaml index 22990bd6..10f2f8aa 100644 --- a/charts/pipelines-library/templates/tasks/gitlab-set-status.yaml +++ b/charts/pipelines-library/templates/tasks/gitlab-set-status.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -145,3 +146,4 @@ spec: secretKeyRef: name: $(params.GITLAB_TOKEN_SECRET_NAME) key: $(params.GITLAB_TOKEN_SECRET_KEY) +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/go.yaml b/charts/pipelines-library/templates/tasks/go.yaml index c1aee034..3bbaef16 100644 --- a/charts/pipelines-library/templates/tasks/go.yaml +++ b/charts/pipelines-library/templates/tasks/go.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -82,3 +83,4 @@ spec: - name: GOPROXY value: "$(params.GOPROXY)" {{- include "resources" . | nindent 6 }} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/gradle.yaml b/charts/pipelines-library/templates/tasks/gradle.yaml index 6a39fb2e..9951b96a 100644 --- a/charts/pipelines-library/templates/tasks/gradle.yaml +++ b/charts/pipelines-library/templates/tasks/gradle.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -109,3 +110,4 @@ spec: key: RELEASES_REPO_PATH optional: true {{- include "resources" . | nindent 6 }} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/hadolint.yaml b/charts/pipelines-library/templates/tasks/hadolint.yaml index 155491eb..77c27b06 100644 --- a/charts/pipelines-library/templates/tasks/hadolint.yaml +++ b/charts/pipelines-library/templates/tasks/hadolint.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -45,3 +46,4 @@ spec: script: | set -e hadolint "$DOCKERFILE" -f "$OFORMAT" +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/helm-dependency-update.yaml b/charts/pipelines-library/templates/tasks/helm-dependency-update.yaml index 3ab3545b..6313a719 100644 --- a/charts/pipelines-library/templates/tasks/helm-dependency-update.yaml +++ b/charts/pipelines-library/templates/tasks/helm-dependency-update.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -45,3 +46,4 @@ spec: set -ex helm dependency update ${CHART_DIR} ${EXTRA_PARAMS} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/helm-docs.yaml b/charts/pipelines-library/templates/tasks/helm-docs.yaml index 562fc364..b5d4cdbf 100644 --- a/charts/pipelines-library/templates/tasks/helm-docs.yaml +++ b/charts/pipelines-library/templates/tasks/helm-docs.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -61,3 +62,4 @@ spec: git config --global --add safe.directory $(pwd) git diff -s --exit-code ${CHART_DIR}/README.md || (echo "Run 'helm-docs' to address the issue." && git diff && exit 1) +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/helm-libraries/helm-dependency-update-lib.yaml b/charts/pipelines-library/templates/tasks/helm-libraries/helm-dependency-update-lib.yaml index d4be44f1..f623754a 100644 --- a/charts/pipelines-library/templates/tasks/helm-libraries/helm-dependency-update-lib.yaml +++ b/charts/pipelines-library/templates/tasks/helm-libraries/helm-dependency-update-lib.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -50,3 +51,4 @@ spec: do helm dependency update $i ${EXTRA_PARAMS} done +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/helm-libraries/helm-docs-lib.yaml b/charts/pipelines-library/templates/tasks/helm-libraries/helm-docs-lib.yaml index ea709fd4..80abcf09 100644 --- a/charts/pipelines-library/templates/tasks/helm-libraries/helm-docs-lib.yaml +++ b/charts/pipelines-library/templates/tasks/helm-libraries/helm-docs-lib.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -71,3 +72,4 @@ spec: do git diff -s --exit-code ${CHART_DIR}/${i}/README.md || (echo "Run 'helm-docs' to address the issue." && git diff && exit 1) done +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/helm-libraries/helm-lint-lib.yaml b/charts/pipelines-library/templates/tasks/helm-libraries/helm-lint-lib.yaml index c4c643f0..c4b33b2d 100644 --- a/charts/pipelines-library/templates/tasks/helm-libraries/helm-lint-lib.yaml +++ b/charts/pipelines-library/templates/tasks/helm-libraries/helm-lint-lib.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -105,3 +106,4 @@ spec: volumeMounts: - name: ct-config-volume mountPath: /workspace/source/ct-configs/ +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/helm-libraries/helm-push-lib.yaml b/charts/pipelines-library/templates/tasks/helm-libraries/helm-push-lib.yaml index a3d6b131..ddd63514 100644 --- a/charts/pipelines-library/templates/tasks/helm-libraries/helm-push-lib.yaml +++ b/charts/pipelines-library/templates/tasks/helm-libraries/helm-push-lib.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -130,3 +131,4 @@ spec: - mountPath: /.config/helm/registry name: dockerconfig {{- include "resources" . | nindent 6 }} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/helm-libraries/helm-template-lib.yaml b/charts/pipelines-library/templates/tasks/helm-libraries/helm-template-lib.yaml index 64269820..6a8d9840 100644 --- a/charts/pipelines-library/templates/tasks/helm-libraries/helm-template-lib.yaml +++ b/charts/pipelines-library/templates/tasks/helm-libraries/helm-template-lib.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -59,3 +60,4 @@ spec: helm template ${RELEASE_NAME} ${i} ${TEMPLATE_EXTRA_PARAMS} $(params.extra_commands) done +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/helm-lint.yaml b/charts/pipelines-library/templates/tasks/helm-lint.yaml index 86c39d1d..8eb7f3c4 100644 --- a/charts/pipelines-library/templates/tasks/helm-lint.yaml +++ b/charts/pipelines-library/templates/tasks/helm-lint.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -90,3 +91,4 @@ spec: volumeMounts: - name: ct-config-volume mountPath: /workspace/source/ct-configs/ +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/helm-push.yaml b/charts/pipelines-library/templates/tasks/helm-push.yaml index 7e49eb36..6eb93079 100644 --- a/charts/pipelines-library/templates/tasks/helm-push.yaml +++ b/charts/pipelines-library/templates/tasks/helm-push.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -120,3 +121,4 @@ spec: - mountPath: /.config/helm/registry name: dockerconfig {{- include "resources" . | nindent 6 }} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/helm-template.yaml b/charts/pipelines-library/templates/tasks/helm-template.yaml index 7cf339e5..d4e3b433 100644 --- a/charts/pipelines-library/templates/tasks/helm-template.yaml +++ b/charts/pipelines-library/templates/tasks/helm-template.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -54,3 +55,4 @@ spec: helm template ${RELEASE_NAME} ${CHART_DIR} ${TEMPLATE_EXTRA_PARAMS} $(params.extra_commands) +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/image-scan.yaml b/charts/pipelines-library/templates/tasks/image-scan.yaml index f91889a6..99fab205 100644 --- a/charts/pipelines-library/templates/tasks/image-scan.yaml +++ b/charts/pipelines-library/templates/tasks/image-scan.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -126,3 +127,4 @@ spec: -H "Authorization: bearer ${RP_TOKEN}" \ -F "file=@${REPORT_ARCHIVE_NAME};type=application/x-zip-compressed" done +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/init-values.yaml b/charts/pipelines-library/templates/tasks/init-values.yaml index 28fa3dae..5111bfde 100644 --- a/charts/pipelines-library/templates/tasks/init-values.yaml +++ b/charts/pipelines-library/templates/tasks/init-values.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -45,3 +46,4 @@ spec: resultImageName="${CODEBASE}-$(echo ${BRANCH//[^a-zA-Z0-9]/-} | tr '[:upper:]' '[:lower:]')" printf "%s" "${resultImageName}" > "$(results.RESULT_IMAGE_NAME.path)" +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/kaniko-dockerbuild-verify.yaml b/charts/pipelines-library/templates/tasks/kaniko-dockerbuild-verify.yaml index 8d8ce822..59353740 100644 --- a/charts/pipelines-library/templates/tasks/kaniko-dockerbuild-verify.yaml +++ b/charts/pipelines-library/templates/tasks/kaniko-dockerbuild-verify.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -84,3 +85,4 @@ spec: securityContext: runAsUser: 0 {{- include "resources" . | nindent 6 }} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/kaniko.yaml b/charts/pipelines-library/templates/tasks/kaniko.yaml index 9e43eb33..d27bccb0 100644 --- a/charts/pipelines-library/templates/tasks/kaniko.yaml +++ b/charts/pipelines-library/templates/tasks/kaniko.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -168,3 +169,4 @@ spec: script: | set -e echo -n "${CONTAINER_REGISTRY_URL}/${CONTAINER_REGISTRY_SPACE}/${CODEBASE_NAME}:${IMAGE_TAG}" | tee "$(results.IMAGE_URL.path)" +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/maven-get-module.yaml b/charts/pipelines-library/templates/tasks/maven-get-module.yaml index aa055999..9d123707 100644 --- a/charts/pipelines-library/templates/tasks/maven-get-module.yaml +++ b/charts/pipelines-library/templates/tasks/maven-get-module.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -33,3 +34,4 @@ spec: echo "Deployable module directory: ${DEPLOYABLE_MODULE_DIR}" printf "%s" "${DEPLOYABLE_MODULE_DIR}" > "$(results.DEPLOYABLE_MODULE_DIR.path)" +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/maven.yaml b/charts/pipelines-library/templates/tasks/maven.yaml index 261caf23..8590b76e 100644 --- a/charts/pipelines-library/templates/tasks/maven.yaml +++ b/charts/pipelines-library/templates/tasks/maven.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -85,3 +86,4 @@ spec: name: $(params.ci-nexus) key: password {{- include "resources" . | nindent 6 }} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/npm.yaml b/charts/pipelines-library/templates/tasks/npm.yaml index 27f6b5a8..6a6471d4 100644 --- a/charts/pipelines-library/templates/tasks/npm.yaml +++ b/charts/pipelines-library/templates/tasks/npm.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -73,3 +74,4 @@ spec: $(params.EXTRA_COMMANDS) {{- include "resources" . | nindent 6 }} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/opa.yaml b/charts/pipelines-library/templates/tasks/opa.yaml index 48efc557..634cc723 100644 --- a/charts/pipelines-library/templates/tasks/opa.yaml +++ b/charts/pipelines-library/templates/tasks/opa.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -65,3 +66,4 @@ spec: script: | set -e $(params.EXTRA_COMMANDS) +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/promote-images.yaml b/charts/pipelines-library/templates/tasks/promote-images.yaml index 49aff706..2026cf26 100644 --- a/charts/pipelines-library/templates/tasks/promote-images.yaml +++ b/charts/pipelines-library/templates/tasks/promote-images.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -90,3 +91,4 @@ spec: fi fi done +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/push-to-jira.yaml b/charts/pipelines-library/templates/tasks/push-to-jira.yaml index bc8eb84d..6ab8d057 100644 --- a/charts/pipelines-library/templates/tasks/push-to-jira.yaml +++ b/charts/pipelines-library/templates/tasks/push-to-jira.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -174,3 +175,4 @@ spec: os.system(f"kubectl apply -f - << EOF\n{template_json}\nEOF") print("[TEKTON][DEBUG] JiraIssueMetadata CR has been created") +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/python.yaml b/charts/pipelines-library/templates/tasks/python.yaml index b9d7f208..672486c9 100644 --- a/charts/pipelines-library/templates/tasks/python.yaml +++ b/charts/pipelines-library/templates/tasks/python.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -128,3 +129,4 @@ spec: $(params.EXTRA_COMMANDS) {{- include "resources" . | nindent 6 }} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/save-cache.yaml b/charts/pipelines-library/templates/tasks/save-cache.yaml index 3c5451ad..d66b1dad 100644 --- a/charts/pipelines-library/templates/tasks/save-cache.yaml +++ b/charts/pipelines-library/templates/tasks/save-cache.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -68,3 +69,4 @@ spec: requests: cpu: 100m memory: 1Gi +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/security.yaml b/charts/pipelines-library/templates/tasks/security.yaml index 63510a39..969f0cbe 100644 --- a/charts/pipelines-library/templates/tasks/security.yaml +++ b/charts/pipelines-library/templates/tasks/security.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -139,3 +140,4 @@ spec: /opt/cdxgen/bin/cdxgen.js --api-key=$API_TOKEN --server-url=$DEPTRACK_URL --project-name=$PROJECT_NAME --project-version=$PROJECT_BRANCH workingDir: $(workspaces.source.path) +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/send-to-microsoft-teams.yaml b/charts/pipelines-library/templates/tasks/send-to-microsoft-teams.yaml index f92c340e..12c95029 100644 --- a/charts/pipelines-library/templates/tasks/send-to-microsoft-teams.yaml +++ b/charts/pipelines-library/templates/tasks/send-to-microsoft-teams.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -34,3 +35,4 @@ spec: key: $(params.webhook-url-secret-key) - name: MESSAGE value: $(params.message) +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/sonar/sonarqube-dotnet.yaml b/charts/pipelines-library/templates/tasks/sonar/sonarqube-dotnet.yaml index bad2ef91..acfb4107 100644 --- a/charts/pipelines-library/templates/tasks/sonar/sonarqube-dotnet.yaml +++ b/charts/pipelines-library/templates/tasks/sonar/sonarqube-dotnet.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -146,3 +147,4 @@ spec: set -e $(params.EXTRA_COMMANDS) {{- include "resources" . | nindent 6 }} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/sonar/sonarqube-general.yaml b/charts/pipelines-library/templates/tasks/sonar/sonarqube-general.yaml index 0e332573..f2ca381c 100644 --- a/charts/pipelines-library/templates/tasks/sonar/sonarqube-general.yaml +++ b/charts/pipelines-library/templates/tasks/sonar/sonarqube-general.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -196,3 +197,4 @@ spec: command: - sonar-scanner {{- include "resources" . | nindent 6 }} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/sonar/sonarqube-gradle.yaml b/charts/pipelines-library/templates/tasks/sonar/sonarqube-gradle.yaml index a3489859..374dbdd9 100644 --- a/charts/pipelines-library/templates/tasks/sonar/sonarqube-gradle.yaml +++ b/charts/pipelines-library/templates/tasks/sonar/sonarqube-gradle.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -173,3 +174,4 @@ spec: name: $(params.ci-nexus) key: url {{- include "resources" . | nindent 6 }} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/sonar/sonarqube-maven.yaml b/charts/pipelines-library/templates/tasks/sonar/sonarqube-maven.yaml index 62ebe48a..a9ef7fc5 100644 --- a/charts/pipelines-library/templates/tasks/sonar/sonarqube-maven.yaml +++ b/charts/pipelines-library/templates/tasks/sonar/sonarqube-maven.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -159,3 +160,4 @@ spec: name: $(params.ci-nexus) key: password {{- include "resources" . | nindent 6 }} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/terraform-check.yaml b/charts/pipelines-library/templates/tasks/terraform-check.yaml index 17aaa34d..611668f1 100644 --- a/charts/pipelines-library/templates/tasks/terraform-check.yaml +++ b/charts/pipelines-library/templates/tasks/terraform-check.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -35,3 +36,4 @@ spec: securityContext: runAsUser: 0 {{- include "resources" . | nindent 6 }} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/terraform.yaml b/charts/pipelines-library/templates/tasks/terraform.yaml index 56a4766f..9afbfb74 100644 --- a/charts/pipelines-library/templates/tasks/terraform.yaml +++ b/charts/pipelines-library/templates/tasks/terraform.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -42,3 +43,4 @@ spec: - name: TFENV_TERRAFORM_VERSION value: $(params.TFENV_TERRAFORM_VERSION) {{- include "resources" . | nindent 6 }} +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/trivy-scan.yaml b/charts/pipelines-library/templates/tasks/trivy-scan.yaml index 7b2b9d76..ff97e08c 100644 --- a/charts/pipelines-library/templates/tasks/trivy-scan.yaml +++ b/charts/pipelines-library/templates/tasks/trivy-scan.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -37,3 +38,4 @@ spec: set -e trivy image --scanners vuln --severity HIGH,CRITICAL "${TARGET_IMAGE}" +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/update-cbb.yaml b/charts/pipelines-library/templates/tasks/update-cbb.yaml index 95635ce0..6646fd82 100644 --- a/charts/pipelines-library/templates/tasks/update-cbb.yaml +++ b/charts/pipelines-library/templates/tasks/update-cbb.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -33,3 +34,4 @@ spec: --subresource=status \ --type=merge \ -p "{\"status\": {\"lastSuccessfulBuild\": \"${CURRENT_BUILD_NUMBER}\"}}" +{{ end }} diff --git a/charts/pipelines-library/templates/tasks/update-cbis.yaml b/charts/pipelines-library/templates/tasks/update-cbis.yaml index ebef1642..7c99c230 100644 --- a/charts/pipelines-library/templates/tasks/update-cbis.yaml +++ b/charts/pipelines-library/templates/tasks/update-cbis.yaml @@ -1,3 +1,4 @@ +{{ if .Values.pipelines.deployableResources.tasks }} apiVersion: tekton.dev/v1 kind: Task metadata: @@ -42,3 +43,4 @@ spec: echo "[TEKTON][DEBUG] ImageStream ${CBIS_NAME} doesn't contain ${IMAGE_TAG} tag ... it will be added." kubectl patch cbis.v2.edp.epam.com ${CBIS_NAME} --type json -p="[{\"op\": \"add\", \"path\": \"/spec/tags/-\", \"value\": ${newcbisTag} }]" fi +{{ end }} diff --git a/charts/pipelines-library/tests/test_dotnet_pipelines.py b/charts/pipelines-library/tests/test_dotnet_pipelines.py index e243a379..a64e00ad 100644 --- a/charts/pipelines-library/tests/test_dotnet_pipelines.py +++ b/charts/pipelines-library/tests/test_dotnet_pipelines.py @@ -6,6 +6,11 @@ def test_dotnet_pipelines_harbor_gerrit(): global: gitProviders: - gerrit +pipelines: + deployableResources: + cs: + dotnet3.1: true + dotnet6.0: true """ ht = helm_template(config) @@ -106,6 +111,11 @@ def test_dotnet_pipelines_harbor_gitlab(): global: gitProviders: - gitlab +pipelines: + deployableResources: + cs: + dotnet3.1: true + dotnet6.0: true """ ht = helm_template(config) @@ -204,6 +214,11 @@ def test_dotnet_pipelines_harbor_github(): global: gitProviders: - github +pipelines: + deployableResources: + cs: + dotnet3.1: true + dotnet6.0: true """ ht = helm_template(config) @@ -301,6 +316,11 @@ def test_dotnet_pipelines_harbor_bitbucket(): global: gitProviders: - bitbucket +pipelines: + deployableResources: + cs: + dotnet3.1: true + dotnet6.0: true """ ht = helm_template(config) diff --git a/charts/pipelines-library/tests/test_java_autotest_gradle_pipelines.py b/charts/pipelines-library/tests/test_java_autotest_gradle_pipelines.py index 2a6eeade..e0c32f22 100644 --- a/charts/pipelines-library/tests/test_java_autotest_gradle_pipelines.py +++ b/charts/pipelines-library/tests/test_java_autotest_gradle_pipelines.py @@ -6,6 +6,10 @@ def test_java_pipelines_gerrit(): global: gitProviders: - gerrit +pipelines: + deployableResources: + java: + java8: true """ r = helm_template(config) @@ -57,6 +61,10 @@ def test_java_pipelines_github(): global: gitProviders: - github +pipelines: + deployableResources: + java: + java8: true """ r = helm_template(config) @@ -64,7 +72,7 @@ def test_java_pipelines_github(): # ensure pipelines have proper steps for buildtool in ['gradle']: - for framework in ['java11', 'java8']: + for framework in ['java17', 'java11', 'java8']: for cbtype in ['aut']: github_review_pipeline = f"{vcs}-{buildtool}-{framework}-{cbtype}-review" @@ -107,6 +115,10 @@ def test_java_pipelines_gitlab(): global: gitProviders: - gitlab +pipelines: + deployableResources: + java: + java8: true """ r = helm_template(config) @@ -157,6 +169,10 @@ def test_java_pipelines_bitbucket(): global: gitProviders: - bitbucket +pipelines: + deployableResources: + java: + java8: true """ r = helm_template(config) diff --git a/charts/pipelines-library/tests/test_java_autotest_maven_pipelines.py b/charts/pipelines-library/tests/test_java_autotest_maven_pipelines.py index 5f5fd717..2e06e980 100644 --- a/charts/pipelines-library/tests/test_java_autotest_maven_pipelines.py +++ b/charts/pipelines-library/tests/test_java_autotest_maven_pipelines.py @@ -6,6 +6,10 @@ def test_java_pipelines_gerrit(): global: gitProviders: - gerrit +pipelines: + deployableResources: + java: + java8: true """ r = helm_template(config) @@ -58,6 +62,10 @@ def test_java_pipelines_github(): global: gitProviders: - github +pipelines: + deployableResources: + java: + java8: true """ r = helm_template(config) @@ -109,6 +117,10 @@ def test_java_pipelines_gitlab(): global: gitProviders: - gitlab +pipelines: + deployableResources: + java: + java8: true """ r = helm_template(config) @@ -160,6 +172,10 @@ def test_java_pipelines_bitbucket(): global: gitProviders: - bitbucket +pipelines: + deployableResources: + java: + java8: true """ r = helm_template(config) diff --git a/charts/pipelines-library/tests/test_java_gradle_pipelines.py b/charts/pipelines-library/tests/test_java_gradle_pipelines.py index 6fdbba99..de798708 100644 --- a/charts/pipelines-library/tests/test_java_gradle_pipelines.py +++ b/charts/pipelines-library/tests/test_java_gradle_pipelines.py @@ -6,6 +6,10 @@ def test_java_gradle_pipelines_harbor_gerrit(): global: gitProviders: - gerrit +pipelines: + deployableResources: + java: + java8: true """ r = helm_template(config) @@ -105,6 +109,10 @@ def test_java_gradle_pipelines_harbor_github(): global: gitProviders: - github +pipelines: + deployableResources: + java: + java8: true """ r = helm_template(config) @@ -201,6 +209,10 @@ def test_java_gradle_pipelines_harbor_gitlab(): global: gitProviders: - gitlab +pipelines: + deployableResources: + java: + java8: true """ r = helm_template(config) # ensure pipelines have proper steps @@ -290,6 +302,10 @@ def test_java_gradle_pipelines_harbor_bitbucket(): global: gitProviders: - bitbucket +pipelines: + deployableResources: + java: + java8: true """ r = helm_template(config) # ensure pipelines have proper steps diff --git a/charts/pipelines-library/tests/test_java_maven_pipelines.py b/charts/pipelines-library/tests/test_java_maven_pipelines.py index 26908fcb..0614bf6d 100644 --- a/charts/pipelines-library/tests/test_java_maven_pipelines.py +++ b/charts/pipelines-library/tests/test_java_maven_pipelines.py @@ -6,6 +6,10 @@ def test_java_maven_pipelines_harbor_gerrit(): global: gitProviders: - gerrit +pipelines: + deployableResources: + java: + java8: true """ r = helm_template(config) @@ -143,6 +147,10 @@ def test_java_maven_pipelines_harbor_github(): global: gitProviders: - github +pipelines: + deployableResources: + java: + java8: true """ r = helm_template(config) @@ -277,6 +285,10 @@ def test_java_maven_pipelines_harbor_gitlab(): global: gitProviders: - gitlab +pipelines: + deployableResources: + java: + java8: true """ r = helm_template(config) @@ -410,6 +422,10 @@ def test_java_maven_pipelines_harbor_bitbucket(): global: gitProviders: - bitbucket +pipelines: + deployableResources: + java: + java8: true """ r = helm_template(config) diff --git a/charts/pipelines-library/tests/test_opa_pipelines.py b/charts/pipelines-library/tests/test_opa_pipelines.py index 911ef4ef..eb8d2a7a 100644 --- a/charts/pipelines-library/tests/test_opa_pipelines.py +++ b/charts/pipelines-library/tests/test_opa_pipelines.py @@ -6,6 +6,9 @@ def test_opa_pipelines_gerrit(): global: gitProviders: - gerrit +pipelines: + deployableResources: + opa: true """ r = helm_template(config) @@ -63,6 +66,9 @@ def test_opa_pipelines_github(): global: gitProviders: - github +pipelines: + deployableResources: + opa: true """ r = helm_template(config) @@ -117,6 +123,9 @@ def test_opa_pipelines_gitlab(): global: gitProviders: - gitlab +pipelines: + deployableResources: + opa: true """ r = helm_template(config) @@ -171,6 +180,9 @@ def test_opa_pipelines_bitbucket(): global: gitProviders: - bitbucket +pipelines: + deployableResources: + opa: true """ r = helm_template(config) diff --git a/charts/pipelines-library/tests/test_python_pipelines.py b/charts/pipelines-library/tests/test_python_pipelines.py index ec2d7029..412e1b7c 100644 --- a/charts/pipelines-library/tests/test_python_pipelines.py +++ b/charts/pipelines-library/tests/test_python_pipelines.py @@ -7,6 +7,10 @@ def test_python_common_pipelines_harbor_gerrit(): global: gitProviders: - gerrit +pipelines: + deployableResources: + python: + python3.8: true """ r = helm_template(config) @@ -110,6 +114,10 @@ def test_python_common_pipelines_harbor_github(): global: gitProviders: - github +pipelines: + deployableResources: + python: + python3.8: true """ r = helm_template(config) @@ -211,6 +219,10 @@ def test_python_common_pipelines_harbor_gitlab(): global: gitProviders: - gitlab +pipelines: + deployableResources: + python: + python3.8: true """ r = helm_template(config) @@ -311,6 +323,10 @@ def test_python_common_pipelines_harbor_bitbucket(): global: gitProviders: - bitbucket +pipelines: + deployableResources: + python: + python3.8: true """ r = helm_template(config) @@ -413,6 +429,10 @@ def test_python_pipelines_harbor_gerrit(framework): global: gitProviders: - gerrit +pipelines: + deployableResources: + python: + python3.8: true """ ht = helm_template(config) @@ -495,6 +515,10 @@ def test_python_pipelines_harbor_gitlab(framework): global: gitProviders: - gitlab +pipelines: + deployableResources: + python: + python3.8: true """ ht = helm_template(config) @@ -574,6 +598,10 @@ def test_python_pipelines_harbor_bitbucket(framework): global: gitProviders: - bitbucket +pipelines: + deployableResources: + python: + python3.8: true """ ht = helm_template(config) @@ -654,6 +682,10 @@ def test_python_pipelines_harbor_github(framework): global: gitProviders: - github +pipelines: + deployableResources: + python: + python3.8: true """ ht = helm_template(config) @@ -735,6 +767,10 @@ def test_ansible_pipelines_gerrit(): global: gitProviders: - gerrit +pipelines: + deployableResources: + python: + python3.8: true """ r = helm_template(config) @@ -793,6 +829,10 @@ def test_ansible_pipelines_github(): global: gitProviders: - github +pipelines: + deployableResources: + python: + python3.8: true """ r = helm_template(config) @@ -850,6 +890,10 @@ def test_ansible_pipelines_gitlab(): global: gitProviders: - gitlab +pipelines: + deployableResources: + python: + python3.8: true """ r = helm_template(config) @@ -907,6 +951,10 @@ def test_ansible_pipelines_bitbucket(): global: gitProviders: - bitbucket +pipelines: + deployableResources: + python: + python3.8: true """ r = helm_template(config) diff --git a/charts/pipelines-library/values.yaml b/charts/pipelines-library/values.yaml index 8f9fdc1e..51445e52 100644 --- a/charts/pipelines-library/values.yaml +++ b/charts/pipelines-library/values.yaml @@ -10,6 +10,47 @@ pipelines: # -- Registry for tekton pipelines images. Default: docker.io registry: "docker.io" + # -- This section contains the list of pipelines and tasks that will be installed. + deployableResources: + # -- This flag control the installation of the tasks. + tasks: true + # -- This flag control the installation of the Deploy pipelines. + deploy: true + # -- This section control the installation of the review and build pipelines. + c: + cmake: true + make: true + cs: + dotnet3.1: false + dotnet6.0: false + docker: true + groovy: true + go: + beego: true + gin: true + operatorsdk: true + helm: true + helm-pipeline: true + infrastructure: true + java: + java8: false + java11: true + java17: true + js: + angular: true + antora: true + express: true + next: true + react: true + vue: true + opa: false + python: + ansible: true + flask: true + fastapi: true + python3.8: false + terraform: true + global: # By defining gitProviders you install the corresponding Kubernetes resources for the selected Git Provider: # Pipelines, EventListener, Tasks, etc.