diff --git a/charts/common-library/Chart.yaml b/charts/common-library/Chart.yaml index bc5f222b..d9d86f82 100644 --- a/charts/common-library/Chart.yaml +++ b/charts/common-library/Chart.yaml @@ -3,8 +3,8 @@ description: A Helm chart library with common components for KubeRocketCI Tekton home: https://docs.kuberocketci.io name: edp-tekton-common-library type: library -version: 0.3.6 -appVersion: 0.3.6 +version: 0.3.7 +appVersion: 0.3.7 icon: https://docs.kuberocketci.io/img/logo.svg keywords: - edp diff --git a/charts/common-library/README.md b/charts/common-library/README.md index b12bd92a..5ffa4cce 100644 --- a/charts/common-library/README.md +++ b/charts/common-library/README.md @@ -1,6 +1,6 @@ # edp-tekton-common-library -![Version: 0.3.6](https://img.shields.io/badge/Version-0.3.6-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) ![AppVersion: 0.3.6](https://img.shields.io/badge/AppVersion-0.3.6-informational?style=flat-square) +![Version: 0.3.7](https://img.shields.io/badge/Version-0.3.7-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) ![AppVersion: 0.3.7](https://img.shields.io/badge/AppVersion-0.3.7-informational?style=flat-square) [![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/epmdedp)](https://artifacthub.io/packages/search?repo=epmdedp) A Helm chart library with common components for KubeRocketCI Tekton Pipelines diff --git a/charts/common-library/templates/_common_bitbucket.yaml b/charts/common-library/templates/_common_bitbucket.yaml index 2abb9f98..871141e8 100644 --- a/charts/common-library/templates/_common_bitbucket.yaml +++ b/charts/common-library/templates/_common_bitbucket.yaml @@ -12,13 +12,17 @@ - name: TARGET_URL value: $(params.pipelineUrl) - name: DESCRIPTION - value: "Managed by KubeRocketCI. Run with Tekton" + value: "Review Pipeline" - name: STATE value: "INPROGRESS" - name: BITBUCKET_TOKEN_SECRET_NAME value: ci-bitbucket - name: BITBUCKET_TOKEN_SECRET_KEY value: token + - name: KEY + value: "Review" + - name: NAME + value: "Pipeline" - name: fetch-repository taskRef: @@ -55,6 +59,66 @@ {{- end -}} +# final section for bitbucket build pipelines +{{- define "bitbucket-build-vote" -}} +- name: bitbucket-set-success-status + when: + - input: "$(tasks.status)" + operator: in + values: ["Succeeded"] + taskRef: + kind: Task + name: bitbucket-set-status + params: + - name: REPO_FULL_NAME + value: $(params.gitfullrepositoryname) + - name: SHA + value: "$(params.git-source-revision)" + - name: TARGET_URL + value: $(params.pipelineUrl) + - name: DESCRIPTION + value: "Build Pipeline" + - name: STATE + value: "SUCCESSFUL" + - name: BITBUCKET_TOKEN_SECRET_NAME + value: ci-bitbucket + - name: BITBUCKET_TOKEN_SECRET_KEY + value: token + - name: KEY + value: "Build" + - name: NAME + value: "Pipeline (PASSED)" + +- name: bitbucket-set-failure-status + when: + - input: "$(tasks.status)" + operator: in + values: ["Failed"] + taskRef: + kind: Task + name: bitbucket-set-status + params: + - name: REPO_FULL_NAME + value: $(params.gitfullrepositoryname) + - name: SHA + value: "$(params.git-source-revision)" + - name: TARGET_URL + value: $(params.pipelineUrl) + - name: DESCRIPTION + value: "Build Pipeline" + - name: STATE + value: "FAILED" + - name: BITBUCKET_TOKEN_SECRET_NAME + value: ci-bitbucket + - name: BITBUCKET_TOKEN_SECRET_KEY + value: token + - name: KEY + value: "Build" + - name: NAME + value: "Pipeline (FAILED)" +{{- end -}} + + # final section for bitbucket codereview pipelines {{- define "bitbucket-review-vote" -}} finally: @@ -74,13 +138,17 @@ finally: - name: TARGET_URL value: $(params.pipelineUrl) - name: DESCRIPTION - value: "Build was successful" + value: "Review Pipeline" - name: STATE value: "SUCCESSFUL" - name: BITBUCKET_TOKEN_SECRET_NAME value: ci-bitbucket - name: BITBUCKET_TOKEN_SECRET_KEY value: token + - name: KEY + value: "Review" + - name: NAME + value: "Pipeline (PASSED)" - name: bitbucket-set-failure-status when: @@ -91,6 +159,33 @@ finally: kind: Task name: bitbucket-set-status params: + - name: REPO_FULL_NAME + value: $(params.gitfullrepositoryname) + - name: SHA + value: "$(params.git-source-revision)" + - name: TARGET_URL + value: $(params.pipelineUrl) + - name: DESCRIPTION + value: "Review Pipeline" + - name: STATE + value: "FAILED" + - name: BITBUCKET_TOKEN_SECRET_NAME + value: ci-bitbucket + - name: BITBUCKET_TOKEN_SECRET_KEY + value: token + - name: KEY + value: "Review" + - name: NAME + value: "Pipeline (FAILED)" +{{- end -}} + +# The init section for bitbucket build pipeline +{{- define "bitbucket-build-start" -}} +- name: bitbucket-set-pending-status + taskRef: + kind: Task + name: bitbucket-set-status + params: - name: REPO_FULL_NAME value: $(params.gitfullrepositoryname) - name: SHA @@ -98,17 +193,18 @@ finally: - name: TARGET_URL value: $(params.pipelineUrl) - name: DESCRIPTION - value: "Build has failed" + value: "Review Pipeline" - name: STATE - value: "FAILED" + value: "INPROGRESS" - name: BITBUCKET_TOKEN_SECRET_NAME value: ci-bitbucket - name: BITBUCKET_TOKEN_SECRET_KEY value: token -{{- end -}} + - name: KEY + value: "Build" + - name: NAME + value: "Pipeline" -# The init section for bitbucket build pipeline -{{- define "bitbucket-build-start" -}} - name: fetch-repository taskRef: kind: Task diff --git a/charts/common-library/templates/_common_github.yaml b/charts/common-library/templates/_common_github.yaml index 1e0eefec..ccf63f8e 100644 --- a/charts/common-library/templates/_common_github.yaml +++ b/charts/common-library/templates/_common_github.yaml @@ -1,5 +1,29 @@ # The init section for github build pipeline {{- define "github-build-start" -}} +- name: github-set-pending-status + taskRef: + kind: Task + name: github-set-status + params: + - name: REPO_FULL_NAME + value: $(params.gitfullrepositoryname) + - name: DESCRIPTION + value: "Pipeline (IN PROGRESS)" + - name: STATE + value: "pending" + - name: CONTEXT + value: "Build Pipeline" + - name: AUTH_TYPE + value: Token + - name: GITHUB_TOKEN_SECRET_NAME + value: ci-github + - name: GITHUB_TOKEN_SECRET_KEY + value: token + - name: SHA + value: $(params.gitsha) + - name: TARGET_URL + value: $(params.pipelineUrl) + - name: fetch-repository taskRef: kind: Task @@ -40,9 +64,11 @@ - name: REPO_FULL_NAME value: $(params.gitfullrepositoryname) - name: DESCRIPTION - value: "Build has started" + value: "Pipeline (IN PROGRESS)" - name: STATE value: "pending" + - name: CONTEXT + value: "Review Pipeline" - name: AUTH_TYPE value: Token - name: GITHUB_TOKEN_SECRET_NAME @@ -103,9 +129,11 @@ finally: - name: REPO_FULL_NAME value: $(params.gitfullrepositoryname) - name: DESCRIPTION - value: "Build was successful" + value: "Pipeline (PASSED)" - name: STATE value: "success" + - name: CONTEXT + value: "Review Pipeline" - name: AUTH_TYPE value: Token - name: GITHUB_TOKEN_SECRET_NAME @@ -129,9 +157,11 @@ finally: - name: REPO_FULL_NAME value: $(params.gitfullrepositoryname) - name: DESCRIPTION - value: "Build has failed" + value: "Pipeline (FAILED)" - name: STATE value: "failure" + - name: CONTEXT + value: "Review Pipeline" - name: AUTH_TYPE value: Token - name: GITHUB_TOKEN_SECRET_NAME @@ -143,3 +173,67 @@ finally: - name: TARGET_URL value: $(params.pipelineUrl) {{- end -}} + +{{- define "github-build-vote" -}} +- name: github-set-success-status + when: + - input: "$(tasks.status)" + operator: in + values: ["Succeeded"] + - input: $(params.gitsha) + operator: notin + values: ["$(tt.params.gitsha)"] + taskRef: + kind: Task + name: github-set-status + params: + - name: REPO_FULL_NAME + value: $(params.gitfullrepositoryname) + - name: DESCRIPTION + value: "Pipeline (PASSED)" + - name: STATE + value: "success" + - name: CONTEXT + value: "Build Pipeline" + - name: AUTH_TYPE + value: Token + - name: GITHUB_TOKEN_SECRET_NAME + value: ci-github + - name: GITHUB_TOKEN_SECRET_KEY + value: token + - name: SHA + value: $(params.gitsha) + - name: TARGET_URL + value: $(params.pipelineUrl) + +- name: github-set-failure-status + when: + - input: "$(tasks.status)" + operator: in + values: ["Failed"] + - input: $(params.gitsha) + operator: notin + values: ["$(tt.params.gitsha)"] + taskRef: + kind: Task + name: github-set-status + params: + - name: REPO_FULL_NAME + value: $(params.gitfullrepositoryname) + - name: DESCRIPTION + value: "Pipeline (FAILED)" + - name: STATE + value: "failure" + - name: CONTEXT + value: "Build Pipeline" + - name: AUTH_TYPE + value: Token + - name: GITHUB_TOKEN_SECRET_NAME + value: ci-github + - name: GITHUB_TOKEN_SECRET_KEY + value: token + - name: SHA + value: $(params.gitsha) + - name: TARGET_URL + value: $(params.pipelineUrl) +{{- end -}} diff --git a/charts/common-library/templates/_common_gitlab.yaml b/charts/common-library/templates/_common_gitlab.yaml index eb42ac33..66d1a524 100644 --- a/charts/common-library/templates/_common_gitlab.yaml +++ b/charts/common-library/templates/_common_gitlab.yaml @@ -1,5 +1,29 @@ # The init section for gitlab build pipeline {{- define "gitlab-build-start" -}} +- name: report-pipeline-start-to-gitlab + taskRef: + kind: Task + name: gitlab-set-status + params: + - name: "STATE" + value: "pending" + - name: "GITLAB_HOST_URL" + value: "$(params.git-source-url)" + - name: "REPO_FULL_NAME" + value: "$(params.gitfullrepositoryname)" + - name: "GITLAB_TOKEN_SECRET_NAME" + value: ci-gitlab + - name: "GITLAB_TOKEN_SECRET_KEY" + value: token + - name: "SHA" + value: "$(params.git-source-revision)" + - name: "TARGET_URL" + value: $(params.pipelineUrl) + - name: "CONTEXT" + value: "Build Pipeline" + - name: "DESCRIPTION" + value: "IN PROGRESS" + - name: fetch-repository taskRef: kind: Task @@ -52,9 +76,9 @@ - name: "TARGET_URL" value: $(params.pipelineUrl) - name: "CONTEXT" - value: "ci-pipeline" + value: "Review Pipeline" - name: "DESCRIPTION" - value: "Managed by KubeRocketCI. Run with Tekton" + value: "IN PROGRESS" - name: fetch-repository taskRef: @@ -118,9 +142,9 @@ finally: - name: "TARGET_URL" value: $(params.pipelineUrl) - name: "CONTEXT" - value: "ci-pipeline" + value: "Review Pipeline" - name: "DESCRIPTION" - value: "Managed by KubeRocketCI. Run with Tekton" + value: "PASSED" - name: gitlab-set-failure-status when: @@ -146,7 +170,66 @@ finally: - name: "TARGET_URL" value: $(params.pipelineUrl) - name: "CONTEXT" - value: "ci-pipeline" + value: "Review Pipeline" - name: "DESCRIPTION" - value: "Managed by KubeRocketCI. Run with Tekton" + value: "FAILED" +{{- end -}} + + +{{- define "gitlab-build-vote" -}} +- name: gitlab-set-success-status + when: + - input: "$(tasks.status)" + operator: in + values: ["Succeeded"] + taskRef: + kind: Task + name: gitlab-set-status + params: + - name: "STATE" + value: "success" + - name: "GITLAB_HOST_URL" + value: "$(params.git-source-url)" + - name: "REPO_FULL_NAME" + value: "$(params.gitfullrepositoryname)" + - name: "GITLAB_TOKEN_SECRET_NAME" + value: ci-gitlab + - name: "GITLAB_TOKEN_SECRET_KEY" + value: token + - name: "SHA" + value: "$(params.git-source-revision)" + - name: "TARGET_URL" + value: $(params.pipelineUrl) + - name: "CONTEXT" + value: "Build Pipeline" + - name: "DESCRIPTION" + value: "PASSED" + +- name: gitlab-set-failure-status + when: + - input: "$(tasks.status)" + operator: in + values: ["Failed"] + taskRef: + kind: Task + name: gitlab-set-status + params: + - name: "STATE" + value: "failed" + - name: "GITLAB_HOST_URL" + value: "$(params.git-source-url)" + - name: "REPO_FULL_NAME" + value: "$(params.gitfullrepositoryname)" + - name: "GITLAB_TOKEN_SECRET_NAME" + value: ci-gitlab + - name: "GITLAB_TOKEN_SECRET_KEY" + value: token + - name: "SHA" + value: "$(params.git-source-revision)" + - name: "TARGET_URL" + value: $(params.pipelineUrl) + - name: "CONTEXT" + value: "Build Pipeline" + - name: "DESCRIPTION" + value: "FAILED" {{- end -}} diff --git a/charts/pipelines-library/Chart.lock b/charts/pipelines-library/Chart.lock index 28b8662c..1286e850 100644 --- a/charts/pipelines-library/Chart.lock +++ b/charts/pipelines-library/Chart.lock @@ -1,9 +1,9 @@ dependencies: - name: edp-tekton-common-library repository: file://../common-library - version: 0.3.6 + version: 0.3.7 - name: tekton-cache repository: https://epam.github.io/edp-helm-charts/stable version: 0.4.1 -digest: sha256:bb2558c760c5405a5d34666f3f081cacce8570e30158b037c1c7859ba76c8d75 -generated: "2024-12-12T20:43:05.08774+02:00" +digest: sha256:3880d2be9efd9b03dc3a2f9a7ad5e0011ee17e0cf33e7ba855ccb623cfc5e535 +generated: "2024-12-19T08:36:25.19115+02:00" diff --git a/charts/pipelines-library/Chart.yaml b/charts/pipelines-library/Chart.yaml index 085b3fb8..91aa1d27 100644 --- a/charts/pipelines-library/Chart.yaml +++ b/charts/pipelines-library/Chart.yaml @@ -39,7 +39,7 @@ annotations: # we use templates from common library dependencies: - name: edp-tekton-common-library - version: 0.3.6 + version: 0.3.7 repository: "file://../common-library" - name: tekton-cache version: 0.4.1 diff --git a/charts/pipelines-library/README.md b/charts/pipelines-library/README.md index de3e9bb6..9cdce691 100644 --- a/charts/pipelines-library/README.md +++ b/charts/pipelines-library/README.md @@ -66,7 +66,7 @@ Follows [Tekton Interceptor](https://tekton.dev/vault/triggers-main/clusterinter | Repository | Name | Version | |------------|------|---------| | @epamedp | tekton-cache | 0.4.1 | -| file://../common-library | edp-tekton-common-library | 0.3.6 | +| file://../common-library | edp-tekton-common-library | 0.3.7 | ## Values 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 4863cfec..ef6de417 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 @@ -17,6 +17,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: pipelineUrl + 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/sergk/spring-petclinic" description: git url to clone @@ -33,6 +36,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: '{{ $image }}' description: "gradle image version" @@ -124,6 +130,11 @@ spec: subPath: source - name: ssh-directory workspace: ssh-creds + + finally: + +{{ include "bitbucket-build-vote" . | nindent 4 }} + --- {{ 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 2db2f5a8..64bd0f7c 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 @@ -17,6 +17,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: pipelineUrl + 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/sergk/spring-petclinic" description: git url to clone @@ -36,6 +39,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: sonar_image default: '{{ $sonarImage }}' description: "sonar image version" @@ -105,6 +111,10 @@ spec: subPath: source - name: ssh-directory workspace: ssh-creds + + finally: + +{{ include "bitbucket-build-vote" . | nindent 4 }} --- {{ 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 fd11d4d7..e7eb7625 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 @@ -19,6 +19,9 @@ spec: - name: ssh-creds params: + - name: pipelineUrl + 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/sergk/spring-petclinic" description: git url to clone @@ -39,6 +42,12 @@ spec: default: '{{ $image }}' description: "gradle image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: sonar_image default: '{{ $sonarImage }}' description: "sonar image version" @@ -126,6 +135,10 @@ spec: subPath: source - name: ssh-directory workspace: ssh-creds + + finally: + +{{ include "github-build-vote" . | nindent 4 }} --- {{ 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 3d11a80d..e455490d 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 @@ -17,6 +17,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: pipelineUrl + 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/sergk/spring-petclinic" description: git url to clone @@ -40,6 +43,12 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string {{- include "build-result" $ | nindent 2 }} @@ -105,6 +114,10 @@ spec: subPath: source - name: ssh-directory workspace: ssh-creds + + finally: + +{{ include "github-build-vote" . | nindent 4 }} --- {{ 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 5c966d35..db5e873c 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 @@ -17,6 +17,12 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string + - name: pipelineUrl + 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/sergk/spring-petclinic" description: git url to clone @@ -124,6 +130,10 @@ spec: subPath: source - name: ssh-directory workspace: ssh-creds + + finally: + +{{ include "gitlab-build-vote" . | nindent 4 }} --- {{ 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 dd4cba02..14a4a240 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 @@ -17,6 +17,12 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string + - name: pipelineUrl + 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/sergk/spring-petclinic" description: git url to clone @@ -105,6 +111,10 @@ spec: subPath: source - name: ssh-directory workspace: ssh-creds + + finally: + +{{ include "gitlab-build-vote" . | nindent 4 }} --- {{ 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 7a188243..6f8717a7 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 @@ -19,6 +19,9 @@ spec: - name: ssh-creds params: + - name: pipelineUrl + 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/sergk/spring-petclinic" description: git url to clone @@ -35,6 +38,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: '{{ $image }}' description: "maven image version" @@ -128,6 +134,11 @@ spec: subPath: source - name: ssh-directory workspace: ssh-creds + + finally: + +{{ include "bitbucket-build-vote" . | nindent 4 }} + --- {{ 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 e67836b6..91b71730 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 @@ -19,6 +19,9 @@ spec: - name: ssh-creds params: + - name: pipelineUrl + 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/sergk/spring-petclinic" description: git url to clone @@ -38,6 +41,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: sonar_image default: '{{ $sonarImage }}' description: "sonar image version" @@ -106,6 +112,10 @@ spec: subPath: source - name: ssh-directory workspace: ssh-creds + + finally: + +{{ include "bitbucket-build-vote" . | nindent 4 }} --- {{ 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 aeba72b9..c6eb0304 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 @@ -17,6 +17,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: pipelineUrl + 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/sergk/spring-petclinic" description: git url to clone @@ -37,6 +40,12 @@ spec: default: '{{ $image }}' description: "maven image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: sonar_image default: '{{ $sonarImage }}' description: "sonar image version" @@ -126,6 +135,10 @@ spec: subPath: source - name: ssh-directory workspace: ssh-creds + + finally: + +{{ include "github-build-vote" . | nindent 4 }} --- {{ 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 3a3f88dd..ad7a36f9 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 @@ -17,6 +17,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: pipelineUrl + 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/sergk/spring-petclinic" description: git url to clone @@ -36,6 +39,12 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: sonar_image default: '{{ $sonarImage }}' description: "sonar image version" @@ -104,6 +113,10 @@ spec: subPath: source - name: ssh-directory workspace: ssh-creds + + finally: + +{{ include "github-build-vote" . | nindent 4 }} --- {{ 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 c2d71f63..c5fedace 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 @@ -19,6 +19,12 @@ spec: - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string + - name: pipelineUrl + 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/sergk/spring-petclinic" description: git url to clone @@ -128,6 +134,10 @@ spec: subPath: source - name: ssh-directory workspace: ssh-creds + + finally: + +{{ include "gitlab-build-vote" . | nindent 4 }} --- {{ 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 9fadc088..c96c3b55 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 @@ -19,6 +19,12 @@ spec: - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string + - name: pipelineUrl + 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/sergk/spring-petclinic" description: git url to clone @@ -105,7 +111,11 @@ spec: workspace: shared-workspace subPath: source - name: ssh-directory - workspace: ssh-creds + workspace: ssh-creds + + finally: + +{{ include "gitlab-build-vote" . | nindent 4 }} --- {{ 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 cae15a6c..c668ee0e 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 @@ -35,6 +35,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: '{{ include "edp-tekton.registry" . }}/epamedp/tekton-python-make:0.1.7' description: "go image version" @@ -81,6 +84,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} --- {{ 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 e3a89a51..adaa417d 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 @@ -35,6 +35,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: '{{ include "edp-tekton.registry" . }}/epamedp/tekton-python-make:0.1.7' description: "go image version" @@ -81,6 +84,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} --- {{ 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 b305c437..7e3ab440 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 @@ -39,6 +39,12 @@ spec: default: '{{ include "edp-tekton.registry" . }}/epamedp/tekton-python-make:0.1.7' description: "go image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -81,6 +87,8 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + --- {{ 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 7a989f92..740b6222 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 @@ -39,6 +39,12 @@ spec: default: '{{ include "edp-tekton.registry" . }}/epamedp/tekton-python-make:0.1.7' description: "go image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -81,6 +87,8 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + --- {{ 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 21b90186..fa217bea 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 @@ -13,6 +13,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -81,6 +84,8 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + --- {{ 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 3ea3a6f8..ac726831 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 @@ -13,6 +13,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -81,6 +84,8 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + --- {{ 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 cb7bd836..2070d214 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 @@ -35,6 +35,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: '{{ include "edp-tekton.registry" . }}/epamedp/tekton-python-make:0.1.7' description: "go image version" @@ -81,6 +84,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} --- {{ 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 f0d75328..fdf6bb92 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 @@ -35,6 +35,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: '{{ include "edp-tekton.registry" . }}/epamedp/tekton-python-make:0.1.7' description: "go image version" @@ -81,6 +84,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} --- {{ 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 409825e0..7cd334b7 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 @@ -39,6 +39,12 @@ spec: default: '{{ include "edp-tekton.registry" . }}/epamedp/tekton-python-make:0.1.7' description: "go image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -81,6 +87,8 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + --- {{ 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 767abbca..7e7e9ec7 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 @@ -39,6 +39,12 @@ spec: default: '{{ include "edp-tekton.registry" . }}/epamedp/tekton-python-make:0.1.7' description: "go image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -81,6 +87,8 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + --- {{ 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 e8650ce9..553f405f 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 @@ -13,6 +13,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -81,6 +84,8 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + --- {{ 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 437eba9c..ca5aa0aa 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 @@ -13,6 +13,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -81,6 +84,8 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + --- {{ end }} {{ 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 c2d79fe4..2b162cff 100644 --- a/charts/pipelines-library/templates/pipelines/csharp/bitbucket-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/csharp/bitbucket-build-default.yaml @@ -37,6 +37,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: "{{ $image}}" description: "dotnet-sdk image version" @@ -121,6 +124,8 @@ spec: {{ include "build-pipeline-end" . | nindent 4 }} {{ include "finally-block-default" . | nindent 2 }} + +{{ include "bitbucket-build-vote" . | nindent 4 }} --- {{ 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 787516ca..d212de24 100644 --- a/charts/pipelines-library/templates/pipelines/csharp/bitbucket-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/csharp/bitbucket-build-edp.yaml @@ -37,6 +37,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: "{{ $image }}" description: "dotnet-sdk image version" @@ -132,6 +135,8 @@ spec: {{ include "build-pipeline-end" . | nindent 4 }} {{ include "finally-block-edp" . | nindent 2 }} + +{{ include "bitbucket-build-vote" . | nindent 4 }} --- {{ 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 d9c389c5..ad590f01 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 @@ -37,6 +37,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: "{{ $image }}" description: "dotnet-sdk image version" @@ -101,6 +104,8 @@ spec: {{ include "build-pipeline-lib-end" . | nindent 4 }} {{ include "finally-block-default" . | nindent 2 }} + +{{ include "bitbucket-build-vote" . | nindent 4 }} --- {{ 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 a82ccb81..80185e31 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 @@ -37,6 +37,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: "{{ $image }}" description: "dotnet-sdk image version" @@ -112,6 +115,8 @@ spec: {{ include "build-pipeline-lib-end" . | nindent 4 }} {{ include "finally-block-edp" . | nindent 2 }} + +{{ include "bitbucket-build-vote" . | nindent 4 }} --- {{ 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 f462dd8f..1c954951 100644 --- a/charts/pipelines-library/templates/pipelines/csharp/github-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/csharp/github-build-default.yaml @@ -41,6 +41,12 @@ spec: default: "{{ $image }}" description: "dotnet-sdk image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -121,6 +127,8 @@ spec: {{ include "build-pipeline-end" . | nindent 4 }} {{ include "finally-block-default" . | nindent 2 }} + +{{ include "github-build-vote" . | nindent 4 }} --- {{ 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 0fd4050f..f4328039 100644 --- a/charts/pipelines-library/templates/pipelines/csharp/github-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/csharp/github-build-edp.yaml @@ -41,6 +41,12 @@ spec: default: "{{ $image }}" description: "dotnet-sdk image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -132,6 +138,8 @@ spec: {{ include "build-pipeline-end" . | nindent 4 }} {{ include "finally-block-edp" . | nindent 2 }} + +{{ include "github-build-vote" . | nindent 4 }} --- {{ 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 780f6bc3..02533d77 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 @@ -41,6 +41,12 @@ spec: default: "{{ $image }}" description: "dotnet-sdk image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -103,6 +109,8 @@ spec: {{ include "finally-block-default" . | nindent 2 }} {{ include "finally-block-default" . | nindent 2 }} + +{{ include "github-build-vote" . | nindent 4 }} --- {{ 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 4d2086f4..21dacf72 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 @@ -41,6 +41,12 @@ spec: default: "{{ $image }}" description: "dotnet-sdk image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -112,6 +118,8 @@ spec: {{ include "build-pipeline-lib-end" . | nindent 4 }} {{ include "finally-block-edp" . | nindent 2 }} + +{{ include "github-build-vote" . | nindent 4 }} --- {{ 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 729f0f71..614b6dc8 100644 --- a/charts/pipelines-library/templates/pipelines/csharp/gitlab-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/csharp/gitlab-build-default.yaml @@ -15,6 +15,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -121,6 +124,8 @@ spec: {{ include "build-pipeline-end" . | nindent 4 }} {{ include "finally-block-default" . | nindent 2 }} + +{{ include "gitlab-build-vote" . | nindent 4 }} --- {{ 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 15dce5ee..d1883926 100644 --- a/charts/pipelines-library/templates/pipelines/csharp/gitlab-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/csharp/gitlab-build-edp.yaml @@ -15,6 +15,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -132,6 +135,8 @@ spec: {{ include "build-pipeline-end" . | nindent 4 }} {{ include "finally-block-edp" . | nindent 2 }} + +{{ include "gitlab-build-vote" . | nindent 4 }} --- {{ 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 55f32032..03c3f740 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 @@ -15,6 +15,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -101,6 +104,8 @@ spec: {{ include "build-pipeline-lib-end" . | nindent 4 }} {{ include "finally-block-default" . | nindent 2 }} + +{{ include "gitlab-build-vote" . | nindent 4 }} --- {{ 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 5219cff5..ab98f1e0 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 @@ -15,6 +15,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -112,6 +115,8 @@ spec: {{ include "build-pipeline-lib-end" . | nindent 4 }} {{ include "finally-block-edp" . | nindent 2 }} + +{{ include "gitlab-build-vote" . | nindent 4 }} --- {{ 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 b5168b85..9ecb18ba 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 @@ -35,6 +35,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -86,5 +89,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} + {{ 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 973ec911..c4501fbe 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 @@ -35,6 +35,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -86,5 +89,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} + {{ 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 5034a1f8..cb045a7b 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 @@ -35,6 +35,12 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -86,5 +92,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + {{ 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 4b13eb09..0da7e8fa 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 @@ -35,6 +35,12 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -86,5 +92,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + {{ 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 bfa2bafd..d08ac78c 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 @@ -13,6 +13,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ .Release.Namespace }}.{{ .Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -86,5 +89,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + {{ 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 d34f7c2c..001ff080 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 @@ -13,6 +13,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ .Release.Namespace }}.{{ .Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -86,5 +89,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + {{ 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 dd6e8795..8a11e6d4 100644 --- a/charts/pipelines-library/templates/pipelines/go/bitbucket-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/go/bitbucket-build-default.yaml @@ -39,6 +39,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: '{{ $registry }}/golang:1.22-bookworm' description: "go image version" @@ -89,6 +92,8 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} + --- {{ 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 1e47ca87..153c9f39 100644 --- a/charts/pipelines-library/templates/pipelines/go/bitbucket-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/go/bitbucket-build-edp.yaml @@ -39,6 +39,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: '{{ $registry }}/golang:1.22-bookworm' description: "go image version" @@ -89,6 +92,8 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} + --- {{ 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 d6aa65b7..d902e41a 100644 --- a/charts/pipelines-library/templates/pipelines/go/github-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/go/github-build-default.yaml @@ -43,6 +43,12 @@ spec: default: '{{ $registry }}/golang:1.22-bookworm' description: "go image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -89,6 +95,8 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + --- {{ 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 5d751176..c3cc13f3 100644 --- a/charts/pipelines-library/templates/pipelines/go/github-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/go/github-build-edp.yaml @@ -43,6 +43,12 @@ spec: default: '{{ $registry }}/golang:1.22-bookworm' description: "go image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -89,6 +95,8 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + --- {{ 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 a5fd34c6..f473b324 100644 --- a/charts/pipelines-library/templates/pipelines/go/gitlab-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/go/gitlab-build-default.yaml @@ -17,6 +17,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -89,6 +92,8 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + --- {{ 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 f8e73848..926b55d7 100644 --- a/charts/pipelines-library/templates/pipelines/go/gitlab-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/go/gitlab-build-edp.yaml @@ -17,6 +17,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -89,6 +92,8 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + --- {{ 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 6f14f0f6..2464aedd 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 @@ -35,6 +35,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: '{{ include "edp-tekton.registry" . }}/gradle:7.6.1-jdk11' description: "gradle image version" @@ -170,5 +173,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} + {{ 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 7e2b2beb..33ab9ed4 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 @@ -35,6 +35,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: '{{ include "edp-tekton.registry" . }}/gradle:7.6.1-jdk11' description: "gradle image version" @@ -172,5 +175,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} + {{ 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 a4253036..d9cc21e9 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 @@ -40,6 +40,12 @@ spec: default: '{{ $registry }}/gradle:7.6.1-jdk11' description: "gradle image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -171,5 +177,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + {{ 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 094776d4..6e7e60d9 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 @@ -39,6 +39,12 @@ spec: default: '{{ include "edp-tekton.registry" . }}/gradle:7.6.1-jdk11' description: "gradle image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -172,5 +178,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + {{ 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 e89b8f9d..a22b86a1 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 @@ -13,6 +13,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ .Release.Namespace }}.{{ .Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -170,5 +173,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + {{ 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 33491dc5..6e864703 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 @@ -13,6 +13,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ .Release.Namespace }}.{{ .Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -172,5 +175,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + {{ 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 55aa16fe..73addb93 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 @@ -31,6 +31,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -57,6 +60,30 @@ spec: tasks: + - name: bitbucket-set-pending-status + taskRef: + kind: Task + name: bitbucket-set-status + params: + - name: REPO_FULL_NAME + value: $(params.gitfullrepositoryname) + - name: SHA + value: "$(params.git-source-revision)" + - name: TARGET_URL + value: $(params.pipelineUrl) + - name: DESCRIPTION + value: "Review Pipeline" + - name: STATE + value: "INPROGRESS" + - name: BITBUCKET_TOKEN_SECRET_NAME + value: ci-bitbucket + - name: BITBUCKET_TOKEN_SECRET_KEY + value: token + - name: KEY + value: "Review" + - name: NAME + value: "Pipeline" + - name: fetch-repository taskRef: kind: Task @@ -154,5 +181,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} + {{ 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 35d286db..61e1c8d7 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 @@ -34,6 +34,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -60,6 +63,30 @@ spec: tasks: + - name: bitbucket-set-pending-status + taskRef: + kind: Task + name: bitbucket-set-status + params: + - name: REPO_FULL_NAME + value: $(params.gitfullrepositoryname) + - name: SHA + value: "$(params.git-source-revision)" + - name: TARGET_URL + value: $(params.pipelineUrl) + - name: DESCRIPTION + value: "Review Pipeline" + - name: STATE + value: "INPROGRESS" + - name: BITBUCKET_TOKEN_SECRET_NAME + value: ci-bitbucket + - name: BITBUCKET_TOKEN_SECRET_KEY + value: token + - name: KEY + value: "Review" + - name: NAME + value: "Pipeline" + - name: fetch-repository taskRef: kind: Task @@ -173,5 +200,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} + {{ 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 95dab78e..db14e6e7 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 @@ -31,6 +31,12 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -57,6 +63,30 @@ spec: tasks: + - name: github-set-pending-status + taskRef: + kind: Task + name: github-set-status + params: + - name: REPO_FULL_NAME + value: $(params.gitfullrepositoryname) + - name: DESCRIPTION + value: "Pipeline (IN PROGRESS)" + - name: STATE + value: "pending" + - name: CONTEXT + value: "Build Pipeline" + - name: AUTH_TYPE + value: Token + - name: GITHUB_TOKEN_SECRET_NAME + value: ci-github + - name: GITHUB_TOKEN_SECRET_KEY + value: token + - name: SHA + value: $(params.gitsha) + - name: TARGET_URL + value: $(params.pipelineUrl) + - name: fetch-repository taskRef: kind: Task @@ -154,5 +184,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + {{ 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 c77b4831..cb7269ac 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 @@ -34,6 +34,12 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -59,6 +65,29 @@ spec: {{- include "build-result" . | nindent 2 }} tasks: + - name: github-set-pending-status + taskRef: + kind: Task + name: github-set-status + params: + - name: REPO_FULL_NAME + value: $(params.gitfullrepositoryname) + - name: DESCRIPTION + value: "Pipeline (IN PROGRESS)" + - name: STATE + value: "pending" + - name: CONTEXT + value: "Build Pipeline" + - name: AUTH_TYPE + value: Token + - name: GITHUB_TOKEN_SECRET_NAME + value: ci-github + - name: GITHUB_TOKEN_SECRET_KEY + value: token + - name: SHA + value: $(params.gitsha) + - name: TARGET_URL + value: $(params.pipelineUrl) - name: fetch-repository taskRef: @@ -173,5 +202,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + {{ 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 edc7bfa6..48639ee7 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 @@ -13,6 +13,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ .Release.Namespace }}.{{ .Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -57,6 +60,30 @@ spec: tasks: + - name: report-pipeline-start-to-gitlab + taskRef: + kind: Task + name: gitlab-set-status + params: + - name: "STATE" + value: "pending" + - name: "GITLAB_HOST_URL" + value: "$(params.git-source-url)" + - name: "REPO_FULL_NAME" + value: "$(params.gitfullrepositoryname)" + - name: "GITLAB_TOKEN_SECRET_NAME" + value: ci-gitlab + - name: "GITLAB_TOKEN_SECRET_KEY" + value: token + - name: "SHA" + value: "$(params.git-source-revision)" + - name: "TARGET_URL" + value: $(params.pipelineUrl) + - name: "CONTEXT" + value: "Build Pipeline" + - name: "DESCRIPTION" + value: "IN PROGRESS" + - name: fetch-repository taskRef: kind: Task @@ -154,5 +181,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + {{ 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 b4c5e18a..1fac35e5 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 @@ -13,6 +13,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ .Release.Namespace }}.{{ .Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -60,6 +63,31 @@ spec: tasks: + - name: report-pipeline-start-to-gitlab + taskRef: + kind: Task + name: gitlab-set-status + params: + - name: "STATE" + value: "pending" + - name: "GITLAB_HOST_URL" + value: "$(params.git-source-url)" + - name: "REPO_FULL_NAME" + value: "$(params.gitfullrepositoryname)" + - name: "GITLAB_TOKEN_SECRET_NAME" + value: ci-gitlab + - name: "GITLAB_TOKEN_SECRET_KEY" + value: token + - name: "SHA" + value: "$(params.git-source-revision)" + - name: "TARGET_URL" + value: $(params.pipelineUrl) + - name: "CONTEXT" + value: "Build Pipeline" + - name: "DESCRIPTION" + value: "IN PROGRESS" + + - name: fetch-repository taskRef: kind: Task @@ -173,5 +201,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + {{ 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 b011e9ad..98aceef6 100644 --- a/charts/pipelines-library/templates/pipelines/helm/bitbucket-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/helm/bitbucket-build-default.yaml @@ -31,6 +31,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -188,5 +191,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} + {{ 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 47c84647..407a9c6b 100644 --- a/charts/pipelines-library/templates/pipelines/helm/bitbucket-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/helm/bitbucket-build-edp.yaml @@ -34,6 +34,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -201,5 +204,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} + {{ 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 d937fd9a..a8ed2a6a 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 @@ -31,6 +31,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -109,5 +112,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} + {{ 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 00f1f2f1..6ca1845c 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 @@ -34,6 +34,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -112,5 +115,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} + {{ 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 7b8196c7..fa17d941 100644 --- a/charts/pipelines-library/templates/pipelines/helm/github-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/helm/github-build-default.yaml @@ -31,6 +31,12 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -188,5 +194,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + {{ 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 1c2364a2..75b1a299 100644 --- a/charts/pipelines-library/templates/pipelines/helm/github-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/helm/github-build-edp.yaml @@ -34,6 +34,12 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -201,5 +207,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + {{ 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 404109ef..af6b4d43 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 @@ -31,6 +31,12 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -111,5 +117,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + {{ 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 66cb4d5a..21a77307 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 @@ -34,6 +34,12 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -112,5 +118,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + {{ 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 1b1e4438..3325aa17 100644 --- a/charts/pipelines-library/templates/pipelines/helm/gitlab-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/helm/gitlab-build-default.yaml @@ -13,6 +13,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ .Release.Namespace }}.{{ .Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -188,5 +191,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + {{ 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 e9b0c5c8..fa62ff1d 100644 --- a/charts/pipelines-library/templates/pipelines/helm/gitlab-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/helm/gitlab-build-edp.yaml @@ -13,6 +13,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ .Release.Namespace }}.{{ .Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -201,5 +204,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + {{ 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 51544aa8..5d0d30bf 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 @@ -13,6 +13,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ .Release.Namespace }}.{{ .Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -109,5 +112,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + {{ 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 ec643efb..aad2217d 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 @@ -13,6 +13,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ .Release.Namespace }}.{{ .Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -112,5 +115,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + {{ 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 31a2cb6e..57e9c388 100644 --- a/charts/pipelines-library/templates/pipelines/infrastructure/bitbucket-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/infrastructure/bitbucket-build-default.yaml @@ -32,6 +32,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -72,5 +75,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} + {{ 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 62f4620f..2a35ee6b 100644 --- a/charts/pipelines-library/templates/pipelines/infrastructure/bitbucket-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/infrastructure/bitbucket-build-edp.yaml @@ -35,6 +35,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -75,5 +78,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} + {{ 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 f065efae..a74e94b0 100644 --- a/charts/pipelines-library/templates/pipelines/infrastructure/github-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/infrastructure/github-build-default.yaml @@ -32,6 +32,12 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -72,5 +78,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + {{ 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 b49c231a..b2451ff2 100644 --- a/charts/pipelines-library/templates/pipelines/infrastructure/github-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/infrastructure/github-build-edp.yaml @@ -35,6 +35,12 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -75,5 +81,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + {{ 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 62ebf766..caff5aaf 100644 --- a/charts/pipelines-library/templates/pipelines/infrastructure/gitlab-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/infrastructure/gitlab-build-default.yaml @@ -13,6 +13,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ .Release.Namespace }}.{{ .Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -72,5 +75,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + {{ 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 c13c4798..7d1ff4aa 100644 --- a/charts/pipelines-library/templates/pipelines/infrastructure/gitlab-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/infrastructure/gitlab-build-edp.yaml @@ -13,6 +13,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ .Release.Namespace }}.{{ .Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -75,5 +78,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + {{ 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 9b7b96b1..20f2482c 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 @@ -40,6 +40,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: '{{ $image }}' description: "gradle image version" @@ -112,6 +115,8 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} + --- {{ 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 1a27a58f..75ddf677 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 @@ -42,6 +42,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: '{{ $image }}' description: "gradle image version" @@ -116,6 +119,8 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} + --- {{ 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 f0cef182..61ae4420 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 @@ -40,6 +40,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: '{{ $image }}' description: "gradle image version" @@ -110,6 +113,8 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} + --- {{ 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 356d6f18..26fe0c45 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 @@ -40,6 +40,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: '{{ $image }}' description: "gradle image version" @@ -112,6 +115,8 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} + --- {{ 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 7e3b5594..0047c3ec 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 @@ -44,6 +44,12 @@ spec: default: '{{ $image }}' description: "gradle image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: sonar_image default: '{{ $sonarImage }}' description: "sonar image version" @@ -112,6 +118,8 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + --- {{ 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 6cb6a2df..e3726af5 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 @@ -44,6 +44,12 @@ spec: default: '{{ $image }}' description: "gradle image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: sonar_image default: '{{ $sonarImage }}' description: "sonar image version" @@ -114,6 +120,8 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + --- {{ 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 eedb8c68..d0cc2d8c 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 @@ -44,6 +44,12 @@ spec: default: '{{ $image }}' description: "gradle image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: sonar_image default: '{{ $sonarImage }}' description: "sonar image version" @@ -110,6 +116,8 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + --- {{ 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 8266e007..0a806a17 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 @@ -44,6 +44,12 @@ spec: default: '{{ $image }}' description: "gradle image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: sonar_image default: '{{ $sonarImage }}' description: "sonar image version" @@ -112,6 +118,8 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + --- {{ 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 c8d6b06e..03054233 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 @@ -18,6 +18,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -112,6 +115,8 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + --- {{ 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 17557906..45d30b7e 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 @@ -20,6 +20,9 @@ spec: - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -116,6 +119,8 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + --- {{ 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 a9dd0d72..c4d270bf 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 @@ -18,6 +18,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -110,6 +113,8 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + --- {{ 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 5149c5b1..fd62dda2 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 @@ -18,6 +18,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -112,6 +115,8 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + --- {{ 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 891687a4..403f2986 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 @@ -42,6 +42,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: '{{ $image }}' description: "maven image version" @@ -120,6 +123,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} --- {{ 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 ac8533bd..326aebc8 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 @@ -31,6 +31,9 @@ spec: description: 'git revision to checkout (branch, tag, sha, ref…)' default: "edp" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: CODEBASE_NAME default: '{{ $framework }}-maven' description: "Project name" @@ -118,6 +121,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} --- {{ 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 7756c271..0cc03098 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 @@ -42,6 +42,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: '{{ $image }}' description: "maven image version" @@ -116,6 +119,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} --- {{ 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 18de21fb..d1bfc961 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 @@ -42,6 +42,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: '{{ $image }}' description: "maven image version" @@ -114,6 +117,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} --- {{ 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 298b9ea4..5d795a43 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 @@ -44,6 +44,12 @@ spec: default: '{{ $image }}' description: "maven image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: sonar_image default: '{{ $sonarImage }}' description: "sonar image version" @@ -118,6 +124,8 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + --- {{ 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 75925ac0..3e7aa764 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 @@ -44,6 +44,12 @@ spec: default: '{{ $image }}' description: "maven image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: sonar_image default: '{{ $sonarImage }}' description: "sonar image version" @@ -116,6 +122,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} --- {{ 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 01b16734..77d79a1f 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 @@ -44,6 +44,12 @@ spec: default: '{{ $image }}' description: "maven image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: sonar_image default: '{{ $sonarImage }}' description: "sonar image version" @@ -114,6 +120,8 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + --- {{ 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 c83b6d7b..5e110b90 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 @@ -44,6 +44,12 @@ spec: default: '{{ $image }}' description: "maven image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: sonar_image default: '{{ $sonarImage }}' description: "sonar image version" @@ -112,6 +118,8 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + --- {{ 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 ca7afc0f..877093df 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 @@ -20,6 +20,9 @@ spec: - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -120,6 +123,8 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + --- {{ 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 11d391f4..c5366747 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 @@ -20,6 +20,9 @@ spec: - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -118,6 +121,8 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + --- {{ 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 b5bfa14c..280363b4 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 @@ -20,6 +20,9 @@ spec: - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -116,6 +119,8 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + --- {{ 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 1288ae11..57363513 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 @@ -20,6 +20,9 @@ spec: - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -114,6 +117,8 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + --- {{ 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 bb061650..371d9ecd 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 @@ -37,6 +37,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: '{{ include "edp-tekton.registry" . }}/antora/antora:3.1.4' description: "npm image version" @@ -127,6 +130,8 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} + --- {{ end }} {{ end }} 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 192fe53f..bcd89044 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 @@ -37,6 +37,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: '{{ include "edp-tekton.registry" . }}/antora/antora:3.1.4' description: "npm image version" @@ -127,6 +130,8 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} + --- {{ end }} {{ end }} 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 2f3e5414..ee5845ee 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 @@ -39,6 +39,12 @@ spec: default: '{{ include "edp-tekton.registry" . }}/antora/antora:3.1.4' description: "npm image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -125,6 +131,8 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + --- {{ end }} {{ end }} 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 15b793fc..56e62cc1 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 @@ -39,6 +39,12 @@ spec: default: '{{ include "edp-tekton.registry" . }}/antora/antora:3.1.4' description: "npm image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -125,6 +131,8 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + --- {{ end }} {{ end }} 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 78aed7cf..aaa1eb7f 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 @@ -15,6 +15,9 @@ spec: - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -127,6 +130,8 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + --- {{ end }} {{ end }} 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 14a07018..1adb1d12 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 @@ -15,6 +15,9 @@ spec: - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -127,6 +130,8 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + --- {{ end }} {{ end }} 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 9f435c05..ea4ce108 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 @@ -41,6 +41,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: '{{ $registry }}/library/node:18.20.3-alpine3.20' description: "npm image version" @@ -109,6 +112,8 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} + --- {{ 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 0457574f..c60d7839 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 @@ -41,6 +41,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: '{{ $registry }}/library/node:18.20.3-alpine3.20' description: "npm image version" @@ -109,6 +112,8 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} + --- {{ 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 b2dfeb5d..bb30fa56 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 @@ -41,6 +41,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: '{{ $registry }}/library/node:18.20.3-alpine3.20' description: "npm image version" @@ -107,6 +110,8 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} + --- {{ 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 2f8af06e..02e36193 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 @@ -41,6 +41,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: '{{ $registry }}/library/node:18.20.3-alpine3.20' description: "npm image version" @@ -107,6 +110,8 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} + --- {{ 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 26694816..bea0ce8d 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 @@ -43,6 +43,12 @@ spec: default: '{{ $registry }}/library/node:18.20.3-alpine3.20' description: "npm image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -107,6 +113,8 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + --- {{ 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 f971bc3a..a9c6b57c 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 @@ -43,6 +43,12 @@ spec: default: '{{ $registry }}/library/node:18.20.3-alpine3.20' description: "npm image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -107,6 +113,8 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + --- {{ 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 48082ce6..9d995c53 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 @@ -43,6 +43,12 @@ spec: default: '{{ $registry }}/library/node:18.20.3-alpine3.20' description: "npm image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -105,6 +111,8 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + --- {{ 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 aac728bd..9c9a014f 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 @@ -43,6 +43,12 @@ spec: default: '{{ $registry }}/library/node:18.20.3-alpine3.20' description: "npm image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -105,6 +111,8 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + --- {{ 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 e68b42d5..03d328f4 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 @@ -19,6 +19,9 @@ spec: - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -109,6 +112,8 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + --- {{ 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 99348543..3b90ab9c 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 @@ -19,6 +19,9 @@ spec: - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -109,6 +112,8 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + --- {{ 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 d78e8951..b39bda9a 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 @@ -19,6 +19,9 @@ spec: - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -107,6 +110,8 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + --- {{ 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 228c6a8e..0c0fca16 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 @@ -19,6 +19,9 @@ spec: - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -107,6 +110,8 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + --- {{ 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 a615cae7..827b655c 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 @@ -32,6 +32,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: '{{ include "edp-tekton.registry" . }}/openpolicyagent/opa:0.45.0-debug' description: "opa image version" @@ -72,5 +75,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} + {{ 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 f91625d1..da2f1328 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 @@ -35,6 +35,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: '{{ include "edp-tekton.registry" . }}/openpolicyagent/opa:0.45.0-debug' description: "opa image version" @@ -75,5 +78,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} + {{ 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 95c2e088..798fbba6 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 @@ -36,6 +36,12 @@ spec: default: '{{ include "edp-tekton.registry" . }}/openpolicyagent/opa:0.45.0-debug' description: "opa image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -72,5 +78,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + {{ 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 6c32701e..a693bf75 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 @@ -39,6 +39,12 @@ spec: default: '{{ include "edp-tekton.registry" . }}/openpolicyagent/opa:0.45.0-debug' description: "opa image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -75,5 +81,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + {{ 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 e6ead3d0..0ade564b 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 @@ -13,6 +13,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ .Release.Namespace }}.{{ .Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -72,5 +75,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + {{ 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 87218e01..865eaffc 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 @@ -13,6 +13,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ .Release.Namespace }}.{{ .Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -75,5 +78,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + {{ 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 16a83bee..c697ad5e 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 @@ -32,6 +32,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -68,5 +71,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} + {{ 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 f9b1cca2..344c505e 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 @@ -35,6 +35,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -71,5 +74,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} + {{ 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 8a10217a..b499ed17 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 @@ -32,6 +32,12 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -68,5 +74,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + {{ 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 966ab3ad..0f18eef1 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 @@ -35,6 +35,12 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -71,5 +77,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + {{ 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 f851562b..8c98db6b 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 @@ -13,6 +13,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ .Release.Namespace }}.{{ .Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -68,5 +71,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + {{ 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 669ecdf6..117d3310 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 @@ -13,6 +13,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ .Release.Namespace }}.{{ .Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -71,5 +74,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + {{ end }} {{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/flask/bitbucket-build-default.yaml b/charts/pipelines-library/templates/pipelines/python/flask/bitbucket-build-default.yaml index 066977ae..581d5787 100644 --- a/charts/pipelines-library/templates/pipelines/python/flask/bitbucket-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/python/flask/bitbucket-build-default.yaml @@ -38,6 +38,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -168,6 +171,8 @@ spec: {{ include "finally-block-default" $ | nindent 2 }} +{{ include "bitbucket-build-vote" $ | nindent 4 }} + --- {{- end }} {{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/flask/bitbucket-build-edp.yaml b/charts/pipelines-library/templates/pipelines/python/flask/bitbucket-build-edp.yaml index 521deef8..2b74c7fc 100644 --- a/charts/pipelines-library/templates/pipelines/python/flask/bitbucket-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/python/flask/bitbucket-build-edp.yaml @@ -38,6 +38,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -168,6 +171,8 @@ spec: {{ include "finally-block-edp" $ | nindent 2 }} +{{ include "bitbucket-build-vote" $ | nindent 4 }} + --- {{- end }} {{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/flask/github-build-default.yaml b/charts/pipelines-library/templates/pipelines/python/flask/github-build-default.yaml index 0963a06e..143eaf4c 100644 --- a/charts/pipelines-library/templates/pipelines/python/flask/github-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/python/flask/github-build-default.yaml @@ -39,6 +39,12 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -170,6 +176,8 @@ spec: {{ include "finally-block-default" $ | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + --- {{- end }} {{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/flask/github-build-edp.yaml b/charts/pipelines-library/templates/pipelines/python/flask/github-build-edp.yaml index fca8bd04..abcc71cd 100644 --- a/charts/pipelines-library/templates/pipelines/python/flask/github-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/python/flask/github-build-edp.yaml @@ -38,6 +38,12 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -169,6 +175,8 @@ spec: {{ include "finally-block-edp" $ | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + --- {{- end }} {{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/flask/gitlab-build-default.yaml b/charts/pipelines-library/templates/pipelines/python/flask/gitlab-build-default.yaml index baee2bee..5ece0af9 100644 --- a/charts/pipelines-library/templates/pipelines/python/flask/gitlab-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/python/flask/gitlab-build-default.yaml @@ -16,6 +16,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -169,6 +172,8 @@ spec: {{ include "finally-block-default" $ | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + --- {{- end }} {{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/flask/gitlab-build-edp.yaml b/charts/pipelines-library/templates/pipelines/python/flask/gitlab-build-edp.yaml index f49626bb..c1168afb 100644 --- a/charts/pipelines-library/templates/pipelines/python/flask/gitlab-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/python/flask/gitlab-build-edp.yaml @@ -16,6 +16,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -169,6 +172,8 @@ spec: {{ include "finally-block-edp" $ | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + --- {{- end }} {{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-build-default.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-build-default.yaml index 044ec570..8015b091 100644 --- a/charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-build-default.yaml @@ -35,6 +35,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: '{{ include "edp-tekton.registry" . }}/python:3.8-slim' description: "python image version" @@ -101,5 +104,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "bitbucket-build-vote" . | nindent 4 }} + {{ end }} {{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-build-edp.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-build-edp.yaml index ee22a2d0..05da7505 100644 --- a/charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-build-edp.yaml @@ -35,6 +35,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: '{{ include "edp-tekton.registry" . }}/python:3.8-slim' description: "python image version" @@ -99,5 +102,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "bitbucket-build-vote" $ | nindent 4 }} + {{ end }} {{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-build-lib-default.yaml index 2062dce3..48c8c0da 100644 --- a/charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-build-lib-default.yaml @@ -35,6 +35,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: '{{ include "edp-tekton.registry" . }}/python:3.8-slim' description: "python image version" @@ -99,5 +102,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "bitbucket-build-vote" $ | nindent 4 }} + {{ end }} {{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-build-lib-edp.yaml index 4f6c9610..d996cf42 100644 --- a/charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/bitbucket-build-lib-edp.yaml @@ -35,6 +35,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: '{{ include "edp-tekton.registry" . }}/python:3.8-slim' description: "python image version" @@ -97,5 +100,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "bitbucket-build-vote" $ | nindent 4 }} + {{ end }} {{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/python3.8/github-build-default.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/github-build-default.yaml index 8ceba818..d382b299 100644 --- a/charts/pipelines-library/templates/pipelines/python/python3.8/github-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/github-build-default.yaml @@ -39,6 +39,12 @@ spec: default: '{{ include "edp-tekton.registry" . }}/python:3.8-slim' description: "python image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -101,5 +107,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + {{ end }} {{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/python3.8/github-build-edp.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/github-build-edp.yaml index da917d9f..1b89c7a6 100644 --- a/charts/pipelines-library/templates/pipelines/python/python3.8/github-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/github-build-edp.yaml @@ -39,6 +39,12 @@ spec: default: '{{ include "edp-tekton.registry" . }}/python:3.8-slim' description: "python image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -99,5 +105,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + {{ end }} {{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/python3.8/github-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/github-build-lib-default.yaml index 39fbc90d..ce58f8d6 100644 --- a/charts/pipelines-library/templates/pipelines/python/python3.8/github-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/github-build-lib-default.yaml @@ -39,6 +39,12 @@ spec: default: '{{ include "edp-tekton.registry" . }}/python:3.8-slim' description: "python image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -99,5 +105,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + {{ end }} {{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/python3.8/github-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/github-build-lib-edp.yaml index 9a703437..f57a4401 100644 --- a/charts/pipelines-library/templates/pipelines/python/python3.8/github-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/github-build-lib-edp.yaml @@ -39,6 +39,12 @@ spec: default: '{{ include "edp-tekton.registry" . }}/python:3.8-slim' description: "python image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -97,5 +103,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + {{ end }} {{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-build-default.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-build-default.yaml index 0b28c8b6..64925305 100644 --- a/charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-build-default.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-build-default.yaml @@ -13,6 +13,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ .Release.Namespace }}.{{ .Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -101,5 +104,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + {{ end }} {{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-build-edp.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-build-edp.yaml index 11920953..e5dd7761 100644 --- a/charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-build-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-build-edp.yaml @@ -13,6 +13,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ .Release.Namespace }}.{{ .Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -99,5 +102,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + {{ end }} {{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-build-lib-default.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-build-lib-default.yaml index b3886e4e..1dc83ef7 100644 --- a/charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-build-lib-default.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-build-lib-default.yaml @@ -13,6 +13,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ .Release.Namespace }}.{{ .Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -99,5 +102,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + {{ end }} {{ end }} diff --git a/charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-build-lib-edp.yaml b/charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-build-lib-edp.yaml index b0ba5f83..f7467083 100644 --- a/charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-build-lib-edp.yaml +++ b/charts/pipelines-library/templates/pipelines/python/python3.8/gitlab-build-lib-edp.yaml @@ -13,6 +13,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ .Release.Namespace }}.{{ .Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -97,5 +100,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + {{ 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 6f18fb58..3338a5cb 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 @@ -41,6 +41,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: '{{ $image }}' description: "maven image version" @@ -123,6 +126,8 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "bitbucket-build-vote" $ | nindent 4 }} + --- {{ 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 9d42196c..99ab9af8 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 @@ -41,6 +41,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: image default: '{{ $image }}' description: "maven image version" @@ -117,6 +120,8 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "bitbucket-build-vote" $ | nindent 4 }} + --- {{ 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 121e47d5..47f512c6 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 @@ -43,6 +43,12 @@ spec: default: '{{ $image }}' description: "maven image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: sonar_image default: '{{ $sonarImage }}' description: "sonar image version" @@ -121,6 +127,8 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + --- {{ 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 dbf4bc26..a7a15044 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 @@ -43,6 +43,12 @@ spec: default: '{{ $image }}' description: "maven image version" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: sonar_image default: '{{ $sonarImage }}' description: "sonar image version" @@ -115,6 +121,8 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + --- {{ 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 066cf474..8801f78c 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 @@ -19,6 +19,9 @@ spec: - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -124,6 +127,8 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + --- {{ 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 434b90c9..b6f610fc 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 @@ -19,6 +19,9 @@ spec: - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ $.Release.Namespace }}.{{ $.Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -117,6 +120,8 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + --- {{ 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 93b48644..f2aa4939 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 @@ -32,6 +32,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -72,5 +75,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "bitbucket-build-vote" $ | nindent 4 }} + {{ 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 e481064f..4c29fc12 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 @@ -35,6 +35,9 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -75,5 +78,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "bitbucket-build-vote" $ | nindent 4 }} + {{ 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 fb967199..84c9c6d6 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 @@ -32,6 +32,12 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -72,5 +78,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + {{ 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 d946e566..3f9c2b7b 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 @@ -35,6 +35,12 @@ spec: description: Change number from Merge Request default: "" type: string + - name: gitsha + description: "commit sha" + type: string + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: TICKET_NAME_PATTERN description: "Ticket name pattern" default: "" @@ -75,5 +81,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "github-build-vote" . | nindent 4 }} + {{ 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 61df3ebf..a2f17d22 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 @@ -13,6 +13,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ .Release.Namespace }}.{{ .Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -72,5 +75,7 @@ spec: {{ include "finally-block-default" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + {{ 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 1ede7e99..354938f9 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 @@ -13,6 +13,9 @@ spec: - name: shared-workspace - name: ssh-creds params: + - name: gitfullrepositoryname + description: "repository full name" + type: string - name: pipelineUrl default: https://portal-{{ .Release.Namespace }}.{{ .Values.global.dnsWildCard }}/c/main/pipelines/$(context.pipelineRun.namespace)/$(context.pipelineRun.name) type: string @@ -75,5 +78,7 @@ spec: {{ include "finally-block-edp" . | nindent 2 }} +{{ include "gitlab-build-vote" . | nindent 4 }} + {{ end }} {{ end }} diff --git a/charts/pipelines-library/templates/tasks/bitbucket-set-status.yaml b/charts/pipelines-library/templates/tasks/bitbucket-set-status.yaml index 0086ca60..a0dc9657 100644 --- a/charts/pipelines-library/templates/tasks/bitbucket-set-status.yaml +++ b/charts/pipelines-library/templates/tasks/bitbucket-set-status.yaml @@ -85,6 +85,14 @@ spec: Python path. Depends on the image. type: string default: /usr/bin/env python + - name: KEY + description: | + The key that holds the status, e.g., build, review, deploy. + type: string + - name: NAME + description: | + If the name field is present, it'll be displayed to users in the UI. + type: string steps: - name: set-status volumeMounts: @@ -113,6 +121,10 @@ spec: value: $(params.AUTH_TYPE) - name: SHEBANG value: $(params.SHEBANG) + - name: KEY + value: $(params.KEY) + - name: NAME + value: $(params.NAME) image: $(params.IMAGE) script: | @@ -138,7 +150,8 @@ spec: "state": os.getenv("STATE"), "url": os.getenv("TARGET_URL"), "description": os.getenv("DESCRIPTION"), - "key": "build" + "key": os.getenv("KEY"), + "name": os.getenv("NAME") } authHeader = os.getenv("AUTH_TYPE") + " " + bitbucket_token @@ -170,5 +183,8 @@ spec: print("Bitbucket status '{state}' has been set on {repo}#{sha}".format( state=os.getenv("STATE"), repo=os.getenv("REPO_FULL_NAME"), - sha=os.getenv("SHA"))) + sha=os.getenv("SHA"), + key=os.getenv("KEY"), + name=os.getenv("NAME"),) + ) {{ end }} diff --git a/charts/pipelines-library/templates/triggers/bitbucket/triggerbinding-build.yaml b/charts/pipelines-library/templates/triggers/bitbucket/triggerbinding-build.yaml index 91a778f4..4631f4db 100644 --- a/charts/pipelines-library/templates/triggers/bitbucket/triggerbinding-build.yaml +++ b/charts/pipelines-library/templates/triggers/bitbucket/triggerbinding-build.yaml @@ -13,6 +13,8 @@ spec: value: "git@bitbucket.org:$(body.repository.full_name).git" - name: gitrepositoryname value: $(body.repository.name) + - name: gitfullrepositoryname + value: "$(body.repository.full_name)" - name: codebase value: "$(extensions.codebase)" - name: codebasebranch diff --git a/charts/pipelines-library/templates/triggers/bitbucket/tt-build.yaml b/charts/pipelines-library/templates/triggers/bitbucket/tt-build.yaml index 2572f986..212b2bde 100644 --- a/charts/pipelines-library/templates/triggers/bitbucket/tt-build.yaml +++ b/charts/pipelines-library/templates/triggers/bitbucket/tt-build.yaml @@ -10,6 +10,8 @@ spec: - name: gitrevision - name: gitrepositoryurl - name: gitrepositoryname + - name: gitfullrepositoryname + description: Full Repo name. Used in "bitbucket-set-status" step as REPO_PATH_ONLY - name: codebase description: Codebase name used in pipeline - name: codebasebranch @@ -50,6 +52,8 @@ spec: value: $(tt.params.gitrepositoryurl) - name: git-source-revision value: $(tt.params.gitrevision) + - name: gitfullrepositoryname + value: $(tt.params.gitfullrepositoryname) - name: CODEBASE_NAME value: $(tt.params.codebase) - name: CODEBASEBRANCH_NAME diff --git a/charts/pipelines-library/templates/triggers/github/triggerbinding-build.yaml b/charts/pipelines-library/templates/triggers/github/triggerbinding-build.yaml index 67f4f77d..7e0d6b12 100644 --- a/charts/pipelines-library/templates/triggers/github/triggerbinding-build.yaml +++ b/charts/pipelines-library/templates/triggers/github/triggerbinding-build.yaml @@ -13,6 +13,10 @@ spec: value: "$(body.repository.ssh_url)" - name: gitrepositoryname value: "$(body.repository.name)" + - name: gitsha + value: $(extensions.pullRequest.headSha) + - name: gitfullrepositoryname + value: $(body.repository.full_name) - name: codebase value: "$(extensions.codebase)" - name: codebasebranch diff --git a/charts/pipelines-library/templates/triggers/github/tt-build.yaml b/charts/pipelines-library/templates/triggers/github/tt-build.yaml index e004c06e..da943e82 100644 --- a/charts/pipelines-library/templates/triggers/github/tt-build.yaml +++ b/charts/pipelines-library/templates/triggers/github/tt-build.yaml @@ -11,6 +11,8 @@ spec: - name: gitrepositoryurl - name: gitrepositoryname - name: codebase + - name: gitsha + - name: gitfullrepositoryname description: Codebase name used in pipeline - name: codebasebranch description: Codebasebranch name used in pipeline @@ -56,6 +58,10 @@ spec: value: $(tt.params.codebasebranch) - name: changeNumber value: $(tt.params.changeNumber) + - name: gitsha + value: $(tt.params.gitsha) + - name: gitfullrepositoryname + value: $(tt.params.gitfullrepositoryname) - name: TICKET_NAME_PATTERN value: $(tt.params.ticketNamePattern) - name: COMMIT_MESSAGE_PATTERN diff --git a/charts/pipelines-library/templates/triggers/gitlab/triggerbinding-build.yaml b/charts/pipelines-library/templates/triggers/gitlab/triggerbinding-build.yaml index 5dac95c6..9b4a0922 100644 --- a/charts/pipelines-library/templates/triggers/gitlab/triggerbinding-build.yaml +++ b/charts/pipelines-library/templates/triggers/gitlab/triggerbinding-build.yaml @@ -17,6 +17,8 @@ spec: value: "$(extensions.codebase)" - name: codebasebranch value: "$(extensions.codebasebranch)" + - name: gitfullrepositoryname + value: $(body.object_attributes.target.path_with_namespace) - name: changeNumber value: "$(extensions.pullRequest.changeNumber)" # commitMessage is used for 'push-to-jira' Task diff --git a/charts/pipelines-library/templates/triggers/gitlab/tt-build.yaml b/charts/pipelines-library/templates/triggers/gitlab/tt-build.yaml index 9ec24ae3..dfa6fb88 100644 --- a/charts/pipelines-library/templates/triggers/gitlab/tt-build.yaml +++ b/charts/pipelines-library/templates/triggers/gitlab/tt-build.yaml @@ -10,6 +10,7 @@ spec: - name: gitrevision - name: gitrepositoryurl - name: gitrepositoryname + - name: gitfullrepositoryname - name: codebase description: Codebase name used in pipeline - name: codebasebranch @@ -56,6 +57,8 @@ spec: value: $(tt.params.codebasebranch) - name: changeNumber value: $(tt.params.changeNumber) + - name: gitfullrepositoryname + value: $(tt.params.gitfullrepositoryname) - name: TICKET_NAME_PATTERN value: $(tt.params.ticketNamePattern) - name: COMMIT_MESSAGE_PATTERN diff --git a/charts/pipelines-library/tests/test_container_pipelines.py b/charts/pipelines-library/tests/test_container_pipelines.py index 518dc822..ae013858 100644 --- a/charts/pipelines-library/tests/test_container_pipelines.py +++ b/charts/pipelines-library/tests/test_container_pipelines.py @@ -98,32 +98,38 @@ def test_container_pipelines_harbor_github(): # build with default versioning btd = r["pipeline"][github_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "security" in btd[3]["name"] - assert "dockerfile-lint" in btd[4]["name"] + assert "github-set-pending-status" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "security" in btd[4]["name"] + assert "dockerfile-lint" in btd[5]["name"] # ensure we have default versioning - assert "kaniko-build" in btd[5]["name"] - assert buildtool == btd[5]["taskRef"]["name"] - assert "git-tag" in btd[6]["name"] - assert "update-cbis" in btd[7]["name"] + assert "kaniko-build" in btd[6]["name"] + assert buildtool == btd[6]["taskRef"]["name"] + assert "git-tag" in btd[7]["name"] + assert "update-cbis" in btd[8]["name"] assert "push-to-jira" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "github-set-success-status" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "github-set-failure-status" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][github_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "security" in btedp[3]["name"] - assert "dockerfile-lint" in btedp[4]["name"] - assert "kaniko-build" in btedp[5]["name"] - assert "git-tag" in btedp[6]["name"] - assert "update-cbis" in btedp[7]["name"] + assert "github-set-pending-status" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "security" in btedp[4]["name"] + assert "dockerfile-lint" in btedp[5]["name"] + assert "kaniko-build" in btedp[6]["name"] + assert "git-tag" in btedp[7]["name"] + assert "update-cbis" in btedp[8]["name"] assert "update-cbb" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "github-set-success-status" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "github-set-failure-status" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][3]["name"] def test_container_pipelines_harbor_gitlab(): @@ -159,32 +165,38 @@ def test_container_pipelines_harbor_gitlab(): # build with default versioning btd = r["pipeline"][gitlab_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "security" in btd[3]["name"] - assert "dockerfile-lint" in btd[4]["name"] + assert "report-pipeline-start-to-gitlab" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "security" in btd[4]["name"] + assert "dockerfile-lint" in btd[5]["name"] # ensure we have default versioning - assert "kaniko-build" in btd[5]["name"] - assert buildtool == btd[5]["taskRef"]["name"] - assert "git-tag" in btd[6]["name"] - assert "update-cbis" in btd[7]["name"] + assert "kaniko-build" in btd[6]["name"] + assert buildtool == btd[6]["taskRef"]["name"] + assert "git-tag" in btd[7]["name"] + assert "update-cbis" in btd[8]["name"] assert "push-to-jira" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "gitlab-set-success-status" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "gitlab-set-failure-status" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][gitlab_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "security" in btedp[3]["name"] - assert "dockerfile-lint" in btedp[4]["name"] - assert "kaniko-build" in btedp[5]["name"] - assert "git-tag" in btedp[6]["name"] - assert "update-cbis" in btedp[7]["name"] + assert "report-pipeline-start-to-gitlab" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "security" in btedp[4]["name"] + assert "dockerfile-lint" in btedp[5]["name"] + assert "kaniko-build" in btedp[6]["name"] + assert "git-tag" in btedp[7]["name"] + assert "update-cbis" in btedp[8]["name"] assert "update-cbb" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "gitlab-set-success-status" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "gitlab-set-failure-status" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][3]["name"] def test_container_pipelines_harbor_bitbucket(): config = """ @@ -219,29 +231,35 @@ def test_container_pipelines_harbor_bitbucket(): # build with default versioning btd = r["pipeline"][bitbucket_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "security" in btd[3]["name"] - assert "dockerfile-lint" in btd[4]["name"] + assert "bitbucket-set-pending-status" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "security" in btd[4]["name"] + assert "dockerfile-lint" in btd[5]["name"] # ensure we have default versioning - assert "kaniko-build" in btd[5]["name"] - assert buildtool == btd[5]["taskRef"]["name"] - assert "git-tag" in btd[6]["name"] - assert "update-cbis" in btd[7]["name"] + assert "kaniko-build" in btd[6]["name"] + assert buildtool == btd[6]["taskRef"]["name"] + assert "git-tag" in btd[7]["name"] + assert "update-cbis" in btd[8]["name"] assert "push-to-jira" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "bitbucket-set-success-status" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "bitbucket-set-failure-status" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "security" in btedp[3]["name"] - assert "dockerfile-lint" in btedp[4]["name"] - assert "kaniko-build" in btedp[5]["name"] - assert "git-tag" in btedp[6]["name"] - assert "update-cbis" in btedp[7]["name"] + assert "bitbucket-set-pending-status" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "security" in btedp[4]["name"] + assert "dockerfile-lint" in btedp[5]["name"] + assert "kaniko-build" in btedp[6]["name"] + assert "git-tag" in btedp[7]["name"] + assert "update-cbis" in btedp[8]["name"] assert "update-cbb" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "bitbucket-set-success-status" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "bitbucket-set-failure-status" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][3]["name"] diff --git a/charts/pipelines-library/tests/test_dotnet_pipelines.py b/charts/pipelines-library/tests/test_dotnet_pipelines.py index a64e00ad..3e5c3dc7 100644 --- a/charts/pipelines-library/tests/test_dotnet_pipelines.py +++ b/charts/pipelines-library/tests/test_dotnet_pipelines.py @@ -161,52 +161,58 @@ def test_dotnet_pipelines_harbor_gitlab(): # build with default versioning bd = ht["pipeline"][build_default]["spec"]["tasks"] - assert "fetch-repository" in bd[0]["name"] - assert "init-values" in bd[1]["name"] - assert "get-version" in bd[2]["name"] - assert f"get-version-dotnet-default" == bd[2]["taskRef"]["name"] - assert "get-cache" in bd[3]["name"] - assert "security" in bd[4]["name"] - assert "build" in bd[5]["name"] - assert "sonar" in bd[6]["name"] - assert "push" in bd[7]["name"] - assert buildtool == bd[7]["taskRef"]["name"] + assert "report-pipeline-start-to-gitlab" in bd[0]["name"] + assert "fetch-repository" in bd[1]["name"] + assert "init-values" in bd[2]["name"] + assert "get-version" in bd[3]["name"] + assert f"get-version-dotnet-default" == bd[3]["taskRef"]["name"] + assert "get-cache" in bd[4]["name"] + assert "security" in bd[5]["name"] + assert "build" in bd[6]["name"] + assert "sonar" in bd[7]["name"] + assert "push" in bd[8]["name"] + assert buildtool == bd[8]["taskRef"]["name"] if cbtype == "app": - assert "dotnet-publish" in bd[8]["name"] - assert "kaniko-build" in bd[9]["name"] - assert "save-cache" in bd[10]["name"] - assert "git-tag" in bd[11]["name"] - assert "update-cbis" in bd[12]["name"] + assert "dotnet-publish" in bd[9]["name"] + assert "kaniko-build" in bd[10]["name"] + assert "save-cache" in bd[11]["name"] + assert "git-tag" in bd[12]["name"] + assert "update-cbis" in bd[13]["name"] if cbtype == "lib": - assert "save-cache" in bd[8]["name"] - assert "git-tag" in bd[9]["name"] + assert "save-cache" in bd[9]["name"] + assert "git-tag" in bd[10]["name"] assert "push-to-jira" in ht["pipeline"][build_default]["spec"]["finally"][0]["name"] + assert "gitlab-set-success-status" in ht["pipeline"][build_default]["spec"]["finally"][1]["name"] + assert "gitlab-set-failure-status" in ht["pipeline"][build_default]["spec"]["finally"][2]["name"] # build with edp versioning bedp = ht["pipeline"][build_edp]["spec"]["tasks"] - assert "fetch-repository" in bedp[0]["name"] - assert "init-values" in bedp[1]["name"] - assert "get-version" in bedp[2]["name"] - assert "get-version-edp" == bedp[2]["taskRef"]["name"] - assert "get-cache" in bedp[3]["taskRef"]["name"] - assert "update-build-number" in bedp[4]["taskRef"]["name"] - assert f"update-build-number-csharp" == bedp[4]["taskRef"]["name"] - assert "security" in bedp[5]["name"] - assert "build" in bedp[6]["name"] - assert "sonar" in bedp[7]["name"] - assert "push" in bedp[8]["name"] - assert buildtool == bedp[8]["taskRef"]["name"] + assert "report-pipeline-start-to-gitlab" in bedp[0]["name"] + assert "fetch-repository" in bedp[1]["name"] + assert "init-values" in bedp[2]["name"] + assert "get-version" in bedp[3]["name"] + assert "get-version-edp" == bedp[3]["taskRef"]["name"] + assert "get-cache" in bedp[4]["taskRef"]["name"] + assert "update-build-number" in bedp[5]["taskRef"]["name"] + assert f"update-build-number-csharp" == bedp[5]["taskRef"]["name"] + assert "security" in bedp[6]["name"] + assert "build" in bedp[7]["name"] + assert "sonar" in bedp[8]["name"] + assert "push" in bedp[9]["name"] + assert buildtool == bedp[9]["taskRef"]["name"] if cbtype == "app": - assert "dotnet-publish" in bedp[9]["name"] - assert "kaniko-build" in bedp[10]["name"] - assert "save-cache" in bedp[11]["name"] - assert "git-tag" in bedp[12]["name"] - assert "update-cbis" in bedp[13]["name"] + assert "dotnet-publish" in bedp[10]["name"] + assert "kaniko-build" in bedp[11]["name"] + assert "save-cache" in bedp[12]["name"] + assert "git-tag" in bedp[13]["name"] + assert "update-cbis" in bedp[14]["name"] if cbtype == "lib": - assert "save-cache" in bedp[9]["name"] - assert "git-tag" in bedp[10]["name"] + assert "save-cache" in bedp[10]["name"] + assert "git-tag" in bedp[11]["name"] assert "update-cbb" in ht["pipeline"][build_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in ht["pipeline"][build_edp]["spec"]["finally"][1]["name"] + assert "gitlab-set-success-status" in ht["pipeline"][build_edp]["spec"]["finally"][2]["name"] + assert "gitlab-set-failure-status" in ht["pipeline"][build_edp]["spec"]["finally"][3]["name"] def test_dotnet_pipelines_harbor_github(): @@ -264,52 +270,58 @@ def test_dotnet_pipelines_harbor_github(): # build with default versioning bd = ht["pipeline"][build_default]["spec"]["tasks"] - assert "fetch-repository" in bd[0]["name"] - assert "init-values" in bd[1]["name"] - assert "get-version" in bd[2]["name"] - assert f"get-version-dotnet-default" == bd[2]["taskRef"]["name"] - assert "get-cache" in bd[3]["name"] - assert "security" in bd[4]["name"] - assert "build" in bd[5]["name"] - assert "sonar" in bd[6]["name"] - assert "push" in bd[7]["name"] - assert buildtool == bd[7]["taskRef"]["name"] + assert "github-set-pending-status" in bd[0]["name"] + assert "fetch-repository" in bd[1]["name"] + assert "init-values" in bd[2]["name"] + assert "get-version" in bd[3]["name"] + assert f"get-version-dotnet-default" == bd[3]["taskRef"]["name"] + assert "get-cache" in bd[4]["name"] + assert "security" in bd[5]["name"] + assert "build" in bd[6]["name"] + assert "sonar" in bd[7]["name"] + assert "push" in bd[8]["name"] + assert buildtool == bd[8]["taskRef"]["name"] if cbtype == "app": - assert "dotnet-publish" in bd[8]["name"] - assert "kaniko-build" in bd[9]["name"] - assert "save-cache" in bd[10]["name"] - assert "git-tag" in bd[11]["name"] - assert "update-cbis" in bd[12]["name"] + assert "dotnet-publish" in bd[9]["name"] + assert "kaniko-build" in bd[10]["name"] + assert "save-cache" in bd[11]["name"] + assert "git-tag" in bd[12]["name"] + assert "update-cbis" in bd[13]["name"] if cbtype == "lib": - assert "save-cache" in bd[8]["name"] - assert "git-tag" in bd[9]["name"] + assert "save-cache" in bd[9]["name"] + assert "git-tag" in bd[10]["name"] assert "push-to-jira" in ht["pipeline"][build_default]["spec"]["finally"][0]["name"] + assert "github-set-success-status" in ht["pipeline"][build_default]["spec"]["finally"][1]["name"] + assert "github-set-failure-status" in ht["pipeline"][build_default]["spec"]["finally"][2]["name"] # build with edp versioning bedp = ht["pipeline"][build_edp]["spec"]["tasks"] - assert "fetch-repository" in bedp[0]["name"] - assert "init-values" in bedp[1]["name"] - assert "get-version" in bedp[2]["name"] - assert "get-version-edp" == bedp[2]["taskRef"]["name"] - assert "get-cache" in bedp[3]["taskRef"]["name"] - assert "update-build-number" in bedp[4]["taskRef"]["name"] - assert f"update-build-number-csharp" == bedp[4]["taskRef"]["name"] - assert "security" in bedp[5]["name"] - assert "build" in bedp[6]["name"] - assert "sonar" in bedp[7]["name"] - assert "push" in bedp[8]["name"] - assert buildtool == bedp[8]["taskRef"]["name"] + assert "github-set-pending-status" in bedp[0]["name"] + assert "fetch-repository" in bedp[1]["name"] + assert "init-values" in bedp[2]["name"] + assert "get-version" in bedp[3]["name"] + assert "get-version-edp" == bedp[3]["taskRef"]["name"] + assert "get-cache" in bedp[4]["taskRef"]["name"] + assert "update-build-number" in bedp[5]["taskRef"]["name"] + assert f"update-build-number-csharp" == bedp[5]["taskRef"]["name"] + assert "security" in bedp[6]["name"] + assert "build" in bedp[7]["name"] + assert "sonar" in bedp[8]["name"] + assert "push" in bedp[9]["name"] + assert buildtool == bedp[9]["taskRef"]["name"] if cbtype == "app": - assert "dotnet-publish" in bedp[9]["name"] - assert "kaniko-build" in bedp[10]["name"] - assert "save-cache" in bedp[11]["name"] - assert "git-tag" in bedp[12]["name"] - assert "update-cbis" in bedp[13]["name"] + assert "dotnet-publish" in bedp[10]["name"] + assert "kaniko-build" in bedp[11]["name"] + assert "save-cache" in bedp[12]["name"] + assert "git-tag" in bedp[13]["name"] + assert "update-cbis" in bedp[14]["name"] if cbtype == "lib": - assert "save-cache" in bedp[9]["name"] - assert "git-tag" in bedp[10]["name"] + assert "save-cache" in bedp[10]["name"] + assert "git-tag" in bedp[11]["name"] assert "update-cbb" in ht["pipeline"][build_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in ht["pipeline"][build_edp]["spec"]["finally"][1]["name"] + assert "github-set-success-status" in ht["pipeline"][build_edp]["spec"]["finally"][2]["name"] + assert "github-set-failure-status" in ht["pipeline"][build_edp]["spec"]["finally"][3]["name"] def test_dotnet_pipelines_harbor_bitbucket(): config = """ @@ -366,49 +378,55 @@ def test_dotnet_pipelines_harbor_bitbucket(): # build with default versioning bd = ht["pipeline"][build_default]["spec"]["tasks"] - assert "fetch-repository" in bd[0]["name"] - assert "init-values" in bd[1]["name"] - assert "get-version" in bd[2]["name"] - assert f"get-version-dotnet-default" == bd[2]["taskRef"]["name"] - assert "get-cache" in bd[3]["name"] - assert "security" in bd[4]["name"] - assert "build" in bd[5]["name"] - assert "sonar" in bd[6]["name"] - assert "push" in bd[7]["name"] - assert buildtool == bd[7]["taskRef"]["name"] + assert "bitbucket-set-pending-status" in bd[0]["name"] + assert "fetch-repository" in bd[1]["name"] + assert "init-values" in bd[2]["name"] + assert "get-version" in bd[3]["name"] + assert f"get-version-dotnet-default" == bd[3]["taskRef"]["name"] + assert "get-cache" in bd[4]["name"] + assert "security" in bd[5]["name"] + assert "build" in bd[6]["name"] + assert "sonar" in bd[7]["name"] + assert "push" in bd[8]["name"] + assert buildtool == bd[8]["taskRef"]["name"] if cbtype == "app": - assert "dotnet-publish" in bd[8]["name"] - assert "kaniko-build" in bd[9]["name"] - assert "save-cache" in bd[10]["name"] - assert "git-tag" in bd[11]["name"] - assert "update-cbis" in bd[12]["name"] + assert "dotnet-publish" in bd[9]["name"] + assert "kaniko-build" in bd[10]["name"] + assert "save-cache" in bd[11]["name"] + assert "git-tag" in bd[12]["name"] + assert "update-cbis" in bd[13]["name"] if cbtype == "lib": - assert "save-cache" in bd[8]["name"] - assert "git-tag" in bd[9]["name"] + assert "save-cache" in bd[9]["name"] + assert "git-tag" in bd[10]["name"] assert "push-to-jira" in ht["pipeline"][build_default]["spec"]["finally"][0]["name"] + assert "bitbucket-set-success-status" in ht["pipeline"][build_default]["spec"]["finally"][1]["name"] + assert "bitbucket-set-failure-status" in ht["pipeline"][build_default]["spec"]["finally"][2]["name"] # build with edp versioning bedp = ht["pipeline"][build_edp]["spec"]["tasks"] - assert "fetch-repository" in bedp[0]["name"] - assert "init-values" in bedp[1]["name"] - assert "get-version" in bedp[2]["name"] - assert "get-version-edp" == bedp[2]["taskRef"]["name"] - assert "get-cache" in bedp[3]["taskRef"]["name"] - assert "update-build-number" in bedp[4]["taskRef"]["name"] - assert f"update-build-number-csharp" == bedp[4]["taskRef"]["name"] - assert "security" in bedp[5]["name"] - assert "build" in bedp[6]["name"] - assert "sonar" in bedp[7]["name"] - assert "push" in bedp[8]["name"] - assert buildtool == bedp[8]["taskRef"]["name"] + assert "bitbucket-set-pending-status" in bedp[0]["name"] + assert "fetch-repository" in bedp[1]["name"] + assert "init-values" in bedp[2]["name"] + assert "get-version" in bedp[3]["name"] + assert "get-version-edp" == bedp[3]["taskRef"]["name"] + assert "get-cache" in bedp[4]["taskRef"]["name"] + assert "update-build-number" in bedp[5]["taskRef"]["name"] + assert f"update-build-number-csharp" == bedp[5]["taskRef"]["name"] + assert "security" in bedp[6]["name"] + assert "build" in bedp[7]["name"] + assert "sonar" in bedp[8]["name"] + assert "push" in bedp[9]["name"] + assert buildtool == bedp[9]["taskRef"]["name"] if cbtype == "app": - assert "dotnet-publish" in bedp[9]["name"] - assert "kaniko-build" in bedp[10]["name"] - assert "save-cache" in bedp[11]["name"] - assert "git-tag" in bedp[12]["name"] - assert "update-cbis" in bedp[13]["name"] + assert "dotnet-publish" in bedp[10]["name"] + assert "kaniko-build" in bedp[11]["name"] + assert "save-cache" in bedp[12]["name"] + assert "git-tag" in bedp[13]["name"] + assert "update-cbis" in bedp[14]["name"] if cbtype == "lib": - assert "save-cache" in bedp[9]["name"] - assert "git-tag" in bedp[10]["name"] + assert "save-cache" in bedp[10]["name"] + assert "git-tag" in bedp[11]["name"] assert "update-cbb" in ht["pipeline"][build_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in ht["pipeline"][build_edp]["spec"]["finally"][1]["name"] + assert "bitbucket-set-success-status" in ht["pipeline"][build_edp]["spec"]["finally"][2]["name"] + assert "bitbucket-set-failure-status" in ht["pipeline"][build_edp]["spec"]["finally"][3]["name"] diff --git a/charts/pipelines-library/tests/test_go_pipelines.py b/charts/pipelines-library/tests/test_go_pipelines.py index 76eec774..ae2600fa 100644 --- a/charts/pipelines-library/tests/test_go_pipelines.py +++ b/charts/pipelines-library/tests/test_go_pipelines.py @@ -116,41 +116,47 @@ def test_go_pipelines_harbor_github(): # build with default versioning btd = r["pipeline"][github_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] + assert "github-set-pending-status" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] # ensure we have default versioning - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "get-cache" in btd[3]["name"] - assert "security" in btd[4]["name"] - assert "build" in btd[5]["name"] - assert "golang" == btd[5]["taskRef"]["name"] - assert "sonar" in btd[6]["name"] - assert "sonarqube-general" == btd[6]["taskRef"]["name"] - assert "kaniko-build" in btd[7]["name"] - assert "save-cache" in btd[8]["name"] - assert "git-tag" in btd[9]["name"] - assert "update-cbis" in btd[10]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "get-cache" in btd[4]["name"] + assert "security" in btd[5]["name"] + assert "build" in btd[6]["name"] + assert "golang" == btd[6]["taskRef"]["name"] + assert "sonar" in btd[7]["name"] + assert "sonarqube-general" == btd[7]["taskRef"]["name"] + assert "kaniko-build" in btd[8]["name"] + assert "save-cache" in btd[9]["name"] + assert "git-tag" in btd[10]["name"] + assert "update-cbis" in btd[11]["name"] assert "push-to-jira" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "github-set-success-status" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "github-set-failure-status" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][github_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "get-cache" in btd[3]["name"] - assert "security" in btedp[4]["name"] - assert "build" in btedp[5]["name"] - assert "golang" == btedp[5]["taskRef"]["name"] - assert "sonar" in btedp[6]["name"] - assert "sonarqube-general" == btedp[6]["taskRef"]["name"] - assert "kaniko-build" in btedp[7]["name"] - assert "save-cache" in btedp[8]["name"] - assert "git-tag" in btedp[9]["name"] - assert "update-cbis" in btedp[10]["name"] + assert "github-set-pending-status" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "get-cache" in btd[4]["name"] + assert "security" in btedp[5]["name"] + assert "build" in btedp[6]["name"] + assert "golang" == btedp[6]["taskRef"]["name"] + assert "sonar" in btedp[7]["name"] + assert "sonarqube-general" == btedp[7]["taskRef"]["name"] + assert "kaniko-build" in btedp[8]["name"] + assert "save-cache" in btedp[9]["name"] + assert "git-tag" in btedp[10]["name"] + assert "update-cbis" in btedp[11]["name"] assert "update-cbb" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "github-set-success-status" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "github-set-failure-status" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][3]["name"] def test_go_pipelines_harbor_gitlab(): @@ -192,41 +198,47 @@ def test_go_pipelines_harbor_gitlab(): # build with default versioning btd = r["pipeline"][build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] + assert "report-pipeline-start-to-gitlab" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] # ensure we have default versioning - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "get-cache" in btd[3]["name"] - assert "security" in btd[4]["name"] - assert "build" in btd[5]["name"] - assert "golang" == btd[5]["taskRef"]["name"] - assert "sonar" in btd[6]["name"] - assert "sonarqube-general" == btd[6]["taskRef"]["name"] - assert "kaniko-build" in btd[7]["name"] - assert "save-cache" in btd[8]["name"] - assert "git-tag" in btd[9]["name"] - assert "update-cbis" in btd[10]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "get-cache" in btd[4]["name"] + assert "security" in btd[5]["name"] + assert "build" in btd[6]["name"] + assert "golang" == btd[6]["taskRef"]["name"] + assert "sonar" in btd[7]["name"] + assert "sonarqube-general" == btd[7]["taskRef"]["name"] + assert "kaniko-build" in btd[8]["name"] + assert "save-cache" in btd[9]["name"] + assert "git-tag" in btd[10]["name"] + assert "update-cbis" in btd[11]["name"] assert "push-to-jira" in r["pipeline"][build_pipeline_def]["spec"]["finally"][0]["name"] + assert "gitlab-set-success-status" in r["pipeline"][build_pipeline_def]["spec"]["finally"][1]["name"] + assert "gitlab-set-failure-status" in r["pipeline"][build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "get-cache" in btd[3]["name"] - assert "security" in btedp[4]["name"] - assert "build" in btedp[5]["name"] - assert "golang" == btedp[5]["taskRef"]["name"] - assert "sonar" in btedp[6]["name"] - assert "sonarqube-general" == btedp[6]["taskRef"]["name"] - assert "kaniko-build" in btedp[7]["name"] - assert "save-cache" in btedp[8]["name"] - assert "git-tag" in btedp[9]["name"] - assert "update-cbis" in btedp[10]["name"] + assert "report-pipeline-start-to-gitlab" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "get-cache" in btd[4]["name"] + assert "security" in btedp[5]["name"] + assert "build" in btedp[6]["name"] + assert "golang" == btedp[6]["taskRef"]["name"] + assert "sonar" in btedp[7]["name"] + assert "sonarqube-general" == btedp[7]["taskRef"]["name"] + assert "kaniko-build" in btedp[8]["name"] + assert "save-cache" in btedp[9]["name"] + assert "git-tag" in btedp[10]["name"] + assert "update-cbis" in btedp[11]["name"] assert "update-cbb" in r["pipeline"][build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "gitlab-set-success-status" in r["pipeline"][build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "gitlab-set-failure-status" in r["pipeline"][build_pipeline_edp]["spec"]["finally"][3]["name"] def test_go_pipelines_harbor_bitbucket(): config = """ @@ -267,38 +279,44 @@ def test_go_pipelines_harbor_bitbucket(): # build with default versioning btd = r["pipeline"][build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] + assert "bitbucket-set-pending-status" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] # ensure we have default versioning - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "get-cache" in btd[3]["name"] - assert "security" in btd[4]["name"] - assert "build" in btd[5]["name"] - assert "golang" == btd[5]["taskRef"]["name"] - assert "sonar" in btd[6]["name"] - assert "sonarqube-general" == btd[6]["taskRef"]["name"] - assert "kaniko-build" in btd[7]["name"] - assert "save-cache" in btd[8]["name"] - assert "git-tag" in btd[9]["name"] - assert "update-cbis" in btd[10]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "get-cache" in btd[4]["name"] + assert "security" in btd[5]["name"] + assert "build" in btd[6]["name"] + assert "golang" == btd[6]["taskRef"]["name"] + assert "sonar" in btd[7]["name"] + assert "sonarqube-general" == btd[7]["taskRef"]["name"] + assert "kaniko-build" in btd[8]["name"] + assert "save-cache" in btd[9]["name"] + assert "git-tag" in btd[10]["name"] + assert "update-cbis" in btd[11]["name"] assert "push-to-jira" in r["pipeline"][build_pipeline_def]["spec"]["finally"][0]["name"] + assert "bitbucket-set-success-status" in r["pipeline"][build_pipeline_def]["spec"]["finally"][1]["name"] + assert "bitbucket-set-failure-status" in r["pipeline"][build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "get-cache" in btd[3]["name"] - assert "security" in btedp[4]["name"] - assert "build" in btedp[5]["name"] - assert "golang" == btedp[5]["taskRef"]["name"] - assert "sonar" in btedp[6]["name"] - assert "sonarqube-general" == btedp[6]["taskRef"]["name"] - assert "kaniko-build" in btedp[7]["name"] - assert "save-cache" in btedp[8]["name"] - assert "git-tag" in btedp[9]["name"] - assert "update-cbis" in btedp[10]["name"] + assert "bitbucket-set-pending-status" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "get-cache" in btd[4]["name"] + assert "security" in btedp[5]["name"] + assert "build" in btedp[6]["name"] + assert "golang" == btedp[6]["taskRef"]["name"] + assert "sonar" in btedp[7]["name"] + assert "sonarqube-general" == btedp[7]["taskRef"]["name"] + assert "kaniko-build" in btedp[8]["name"] + assert "save-cache" in btedp[9]["name"] + assert "git-tag" in btedp[10]["name"] + assert "update-cbis" in btedp[11]["name"] assert "update-cbb" in r["pipeline"][build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "bitbucket-set-success-status" in r["pipeline"][build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "bitbucket-set-failure-status" in r["pipeline"][build_pipeline_edp]["spec"]["finally"][3]["name"] diff --git a/charts/pipelines-library/tests/test_groovy_pipelines.py b/charts/pipelines-library/tests/test_groovy_pipelines.py index 84a30064..dcc54086 100644 --- a/charts/pipelines-library/tests/test_groovy_pipelines.py +++ b/charts/pipelines-library/tests/test_groovy_pipelines.py @@ -100,34 +100,40 @@ def test_groovy_pipelines_github(): # build with default versioning btd = r["pipeline"][github_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] + assert "github-set-pending-status" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] # ensure we have default versioning - assert "get-version-default" == btd[2]["taskRef"]["name"] - assert "update-build-number" in btd[3]["name"] - assert "build" in btd[4]["name"] - assert "codenarc" == btd[4]["taskRef"]["name"] - assert "sonar" in btd[5]["name"] - assert "git-tag" in btd[6]["name"] - assert "update-cbis" in btd[7]["name"] + assert "get-version-default" == btd[3]["taskRef"]["name"] + assert "update-build-number" in btd[4]["name"] + assert "build" in btd[5]["name"] + assert "codenarc" == btd[5]["taskRef"]["name"] + assert "sonar" in btd[6]["name"] + assert "git-tag" in btd[7]["name"] + assert "update-cbis" in btd[8]["name"] assert "push-to-jira" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "github-set-success-status" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "github-set-failure-status" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][github_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "update-build-number" in btedp[3]["taskRef"]["name"] - assert "update-build-number-gradle" == btedp[3]["taskRef"]["name"] - assert "build" in btedp[4]["name"] - assert "codenarc" == btedp[4]["taskRef"]["name"] - assert "sonar" in btedp[5]["name"] - assert "git-tag" in btedp[6]["name"] - assert "update-cbis" in btedp[7]["name"] + assert "github-set-pending-status" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "update-build-number" in btedp[4]["taskRef"]["name"] + assert "update-build-number-gradle" == btedp[4]["taskRef"]["name"] + assert "build" in btedp[5]["name"] + assert "codenarc" == btedp[5]["taskRef"]["name"] + assert "sonar" in btedp[6]["name"] + assert "git-tag" in btedp[7]["name"] + assert "update-cbis" in btedp[8]["name"] assert "update-cbb" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "github-set-success-status" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "github-set-failure-status" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][3]["name"] def test_groovy_pipelines_gitlab(): config = """ @@ -164,34 +170,40 @@ def test_groovy_pipelines_gitlab(): # build with default versioning btd = r["pipeline"][gitlab_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] + assert "report-pipeline-start-to-gitlab" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] # ensure we have default versioning - assert "get-version-default" == btd[2]["taskRef"]["name"] - assert "update-build-number" in btd[3]["name"] - assert "build" in btd[4]["name"] - assert "codenarc" == btd[4]["taskRef"]["name"] - assert "sonar" in btd[5]["name"] - assert "git-tag" in btd[6]["name"] - assert "update-cbis" in btd[7]["name"] + assert "get-version-default" == btd[3]["taskRef"]["name"] + assert "update-build-number" in btd[4]["name"] + assert "build" in btd[5]["name"] + assert "codenarc" == btd[5]["taskRef"]["name"] + assert "sonar" in btd[6]["name"] + assert "git-tag" in btd[7]["name"] + assert "update-cbis" in btd[8]["name"] assert "push-to-jira" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "gitlab-set-success-status" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "gitlab-set-failure-status" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][gitlab_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "update-build-number" in btedp[3]["taskRef"]["name"] - assert "update-build-number-gradle" == btedp[3]["taskRef"]["name"] - assert "build" in btedp[4]["name"] - assert "codenarc" == btedp[4]["taskRef"]["name"] - assert "sonar" in btedp[5]["name"] - assert "git-tag" in btedp[6]["name"] - assert "update-cbis" in btedp[7]["name"] + assert "report-pipeline-start-to-gitlab" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "update-build-number" in btedp[4]["taskRef"]["name"] + assert "update-build-number-gradle" == btedp[4]["taskRef"]["name"] + assert "build" in btedp[5]["name"] + assert "codenarc" == btedp[5]["taskRef"]["name"] + assert "sonar" in btedp[6]["name"] + assert "git-tag" in btedp[7]["name"] + assert "update-cbis" in btedp[8]["name"] assert "update-cbb" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "gitlab-set-success-status" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "gitlab-set-failure-status" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][3]["name"] def test_groovy_pipelines_bitbucket(): config = """ @@ -228,31 +240,37 @@ def test_groovy_pipelines_bitbucket(): # build with default versioning btd = r["pipeline"][bitbucket_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] + assert "bitbucket-set-pending-status" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] # ensure we have default versioning - assert "get-version-default" == btd[2]["taskRef"]["name"] - assert "update-build-number" in btd[3]["name"] - assert "build" in btd[4]["name"] - assert "codenarc" == btd[4]["taskRef"]["name"] - assert "sonar" in btd[5]["name"] - assert "git-tag" in btd[6]["name"] - assert "update-cbis" in btd[7]["name"] + assert "get-version-default" == btd[3]["taskRef"]["name"] + assert "update-build-number" in btd[4]["name"] + assert "build" in btd[5]["name"] + assert "codenarc" == btd[5]["taskRef"]["name"] + assert "sonar" in btd[6]["name"] + assert "git-tag" in btd[7]["name"] + assert "update-cbis" in btd[8]["name"] assert "push-to-jira" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "bitbucket-set-success-status" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "bitbucket-set-failure-status" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "update-build-number" in btedp[3]["taskRef"]["name"] - assert "update-build-number-gradle" == btedp[3]["taskRef"]["name"] - assert "build" in btedp[4]["name"] - assert "codenarc" == btedp[4]["taskRef"]["name"] - assert "sonar" in btedp[5]["name"] - assert "git-tag" in btedp[6]["name"] - assert "update-cbis" in btedp[7]["name"] + assert "bitbucket-set-pending-status" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "update-build-number" in btedp[4]["taskRef"]["name"] + assert "update-build-number-gradle" == btedp[4]["taskRef"]["name"] + assert "build" in btedp[5]["name"] + assert "codenarc" == btedp[5]["taskRef"]["name"] + assert "sonar" in btedp[6]["name"] + assert "git-tag" in btedp[7]["name"] + assert "update-cbis" in btedp[8]["name"] assert "update-cbb" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "bitbucket-set-success-status" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "bitbucket-set-failure-status" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][3]["name"] diff --git a/charts/pipelines-library/tests/test_helm_pipeline_lib_pipelines.py b/charts/pipelines-library/tests/test_helm_pipeline_lib_pipelines.py index 21a94c04..8db84296 100644 --- a/charts/pipelines-library/tests/test_helm_pipeline_lib_pipelines.py +++ b/charts/pipelines-library/tests/test_helm_pipeline_lib_pipelines.py @@ -79,24 +79,30 @@ def test_helm_pipelines_gitlab(): assert "gitlab-set-failure-status" in ht["pipeline"][review]["spec"]["finally"][1]["name"] bdef = ht["pipeline"][build_def]["spec"]["tasks"] - assert "fetch-repository" in bdef[0]["name"] - assert "get-version" in bdef[1]["name"] - assert "helm-dependency-update" in bdef[2]["name"] - assert "helm-lint" in bdef[3]["name"] - assert "helm-template" in bdef[4]["name"] - assert "git-tag" in bdef[5]["name"] + assert "report-pipeline-start-to-gitlab" in bdef[0]["name"] + assert "fetch-repository" in bdef[1]["name"] + assert "get-version" in bdef[2]["name"] + assert "helm-dependency-update" in bdef[3]["name"] + assert "helm-lint" in bdef[4]["name"] + assert "helm-template" in bdef[5]["name"] + assert "git-tag" in bdef[6]["name"] assert "push-to-jira" in ht["pipeline"][build_def]["spec"]["finally"][0]["name"] + assert "gitlab-set-success-status" in ht["pipeline"][build_def]["spec"]["finally"][1]["name"] + assert "gitlab-set-failure-status" in ht["pipeline"][build_def]["spec"]["finally"][2]["name"] bedp = ht["pipeline"][build_edp]["spec"]["tasks"] - assert "fetch-repository" in bedp[0]["name"] - assert "get-version" in bedp[1]["name"] - assert "update-build-number" in bedp[2]["name"] - assert "helm-dependency-update" in bedp[3]["name"] - assert "helm-lint" in bedp[4]["name"] - assert "helm-template" in bedp[5]["name"] - assert "git-tag" in bedp[6]["name"] + assert "report-pipeline-start-to-gitlab" in bedp[0]["name"] + assert "fetch-repository" in bedp[1]["name"] + assert "get-version" in bedp[2]["name"] + assert "update-build-number" in bedp[3]["name"] + assert "helm-dependency-update" in bedp[4]["name"] + assert "helm-lint" in bedp[5]["name"] + assert "helm-template" in bedp[6]["name"] + assert "git-tag" in bedp[7]["name"] assert "update-cbb" in ht["pipeline"][build_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in ht["pipeline"][build_edp]["spec"]["finally"][1]["name"] + assert "gitlab-set-success-status" in ht["pipeline"][build_edp]["spec"]["finally"][2]["name"] + assert "gitlab-set-failure-status" in ht["pipeline"][build_edp]["spec"]["finally"][3]["name"] def test_helm_pipelines_github(): config = """ @@ -127,24 +133,30 @@ def test_helm_pipelines_github(): assert "github-set-failure-status" in ht["pipeline"][review]["spec"]["finally"][1]["name"] bdef = ht["pipeline"][build_def]["spec"]["tasks"] - assert "fetch-repository" in bdef[0]["name"] - assert "get-version" in bdef[1]["name"] - assert "helm-dependency-update" in bdef[2]["name"] - assert "helm-lint" in bdef[3]["name"] - assert "helm-template" in bdef[4]["name"] - assert "git-tag" in bdef[5]["name"] + assert "github-set-pending-status" in bdef[0]["name"] + assert "fetch-repository" in bdef[1]["name"] + assert "get-version" in bdef[2]["name"] + assert "helm-dependency-update" in bdef[3]["name"] + assert "helm-lint" in bdef[4]["name"] + assert "helm-template" in bdef[5]["name"] + assert "git-tag" in bdef[6]["name"] assert "push-to-jira" in ht["pipeline"][build_def]["spec"]["finally"][0]["name"] + assert "github-set-success-status" in ht["pipeline"][build_def]["spec"]["finally"][1]["name"] + assert "github-set-failure-status" in ht["pipeline"][build_def]["spec"]["finally"][2]["name"] bedp = ht["pipeline"][build_edp]["spec"]["tasks"] - assert "fetch-repository" in bedp[0]["name"] - assert "get-version" in bedp[1]["name"] - assert "update-build-number" in bedp[2]["name"] - assert "helm-dependency-update" in bedp[3]["name"] - assert "helm-lint" in bedp[4]["name"] - assert "helm-template" in bedp[5]["name"] - assert "git-tag" in bedp[6]["name"] + assert "github-set-pending-status" in bedp[0]["name"] + assert "fetch-repository" in bedp[1]["name"] + assert "get-version" in bedp[2]["name"] + assert "update-build-number" in bedp[3]["name"] + assert "helm-dependency-update" in bedp[4]["name"] + assert "helm-lint" in bedp[5]["name"] + assert "helm-template" in bedp[6]["name"] + assert "git-tag" in bedp[7]["name"] assert "update-cbb" in ht["pipeline"][build_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in ht["pipeline"][build_edp]["spec"]["finally"][1]["name"] + assert "github-set-success-status" in ht["pipeline"][build_edp]["spec"]["finally"][2]["name"] + assert "github-set-failure-status" in ht["pipeline"][build_edp]["spec"]["finally"][3]["name"] def test_helm_pipelines_bitbucket(): config = """ @@ -175,21 +187,27 @@ def test_helm_pipelines_bitbucket(): assert "bitbucket-set-failure-status" in ht["pipeline"][review]["spec"]["finally"][1]["name"] bdef = ht["pipeline"][build_def]["spec"]["tasks"] - assert "fetch-repository" in bdef[0]["name"] - assert "get-version" in bdef[1]["name"] - assert "helm-dependency-update" in bdef[2]["name"] - assert "helm-lint" in bdef[3]["name"] - assert "helm-template" in bdef[4]["name"] - assert "git-tag" in bdef[5]["name"] + assert "bitbucket-set-pending-status" in bdef[0]["name"] + assert "fetch-repository" in bdef[1]["name"] + assert "get-version" in bdef[2]["name"] + assert "helm-dependency-update" in bdef[3]["name"] + assert "helm-lint" in bdef[4]["name"] + assert "helm-template" in bdef[5]["name"] + assert "git-tag" in bdef[6]["name"] assert "push-to-jira" in ht["pipeline"][build_def]["spec"]["finally"][0]["name"] + assert "bitbucket-set-success-status" in ht["pipeline"][build_def]["spec"]["finally"][1]["name"] + assert "bitbucket-set-failure-status" in ht["pipeline"][build_def]["spec"]["finally"][2]["name"] bedp = ht["pipeline"][build_edp]["spec"]["tasks"] - assert "fetch-repository" in bedp[0]["name"] - assert "get-version" in bedp[1]["name"] - assert "update-build-number" in bedp[2]["name"] - assert "helm-dependency-update" in bedp[3]["name"] - assert "helm-lint" in bedp[4]["name"] - assert "helm-template" in bedp[5]["name"] - assert "git-tag" in bedp[6]["name"] + assert "bitbucket-set-pending-status" in bedp[0]["name"] + assert "fetch-repository" in bedp[1]["name"] + assert "get-version" in bedp[2]["name"] + assert "update-build-number" in bedp[3]["name"] + assert "helm-dependency-update" in bedp[4]["name"] + assert "helm-lint" in bedp[5]["name"] + assert "helm-template" in bedp[6]["name"] + assert "git-tag" in bedp[7]["name"] assert "update-cbb" in ht["pipeline"][build_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in ht["pipeline"][build_edp]["spec"]["finally"][1]["name"] + assert "bitbucket-set-success-status" in ht["pipeline"][build_edp]["spec"]["finally"][2]["name"] + assert "bitbucket-set-failure-status" in ht["pipeline"][build_edp]["spec"]["finally"][3]["name"] diff --git a/charts/pipelines-library/tests/test_helm_pipelines.py b/charts/pipelines-library/tests/test_helm_pipelines.py index 97710488..5e8fc87d 100644 --- a/charts/pipelines-library/tests/test_helm_pipelines.py +++ b/charts/pipelines-library/tests/test_helm_pipelines.py @@ -149,32 +149,38 @@ def test_helm_pipelines_gitlab(): assert "gitlab-set-failure-status" in ht["pipeline"][review]["spec"]["finally"][1]["name"] bdef = ht["pipeline"][build_def]["spec"]["tasks"] - assert "fetch-repository" in bdef[0]["name"] - assert "init-values" in bdef[1]["name"] - assert "check-chart-name" in bdef[2]["name"] - assert "get-version" in bdef[3]["name"] - assert "helm-dependency-update" in bdef[4]["name"] - assert "helm-lint" in bdef[5]["name"] - assert "helm-template" in bdef[6]["name"] - assert "helm-push" in bdef[7]["name"] - assert "git-tag" in bdef[8]["name"] - assert "update-cbis" in bdef[9]["name"] + assert "report-pipeline-start-to-gitlab" in bdef[0]["name"] + assert "fetch-repository" in bdef[1]["name"] + assert "init-values" in bdef[2]["name"] + assert "check-chart-name" in bdef[3]["name"] + assert "get-version" in bdef[4]["name"] + assert "helm-dependency-update" in bdef[5]["name"] + assert "helm-lint" in bdef[6]["name"] + assert "helm-template" in bdef[7]["name"] + assert "helm-push" in bdef[8]["name"] + assert "git-tag" in bdef[9]["name"] + assert "update-cbis" in bdef[10]["name"] assert "push-to-jira" in ht["pipeline"][build_def]["spec"]["finally"][0]["name"] + assert "gitlab-set-success-status" in ht["pipeline"][build_def]["spec"]["finally"][1]["name"] + assert "gitlab-set-failure-status" in ht["pipeline"][build_def]["spec"]["finally"][2]["name"] bedp = ht["pipeline"][build_edp]["spec"]["tasks"] - assert "fetch-repository" in bedp[0]["name"] - assert "init-values" in bedp[1]["name"] - assert "check-chart-name" in bedp[2]["name"] - assert "get-version" in bedp[3]["name"] - assert "update-build-number" in bedp[4]["name"] - assert "helm-dependency-update" in bedp[5]["name"] - assert "helm-lint" in bedp[6]["name"] - assert "helm-template" in bedp[7]["name"] - assert "helm-push" in bedp[8]["name"] - assert "git-tag" in bedp[9]["name"] - assert "update-cbis" in bedp[10]["name"] + assert "report-pipeline-start-to-gitlab" in bedp[0]["name"] + assert "fetch-repository" in bedp[1]["name"] + assert "init-values" in bedp[2]["name"] + assert "check-chart-name" in bedp[3]["name"] + assert "get-version" in bedp[4]["name"] + assert "update-build-number" in bedp[5]["name"] + assert "helm-dependency-update" in bedp[6]["name"] + assert "helm-lint" in bedp[7]["name"] + assert "helm-template" in bedp[8]["name"] + assert "helm-push" in bedp[9]["name"] + assert "git-tag" in bedp[10]["name"] + assert "update-cbis" in bedp[11]["name"] assert "update-cbb" in ht["pipeline"][build_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in ht["pipeline"][build_edp]["spec"]["finally"][1]["name"] + assert "gitlab-set-success-status" in ht["pipeline"][build_edp]["spec"]["finally"][2]["name"] + assert "gitlab-set-failure-status" in ht["pipeline"][build_edp]["spec"]["finally"][3]["name"] # ensure pipelines have proper steps for buildtool in ['helm']: @@ -201,27 +207,33 @@ def test_helm_pipelines_gitlab(): assert "gitlab-set-failure-status" in ht["pipeline"][review]["spec"]["finally"][1]["name"] bdef = ht["pipeline"][build_def]["spec"]["tasks"] - assert "fetch-repository" in bdef[0]["name"] - assert "init-values" in bdef[1]["name"] - assert "get-version" in bdef[2]["name"] - assert "helm-lint" in bdef[3]["name"] - assert "helm-dependency-update" in bdef[4]["name"] - assert "helm-template" in bdef[5]["name"] - assert "helm-push" in bdef[6]["name"] - assert "git-tag" in bdef[7]["name"] + assert "report-pipeline-start-to-gitlab" in bdef[0]["name"] + assert "fetch-repository" in bdef[1]["name"] + assert "init-values" in bdef[2]["name"] + assert "get-version" in bdef[3]["name"] + assert "helm-lint" in bdef[4]["name"] + assert "helm-dependency-update" in bdef[5]["name"] + assert "helm-template" in bdef[6]["name"] + assert "helm-push" in bdef[7]["name"] + assert "git-tag" in bdef[8]["name"] assert "push-to-jira" in ht["pipeline"][build_def]["spec"]["finally"][0]["name"] + assert "gitlab-set-success-status" in ht["pipeline"][build_def]["spec"]["finally"][1]["name"] + assert "gitlab-set-failure-status" in ht["pipeline"][build_def]["spec"]["finally"][2]["name"] bedp = ht["pipeline"][build_edp]["spec"]["tasks"] - assert "fetch-repository" in bedp[0]["name"] - assert "init-values" in bedp[1]["name"] - assert "get-version" in bedp[2]["name"] - assert "helm-lint" in bdef[3]["name"] - assert "helm-dependency-update" in bdef[4]["name"] - assert "helm-template" in bdef[5]["name"] - assert "helm-push" in bdef[6]["name"] - assert "git-tag" in bdef[7]["name"] + assert "report-pipeline-start-to-gitlab" in bedp[0]["name"] + assert "fetch-repository" in bedp[1]["name"] + assert "init-values" in bedp[2]["name"] + assert "get-version" in bedp[3]["name"] + assert "helm-lint" in bdef[4]["name"] + assert "helm-dependency-update" in bdef[5]["name"] + assert "helm-template" in bdef[6]["name"] + assert "helm-push" in bdef[7]["name"] + assert "git-tag" in bdef[8]["name"] assert "update-cbb" in ht["pipeline"][build_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in ht["pipeline"][build_edp]["spec"]["finally"][1]["name"] + assert "gitlab-set-success-status" in ht["pipeline"][build_edp]["spec"]["finally"][2]["name"] + assert "gitlab-set-failure-status" in ht["pipeline"][build_edp]["spec"]["finally"][3]["name"] def test_helm_pipelines_github(): config = """ @@ -258,32 +270,38 @@ def test_helm_pipelines_github(): assert "github-set-failure-status" in ht["pipeline"][review]["spec"]["finally"][1]["name"] bdef = ht["pipeline"][build_def]["spec"]["tasks"] - assert "fetch-repository" in bdef[0]["name"] - assert "init-values" in bdef[1]["name"] - assert "check-chart-name" in bdef[2]["name"] - assert "get-version" in bdef[3]["name"] - assert "helm-dependency-update" in bdef[4]["name"] - assert "helm-lint" in bdef[5]["name"] - assert "helm-template" in bdef[6]["name"] - assert "helm-push" in bdef[7]["name"] - assert "git-tag" in bdef[8]["name"] - assert "update-cbis" in bdef[9]["name"] + assert "github-set-pending-status" in bdef[0]["name"] + assert "fetch-repository" in bdef[1]["name"] + assert "init-values" in bdef[2]["name"] + assert "check-chart-name" in bdef[3]["name"] + assert "get-version" in bdef[4]["name"] + assert "helm-dependency-update" in bdef[5]["name"] + assert "helm-lint" in bdef[6]["name"] + assert "helm-template" in bdef[7]["name"] + assert "helm-push" in bdef[8]["name"] + assert "git-tag" in bdef[9]["name"] + assert "update-cbis" in bdef[10]["name"] assert "push-to-jira" in ht["pipeline"][build_def]["spec"]["finally"][0]["name"] + assert "github-set-success-status" in ht["pipeline"][build_def]["spec"]["finally"][1]["name"] + assert "github-set-failure-status" in ht["pipeline"][build_def]["spec"]["finally"][2]["name"] bedp = ht["pipeline"][build_edp]["spec"]["tasks"] - assert "fetch-repository" in bedp[0]["name"] - assert "init-values" in bedp[1]["name"] - assert "check-chart-name" in bedp[2]["name"] - assert "get-version" in bedp[3]["name"] - assert "update-build-number" in bedp[4]["name"] - assert "helm-dependency-update" in bedp[5]["name"] - assert "helm-lint" in bedp[6]["name"] - assert "helm-template" in bedp[7]["name"] - assert "helm-push" in bedp[8]["name"] - assert "git-tag" in bedp[9]["name"] - assert "update-cbis" in bedp[10]["name"] + assert "github-set-pending-status" in bedp[0]["name"] + assert "fetch-repository" in bedp[1]["name"] + assert "init-values" in bedp[2]["name"] + assert "check-chart-name" in bedp[3]["name"] + assert "get-version" in bedp[4]["name"] + assert "update-build-number" in bedp[5]["name"] + assert "helm-dependency-update" in bedp[6]["name"] + assert "helm-lint" in bedp[7]["name"] + assert "helm-template" in bedp[8]["name"] + assert "helm-push" in bedp[9]["name"] + assert "git-tag" in bedp[10]["name"] + assert "update-cbis" in bedp[11]["name"] assert "update-cbb" in ht["pipeline"][build_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in ht["pipeline"][build_edp]["spec"]["finally"][1]["name"] + assert "github-set-success-status" in ht["pipeline"][build_edp]["spec"]["finally"][2]["name"] + assert "github-set-failure-status" in ht["pipeline"][build_edp]["spec"]["finally"][3]["name"] # ensure pipelines have proper steps for buildtool in ['helm']: @@ -310,27 +328,33 @@ def test_helm_pipelines_github(): assert "github-set-failure-status" in ht["pipeline"][review]["spec"]["finally"][1]["name"] bdef = ht["pipeline"][build_def]["spec"]["tasks"] - assert "fetch-repository" in bdef[0]["name"] - assert "init-values" in bdef[1]["name"] - assert "get-version" in bdef[2]["name"] - assert "helm-lint" in bdef[3]["name"] - assert "helm-dependency-update" in bdef[4]["name"] - assert "helm-template" in bdef[5]["name"] - assert "helm-push" in bdef[6]["name"] - assert "git-tag" in bdef[7]["name"] + assert "github-set-pending-status" in bdef[0]["name"] + assert "fetch-repository" in bdef[1]["name"] + assert "init-values" in bdef[2]["name"] + assert "get-version" in bdef[3]["name"] + assert "helm-lint" in bdef[4]["name"] + assert "helm-dependency-update" in bdef[5]["name"] + assert "helm-template" in bdef[6]["name"] + assert "helm-push" in bdef[7]["name"] + assert "git-tag" in bdef[8]["name"] assert "push-to-jira" in ht["pipeline"][build_def]["spec"]["finally"][0]["name"] + assert "github-set-success-status" in ht["pipeline"][build_def]["spec"]["finally"][1]["name"] + assert "github-set-failure-status" in ht["pipeline"][build_def]["spec"]["finally"][2]["name"] bedp = ht["pipeline"][build_edp]["spec"]["tasks"] - assert "fetch-repository" in bedp[0]["name"] - assert "init-values" in bedp[1]["name"] - assert "get-version" in bedp[2]["name"] - assert "helm-lint" in bdef[3]["name"] - assert "helm-dependency-update" in bdef[4]["name"] - assert "helm-template" in bdef[5]["name"] - assert "helm-push" in bdef[6]["name"] - assert "git-tag" in bdef[7]["name"] + assert "github-set-pending-status" in bedp[0]["name"] + assert "fetch-repository" in bedp[1]["name"] + assert "init-values" in bedp[2]["name"] + assert "get-version" in bedp[3]["name"] + assert "helm-lint" in bdef[4]["name"] + assert "helm-dependency-update" in bdef[5]["name"] + assert "helm-template" in bdef[6]["name"] + assert "helm-push" in bdef[7]["name"] + assert "git-tag" in bdef[8]["name"] assert "update-cbb" in ht["pipeline"][build_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in ht["pipeline"][build_edp]["spec"]["finally"][1]["name"] + assert "github-set-success-status" in ht["pipeline"][build_edp]["spec"]["finally"][2]["name"] + assert "github-set-failure-status" in ht["pipeline"][build_edp]["spec"]["finally"][3]["name"] def test_helm_pipelines_bitbucket(): config = """ @@ -367,32 +391,38 @@ def test_helm_pipelines_bitbucket(): assert "bitbucket-set-failure-status" in ht["pipeline"][review]["spec"]["finally"][1]["name"] bdef = ht["pipeline"][build_def]["spec"]["tasks"] - assert "fetch-repository" in bdef[0]["name"] - assert "init-values" in bdef[1]["name"] - assert "check-chart-name" in bdef[2]["name"] - assert "get-version" in bdef[3]["name"] - assert "helm-dependency-update" in bdef[4]["name"] - assert "helm-lint" in bdef[5]["name"] - assert "helm-template" in bdef[6]["name"] - assert "helm-push" in bdef[7]["name"] - assert "git-tag" in bdef[8]["name"] - assert "update-cbis" in bdef[9]["name"] + assert "bitbucket-set-pending-status" in bdef[0]["name"] + assert "fetch-repository" in bdef[1]["name"] + assert "init-values" in bdef[2]["name"] + assert "check-chart-name" in bdef[3]["name"] + assert "get-version" in bdef[4]["name"] + assert "helm-dependency-update" in bdef[5]["name"] + assert "helm-lint" in bdef[6]["name"] + assert "helm-template" in bdef[7]["name"] + assert "helm-push" in bdef[8]["name"] + assert "git-tag" in bdef[9]["name"] + assert "update-cbis" in bdef[10]["name"] assert "push-to-jira" in ht["pipeline"][build_def]["spec"]["finally"][0]["name"] + assert "bitbucket-set-success-status" in ht["pipeline"][build_def]["spec"]["finally"][1]["name"] + assert "bitbucket-set-failure-status" in ht["pipeline"][build_def]["spec"]["finally"][2]["name"] bedp = ht["pipeline"][build_edp]["spec"]["tasks"] - assert "fetch-repository" in bedp[0]["name"] - assert "init-values" in bedp[1]["name"] - assert "check-chart-name" in bedp[2]["name"] - assert "get-version" in bedp[3]["name"] - assert "update-build-number" in bedp[4]["name"] - assert "helm-dependency-update" in bedp[5]["name"] - assert "helm-lint" in bedp[6]["name"] - assert "helm-template" in bedp[7]["name"] - assert "helm-push" in bedp[8]["name"] - assert "git-tag" in bedp[9]["name"] - assert "update-cbis" in bedp[10]["name"] + assert "bitbucket-set-pending-status" in bedp[0]["name"] + assert "fetch-repository" in bedp[1]["name"] + assert "init-values" in bedp[2]["name"] + assert "check-chart-name" in bedp[3]["name"] + assert "get-version" in bedp[4]["name"] + assert "update-build-number" in bedp[5]["name"] + assert "helm-dependency-update" in bedp[6]["name"] + assert "helm-lint" in bedp[7]["name"] + assert "helm-template" in bedp[8]["name"] + assert "helm-push" in bedp[9]["name"] + assert "git-tag" in bedp[10]["name"] + assert "update-cbis" in bedp[11]["name"] assert "update-cbb" in ht["pipeline"][build_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in ht["pipeline"][build_edp]["spec"]["finally"][1]["name"] + assert "bitbucket-set-success-status" in ht["pipeline"][build_edp]["spec"]["finally"][2]["name"] + assert "bitbucket-set-failure-status" in ht["pipeline"][build_edp]["spec"]["finally"][3]["name"] # ensure pipelines have proper steps for buildtool in ['helm']: @@ -419,24 +449,30 @@ def test_helm_pipelines_bitbucket(): assert "bitbucket-set-failure-status" in ht["pipeline"][review]["spec"]["finally"][1]["name"] bdef = ht["pipeline"][build_def]["spec"]["tasks"] - assert "fetch-repository" in bdef[0]["name"] - assert "init-values" in bdef[1]["name"] - assert "get-version" in bdef[2]["name"] - assert "helm-lint" in bdef[3]["name"] - assert "helm-dependency-update" in bdef[4]["name"] - assert "helm-template" in bdef[5]["name"] - assert "helm-push" in bdef[6]["name"] - assert "git-tag" in bdef[7]["name"] + assert "bitbucket-set-pending-status" in bdef[0]["name"] + assert "fetch-repository" in bdef[1]["name"] + assert "init-values" in bdef[2]["name"] + assert "get-version" in bdef[3]["name"] + assert "helm-lint" in bdef[4]["name"] + assert "helm-dependency-update" in bdef[5]["name"] + assert "helm-template" in bdef[6]["name"] + assert "helm-push" in bdef[7]["name"] + assert "git-tag" in bdef[8]["name"] assert "push-to-jira" in ht["pipeline"][build_def]["spec"]["finally"][0]["name"] + assert "bitbucket-set-success-status" in ht["pipeline"][build_def]["spec"]["finally"][1]["name"] + assert "bitbucket-set-failure-status" in ht["pipeline"][build_def]["spec"]["finally"][2]["name"] bedp = ht["pipeline"][build_edp]["spec"]["tasks"] - assert "fetch-repository" in bedp[0]["name"] - assert "init-values" in bedp[1]["name"] - assert "get-version" in bedp[2]["name"] - assert "helm-lint" in bdef[3]["name"] - assert "helm-dependency-update" in bdef[4]["name"] - assert "helm-template" in bdef[5]["name"] - assert "helm-push" in bdef[6]["name"] - assert "git-tag" in bdef[7]["name"] + assert "bitbucket-set-pending-status" in bedp[0]["name"] + assert "fetch-repository" in bedp[1]["name"] + assert "init-values" in bedp[2]["name"] + assert "get-version" in bedp[3]["name"] + assert "helm-lint" in bdef[4]["name"] + assert "helm-dependency-update" in bdef[5]["name"] + assert "helm-template" in bdef[6]["name"] + assert "helm-push" in bdef[7]["name"] + assert "git-tag" in bdef[8]["name"] assert "update-cbb" in ht["pipeline"][build_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in ht["pipeline"][build_edp]["spec"]["finally"][1]["name"] + assert "bitbucket-set-success-status" in ht["pipeline"][build_edp]["spec"]["finally"][2]["name"] + assert "bitbucket-set-failure-status" in ht["pipeline"][build_edp]["spec"]["finally"][3]["name"] 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 e0c32f22..52946cd0 100644 --- a/charts/pipelines-library/tests/test_java_autotest_gradle_pipelines.py +++ b/charts/pipelines-library/tests/test_java_autotest_gradle_pipelines.py @@ -93,22 +93,27 @@ def test_java_pipelines_github(): # build with default versioning btd = r["pipeline"][github_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "update-build-number" in btd[3]["name"] - assert "sonar" in btd[4]["name"] - assert "git-tag" in btd[5]["name"] - + assert "github-set-pending-status" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "update-build-number" in btd[4]["name"] + assert "sonar" in btd[5]["name"] + assert "git-tag" in btd[6]["name"] + assert "github-set-success-status" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "github-set-failure-status" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][1]["name"] # build with edp versioning btedp = r["pipeline"][github_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "sonar" in btedp[3]["name"] - assert "git-tag" in btedp[4]["name"] + assert "github-set-pending-status" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "sonar" in btedp[4]["name"] + assert "git-tag" in btedp[5]["name"] + assert "github-set-success-status" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][0]["name"] + assert "github-set-failure-status" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][1]["name"] def test_java_pipelines_gitlab(): config = """ @@ -147,22 +152,28 @@ def test_java_pipelines_gitlab(): # build with default versioning btd = r["pipeline"][gitlab_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "update-build-number" in btd[3]["name"] - assert "sonar" in btd[4]["name"] - assert "git-tag" in btd[5]["name"] + assert "report-pipeline-start-to-gitlab" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "update-build-number" in btd[4]["name"] + assert "sonar" in btd[5]["name"] + assert "git-tag" in btd[6]["name"] + assert "gitlab-set-success-status" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "gitlab-set-failure-status" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][1]["name"] # build with edp versioning btedp = r["pipeline"][gitlab_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "sonar" in btedp[3]["name"] - assert "git-tag" in btedp[4]["name"] + assert "report-pipeline-start-to-gitlab" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "sonar" in btedp[4]["name"] + assert "git-tag" in btedp[5]["name"] + assert "gitlab-set-success-status" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][0]["name"] + assert "gitlab-set-failure-status" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][1]["name"] def test_java_pipelines_bitbucket(): config = """ @@ -201,19 +212,25 @@ def test_java_pipelines_bitbucket(): # build with default versioning btd = r["pipeline"][bitbucket_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "update-build-number" in btd[3]["name"] - assert "sonar" in btd[4]["name"] - assert "git-tag" in btd[5]["name"] + assert "bitbucket-set-pending-status" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "update-build-number" in btd[4]["name"] + assert "sonar" in btd[5]["name"] + assert "git-tag" in btd[6]["name"] + assert "bitbucket-set-success-status" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "bitbucket-set-failure-status" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][1]["name"] # build with edp versioning btedp = r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "sonar" in btedp[3]["name"] - assert "git-tag" in btedp[4]["name"] + assert "bitbucket-set-pending-status" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "sonar" in btedp[4]["name"] + assert "git-tag" in btedp[5]["name"] + assert "bitbucket-set-success-status" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][0]["name"] + assert "bitbucket-set-failure-status" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][1]["name"] 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 2e06e980..36acce43 100644 --- a/charts/pipelines-library/tests/test_java_autotest_maven_pipelines.py +++ b/charts/pipelines-library/tests/test_java_autotest_maven_pipelines.py @@ -96,21 +96,27 @@ def test_java_pipelines_github(): # build with default versioning btd = r["pipeline"][github_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] - assert "sonar" in btd[3]["name"] - assert "update-build-number" in btd[4]["name"] - assert "git-tag" in btd[5]["name"] + assert "github-set-pending-status" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] + assert "sonar" in btd[4]["name"] + assert "update-build-number" in btd[5]["name"] + assert "git-tag" in btd[6]["name"] + assert "github-set-success-status" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "github-set-failure-status" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][1]["name"] # build with edp versioning btedp = r["pipeline"][github_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "sonar" in btedp[3]["name"] - assert "git-tag" in btedp[4]["name"] + assert "github-set-pending-status" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "sonar" in btedp[4]["name"] + assert "git-tag" in btedp[5]["name"] + assert "github-set-success-status" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][0]["name"] + assert "github-set-failure-status" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][1]["name"] def test_java_pipelines_gitlab(): config = """ @@ -151,21 +157,27 @@ def test_java_pipelines_gitlab(): # build with default versioning btd = r["pipeline"][gitlab_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] - assert "sonar" in btd[3]["name"] - assert "update-build-number" in btd[4]["name"] - assert "git-tag" in btd[5]["name"] + assert "report-pipeline-start-to-gitlab" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] + assert "sonar" in btd[4]["name"] + assert "update-build-number" in btd[5]["name"] + assert "git-tag" in btd[6]["name"] + assert "gitlab-set-success-status" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "gitlab-set-failure-status" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][1]["name"] # build with edp versioning btedp = r["pipeline"][gitlab_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "sonar" in btedp[3]["name"] - assert "git-tag" in btedp[4]["name"] + assert "report-pipeline-start-to-gitlab" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "sonar" in btedp[4]["name"] + assert "git-tag" in btedp[5]["name"] + assert "gitlab-set-success-status" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][0]["name"] + assert "gitlab-set-failure-status" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][1]["name"] def test_java_pipelines_bitbucket(): config = """ @@ -206,18 +218,24 @@ def test_java_pipelines_bitbucket(): # build with default versioning btd = r["pipeline"][bitbucket_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] - assert "sonar" in btd[3]["name"] - assert "update-build-number" in btd[4]["name"] - assert "git-tag" in btd[5]["name"] + assert "bitbucket-set-pending-status" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] + assert "sonar" in btd[4]["name"] + assert "update-build-number" in btd[5]["name"] + assert "git-tag" in btd[6]["name"] + assert "bitbucket-set-success-status" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "bitbucket-set-failure-status" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][1]["name"] # build with edp versioning btedp = r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "sonar" in btedp[3]["name"] - assert "git-tag" in btedp[4]["name"] + assert "bitbucket-set-pending-status" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "sonar" in btedp[4]["name"] + assert "git-tag" in btedp[5]["name"] + assert "bitbucket-set-success-status" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][0]["name"] + assert "bitbucket-set-failure-status" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][1]["name"] diff --git a/charts/pipelines-library/tests/test_java_gradle_pipelines.py b/charts/pipelines-library/tests/test_java_gradle_pipelines.py index de798708..3a554648 100644 --- a/charts/pipelines-library/tests/test_java_gradle_pipelines.py +++ b/charts/pipelines-library/tests/test_java_gradle_pipelines.py @@ -157,51 +157,57 @@ def test_java_gradle_pipelines_harbor_github(): # build with default versioning btd = r["pipeline"][github_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] + assert "github-set-pending-status" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] # ensure we have default versioning - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "get-cache" in btd[3]["name"] - assert "update-build-number" in btd[4]["name"] - assert "security" in btd[5]["name"] - assert "build" in btd[6]["name"] - assert "sonar" in btd[7]["name"] - assert "push" in btd[8]["name"] - assert buildtool == btd[8]["taskRef"]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "get-cache" in btd[4]["name"] + assert "update-build-number" in btd[5]["name"] + assert "security" in btd[6]["name"] + assert "build" in btd[7]["name"] + assert "sonar" in btd[8]["name"] + assert "push" in btd[9]["name"] + assert buildtool == btd[9]["taskRef"]["name"] if cbtype == "app": - assert "kaniko-build" in btd[9]["name"] + assert "kaniko-build" in btd[10]["name"] + assert "save-cache" in btd[11]["name"] + assert "git-tag" in btd[12]["name"] + assert "update-cbis" in btd[13]["name"] + if cbtype == "lib": assert "save-cache" in btd[10]["name"] assert "git-tag" in btd[11]["name"] - assert "update-cbis" in btd[12]["name"] - if cbtype == "lib": - assert "save-cache" in btd[9]["name"] - assert "git-tag" in btd[10]["name"] assert "push-to-jira" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "github-set-success-status" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "github-set-failure-status" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][github_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "get-cache" in btedp[3]["name"] - assert "update-build-number" in btedp[4]["name"] - assert "security" in btedp[5]["name"] - assert "build" in btedp[6]["name"] - assert "sonar" in btedp[7]["name"] - assert "push" in btedp[8]["name"] - assert buildtool == btedp[8]["taskRef"]["name"] + assert "github-set-pending-status" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "get-cache" in btedp[4]["name"] + assert "update-build-number" in btedp[5]["name"] + assert "security" in btedp[6]["name"] + assert "build" in btedp[7]["name"] + assert "sonar" in btedp[8]["name"] + assert "push" in btedp[9]["name"] + assert buildtool == btedp[9]["taskRef"]["name"] if cbtype == "app": - assert "kaniko-build" in btedp[9]["name"] + assert "kaniko-build" in btedp[10]["name"] + assert "save-cache" in btedp[11]["name"] + assert "git-tag" in btedp[12]["name"] + assert "update-cbis" in btedp[13]["name"] + if cbtype == "lib": assert "save-cache" in btedp[10]["name"] assert "git-tag" in btedp[11]["name"] - assert "update-cbis" in btedp[12]["name"] - if cbtype == "lib": - assert "save-cache" in btedp[9]["name"] - assert "git-tag" in btedp[10]["name"] assert "update-cbb" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "github-set-success-status" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "github-set-failure-status" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][3]["name"] def test_java_gradle_pipelines_harbor_gitlab(): @@ -251,51 +257,57 @@ def test_java_gradle_pipelines_harbor_gitlab(): # build with default versioning btd = r["pipeline"][gitlab_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] + assert "report-pipeline-start-to-gitlab" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] # ensure we have default versioning - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "get-cache" in btd[3]["name"] - assert "update-build-number" in btd[4]["name"] - assert "security" in btd[5]["name"] - assert "build" in btd[6]["name"] - assert "sonar" in btd[7]["name"] - assert "push" in btd[8]["name"] - assert buildtool == btd[8]["taskRef"]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "get-cache" in btd[4]["name"] + assert "update-build-number" in btd[5]["name"] + assert "security" in btd[6]["name"] + assert "build" in btd[7]["name"] + assert "sonar" in btd[8]["name"] + assert "push" in btd[9]["name"] + assert buildtool == btd[9]["taskRef"]["name"] if cbtype == "app": - assert "kaniko-build" in btd[9]["name"] + assert "kaniko-build" in btd[10]["name"] + assert "save-cache" in btd[11]["name"] + assert "git-tag" in btd[12]["name"] + assert "update-cbis" in btd[13]["name"] + if cbtype == "lib": assert "save-cache" in btd[10]["name"] assert "git-tag" in btd[11]["name"] - assert "update-cbis" in btd[12]["name"] - if cbtype == "lib": - assert "save-cache" in btd[9]["name"] - assert "git-tag" in btd[10]["name"] assert "push-to-jira" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "gitlab-set-success-status" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "gitlab-set-failure-status" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][gitlab_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "get-cache" in btedp[3]["name"] - assert "update-build-number" in btedp[4]["name"] - assert "security" in btedp[5]["name"] - assert "build" in btedp[6]["name"] - assert "sonar" in btedp[7]["name"] - assert "push" in btedp[8]["name"] - assert buildtool == btedp[8]["taskRef"]["name"] + assert "report-pipeline-start-to-gitlab" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "get-cache" in btedp[4]["name"] + assert "update-build-number" in btedp[5]["name"] + assert "security" in btedp[6]["name"] + assert "build" in btedp[7]["name"] + assert "sonar" in btedp[8]["name"] + assert "push" in btedp[9]["name"] + assert buildtool == btedp[9]["taskRef"]["name"] if cbtype == "app": - assert "kaniko-build" in btedp[9]["name"] + assert "kaniko-build" in btedp[10]["name"] + assert "save-cache" in btedp[11]["name"] + assert "git-tag" in btedp[12]["name"] + assert "update-cbis" in btedp[13]["name"] + if cbtype == "lib": assert "save-cache" in btedp[10]["name"] assert "git-tag" in btedp[11]["name"] - assert "update-cbis" in btedp[12]["name"] - if cbtype == "lib": - assert "save-cache" in btedp[9]["name"] - assert "git-tag" in btedp[10]["name"] assert "update-cbb" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "gitlab-set-success-status" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "gitlab-set-failure-status" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][3]["name"] def test_java_gradle_pipelines_harbor_bitbucket(): config = """ @@ -344,48 +356,54 @@ def test_java_gradle_pipelines_harbor_bitbucket(): # build with default versioning btd = r["pipeline"][bitbucket_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] + assert "bitbucket-set-pending-status" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] # ensure we have default versioning - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "get-cache" in btd[3]["name"] - assert "update-build-number" in btd[4]["name"] - assert "security" in btd[5]["name"] - assert "build" in btd[6]["name"] - assert "sonar" in btd[7]["name"] - assert "push" in btd[8]["name"] - assert buildtool == btd[8]["taskRef"]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "get-cache" in btd[4]["name"] + assert "update-build-number" in btd[5]["name"] + assert "security" in btd[6]["name"] + assert "build" in btd[7]["name"] + assert "sonar" in btd[8]["name"] + assert "push" in btd[9]["name"] + assert buildtool == btd[9]["taskRef"]["name"] if cbtype == "app": - assert "kaniko-build" in btd[9]["name"] + assert "kaniko-build" in btd[10]["name"] + assert "save-cache" in btd[11]["name"] + assert "git-tag" in btd[12]["name"] + assert "update-cbis" in btd[13]["name"] + if cbtype == "lib": assert "save-cache" in btd[10]["name"] assert "git-tag" in btd[11]["name"] - assert "update-cbis" in btd[12]["name"] - if cbtype == "lib": - assert "save-cache" in btd[9]["name"] - assert "git-tag" in btd[10]["name"] assert "push-to-jira" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "bitbucket-set-success-status" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "bitbucket-set-failure-status" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "get-cache" in btedp[3]["name"] - assert "update-build-number" in btedp[4]["name"] - assert "security" in btedp[5]["name"] - assert "build" in btedp[6]["name"] - assert "sonar" in btedp[7]["name"] - assert "push" in btedp[8]["name"] - assert buildtool == btedp[8]["taskRef"]["name"] + assert "bitbucket-set-pending-status" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "get-cache" in btedp[4]["name"] + assert "update-build-number" in btedp[5]["name"] + assert "security" in btedp[6]["name"] + assert "build" in btedp[7]["name"] + assert "sonar" in btedp[8]["name"] + assert "push" in btedp[9]["name"] + assert buildtool == btedp[9]["taskRef"]["name"] if cbtype == "app": - assert "kaniko-build" in btedp[9]["name"] + assert "kaniko-build" in btedp[10]["name"] + assert "save-cache" in btedp[11]["name"] + assert "git-tag" in btedp[12]["name"] + assert "update-cbis" in btedp[13]["name"] + if cbtype == "lib": assert "save-cache" in btedp[10]["name"] assert "git-tag" in btedp[11]["name"] - assert "update-cbis" in btedp[12]["name"] - if cbtype == "lib": - assert "save-cache" in btedp[9]["name"] - assert "git-tag" in btedp[10]["name"] assert "update-cbb" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "bitbucket-set-success-status" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "bitbucket-set-failure-status" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][3]["name"] diff --git a/charts/pipelines-library/tests/test_java_maven_pipelines.py b/charts/pipelines-library/tests/test_java_maven_pipelines.py index 0614bf6d..a3b15088 100644 --- a/charts/pipelines-library/tests/test_java_maven_pipelines.py +++ b/charts/pipelines-library/tests/test_java_maven_pipelines.py @@ -140,6 +140,8 @@ def test_java_maven_pipelines_harbor_gerrit(): assert "git-tag" in btedp[13]["name"] assert "update-cbb" in r["pipeline"][gerrit_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][gerrit_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "push-to-jira" in r["pipeline"][gerrit_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "push-to-jira" in r["pipeline"][gerrit_build_pipeline_edp]["spec"]["finally"][1]["name"] def test_java_maven_pipelines_harbor_github(): @@ -200,15 +202,31 @@ def test_java_maven_pipelines_harbor_github(): # build with default versioning btd = r["pipeline"][github_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "get-cache" in btd[3]["name"] - assert "update-build-number" in btd[4]["name"] - assert f"{buildtool}" == btd[4]["taskRef"]["name"] + assert "github-set-pending-status" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "get-cache" in btd[4]["name"] + assert "update-build-number" in btd[5]["name"] + assert f"{buildtool}" == btd[5]["taskRef"]["name"] if cbtype == "app": - assert "get-maven-module" in btd[5]["name"] + assert "get-maven-module" in btd[6]["name"] + assert "security" in btd[7]["name"] + assert "compile" in btd[8]["name"] + assert buildtool == btd[8]["taskRef"]["name"] + assert "test" in btd[9]["name"] + assert buildtool == btd[9]["taskRef"]["name"] + assert "sonar" in btd[10]["name"] + assert "build" in btd[11]["name"] + assert buildtool == btd[11]["taskRef"]["name"] + assert "push" in btd[12]["name"] + assert buildtool == btd[12]["taskRef"]["name"] + assert "kaniko-build" in btd[13]["name"] + assert "save-cache" in btd[14]["name"] + assert "git-tag" in btd[15]["name"] + assert "update-cbis" in btd[16]["name"] + if cbtype == "lib": assert "security" in btd[6]["name"] assert "compile" in btd[7]["name"] assert buildtool == btd[7]["taskRef"]["name"] @@ -219,36 +237,39 @@ def test_java_maven_pipelines_harbor_github(): assert buildtool == btd[10]["taskRef"]["name"] assert "push" in btd[11]["name"] assert buildtool == btd[11]["taskRef"]["name"] - assert "kaniko-build" in btd[12]["name"] - assert "save-cache" in btd[13]["name"] - assert "git-tag" in btd[14]["name"] - assert "update-cbis" in btd[15]["name"] - if cbtype == "lib": - assert "security" in btd[5]["name"] - assert "compile" in btd[6]["name"] - assert buildtool == btd[6]["taskRef"]["name"] - assert "test" in btd[7]["name"] - assert buildtool == btd[7]["taskRef"]["name"] - assert "sonar" in btd[8]["name"] - assert "build" in btd[9]["name"] - assert buildtool == btd[9]["taskRef"]["name"] - assert "push" in btd[10]["name"] - assert buildtool == btd[10]["taskRef"]["name"] - assert "save-cache" in btd[11]["name"] - assert "git-tag" in btd[12]["name"] + assert "save-cache" in btd[12]["name"] + assert "git-tag" in btd[13]["name"] assert "push-to-jira" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "github-set-success-status" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "github-set-failure-status" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][github_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "get-cache" in btedp[3]["taskRef"]["name"] - assert "update-build-number" in btedp[4]["name"] - assert f"{buildtool}" == btedp[4]["taskRef"]["name"] + assert "github-set-pending-status" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "get-cache" in btedp[4]["taskRef"]["name"] + assert "update-build-number" in btedp[5]["name"] + assert f"{buildtool}" == btedp[5]["taskRef"]["name"] if cbtype == "app": - assert "get-maven-module" in btedp[5]["name"] + assert "get-maven-module" in btedp[6]["name"] + assert "security" in btedp[7]["name"] + assert "compile" in btedp[8]["name"] + assert buildtool == btedp[8]["taskRef"]["name"] + assert "test" in btedp[9]["name"] + assert buildtool == btedp[9]["taskRef"]["name"] + assert "sonar" in btedp[10]["name"] + assert "build" in btedp[11]["name"] + assert buildtool == btedp[11]["taskRef"]["name"] + assert "push" in btedp[12]["name"] + assert buildtool == btedp[12]["taskRef"]["name"] + assert "kaniko-build" in btedp[13]["name"] + assert "save-cache" in btedp[14]["name"] + assert "git-tag" in btedp[15]["name"] + assert "update-cbis" in btedp[16]["name"] + if cbtype == "lib": assert "security" in btedp[6]["name"] assert "compile" in btedp[7]["name"] assert buildtool == btedp[7]["taskRef"]["name"] @@ -259,25 +280,12 @@ def test_java_maven_pipelines_harbor_github(): assert buildtool == btedp[10]["taskRef"]["name"] assert "push" in btedp[11]["name"] assert buildtool == btedp[11]["taskRef"]["name"] - assert "kaniko-build" in btedp[12]["name"] - assert "save-cache" in btedp[13]["name"] - assert "git-tag" in btedp[14]["name"] - assert "update-cbis" in btedp[15]["name"] - if cbtype == "lib": - assert "security" in btedp[5]["name"] - assert "compile" in btedp[6]["name"] - assert buildtool == btedp[6]["taskRef"]["name"] - assert "test" in btedp[7]["name"] - assert buildtool == btedp[7]["taskRef"]["name"] - assert "sonar" in btedp[8]["name"] - assert "build" in btedp[9]["name"] - assert buildtool == btedp[9]["taskRef"]["name"] - assert "push" in btedp[10]["name"] - assert buildtool == btedp[10]["taskRef"]["name"] - assert "save-cache" in btedp[11]["name"] - assert "git-tag" in btedp[12]["name"] + assert "save-cache" in btedp[12]["name"] + assert "git-tag" in btedp[13]["name"] assert "update-cbb" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "github-set-success-status" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "github-set-failure-status" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][3]["name"] def test_java_maven_pipelines_harbor_gitlab(): @@ -338,15 +346,31 @@ def test_java_maven_pipelines_harbor_gitlab(): # build with default versioning btd = r["pipeline"][gitlab_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "get-cache" in btd[3]["name"] - assert "update-build-number" in btd[4]["name"] - assert f"{buildtool}" == btd[4]["taskRef"]["name"] + assert "report-pipeline-start-to-gitlab" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "get-cache" in btd[4]["name"] + assert "update-build-number" in btd[5]["name"] + assert f"{buildtool}" == btd[5]["taskRef"]["name"] if cbtype == "app": - assert "get-maven-module" in btd[5]["name"] + assert "get-maven-module" in btd[6]["name"] + assert "security" in btd[7]["name"] + assert "compile" in btd[8]["name"] + assert buildtool == btd[8]["taskRef"]["name"] + assert "test" in btd[9]["name"] + assert buildtool == btd[9]["taskRef"]["name"] + assert "sonar" in btd[10]["name"] + assert "build" in btd[11]["name"] + assert buildtool == btd[11]["taskRef"]["name"] + assert "push" in btd[12]["name"] + assert buildtool == btd[12]["taskRef"]["name"] + assert "kaniko-build" in btd[13]["name"] + assert "save-cache" in btd[14]["name"] + assert "git-tag" in btd[15]["name"] + assert "update-cbis" in btd[16]["name"] + if cbtype == "lib": assert "security" in btd[6]["name"] assert "compile" in btd[7]["name"] assert buildtool == btd[7]["taskRef"]["name"] @@ -357,36 +381,39 @@ def test_java_maven_pipelines_harbor_gitlab(): assert buildtool == btd[10]["taskRef"]["name"] assert "push" in btd[11]["name"] assert buildtool == btd[11]["taskRef"]["name"] - assert "kaniko-build" in btd[12]["name"] - assert "save-cache" in btd[13]["name"] - assert "git-tag" in btd[14]["name"] - assert "update-cbis" in btd[15]["name"] - if cbtype == "lib": - assert "security" in btd[5]["name"] - assert "compile" in btd[6]["name"] - assert buildtool == btd[6]["taskRef"]["name"] - assert "test" in btd[7]["name"] - assert buildtool == btd[7]["taskRef"]["name"] - assert "sonar" in btd[8]["name"] - assert "build" in btd[9]["name"] - assert buildtool == btd[9]["taskRef"]["name"] - assert "push" in btd[10]["name"] - assert buildtool == btd[10]["taskRef"]["name"] - assert "save-cache" in btd[11]["name"] - assert "git-tag" in btd[12]["name"] + assert "save-cache" in btd[12]["name"] + assert "git-tag" in btd[13]["name"] assert "push-to-jira" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "gitlab-set-success-status" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "gitlab-set-failure-status" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][gitlab_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "get-cache" in btedp[3]["taskRef"]["name"] - assert "update-build-number" in btedp[4]["name"] - assert f"{buildtool}" == btedp[4]["taskRef"]["name"] + assert "report-pipeline-start-to-gitlab" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "get-cache" in btedp[4]["taskRef"]["name"] + assert "update-build-number" in btedp[5]["name"] + assert f"{buildtool}" == btedp[5]["taskRef"]["name"] if cbtype == "app": - assert "get-maven-module" in btedp[5]["name"] + assert "get-maven-module" in btedp[6]["name"] + assert "security" in btedp[7]["name"] + assert "compile" in btedp[8]["name"] + assert buildtool == btedp[8]["taskRef"]["name"] + assert "test" in btedp[9]["name"] + assert buildtool == btedp[9]["taskRef"]["name"] + assert "sonar" in btedp[10]["name"] + assert "build" in btedp[11]["name"] + assert buildtool == btedp[11]["taskRef"]["name"] + assert "push" in btedp[12]["name"] + assert buildtool == btedp[12]["taskRef"]["name"] + assert "kaniko-build" in btedp[13]["name"] + assert "save-cache" in btedp[14]["name"] + assert "git-tag" in btedp[15]["name"] + assert "update-cbis" in btedp[16]["name"] + if cbtype == "lib": assert "security" in btedp[6]["name"] assert "compile" in btedp[7]["name"] assert buildtool == btedp[7]["taskRef"]["name"] @@ -397,25 +424,12 @@ def test_java_maven_pipelines_harbor_gitlab(): assert buildtool == btedp[10]["taskRef"]["name"] assert "push" in btedp[11]["name"] assert buildtool == btedp[11]["taskRef"]["name"] - assert "kaniko-build" in btedp[12]["name"] - assert "save-cache" in btedp[13]["name"] - assert "git-tag" in btedp[14]["name"] - assert "update-cbis" in btedp[15]["name"] - if cbtype == "lib": - assert "security" in btedp[5]["name"] - assert "compile" in btedp[6]["name"] - assert buildtool == btedp[6]["taskRef"]["name"] - assert "test" in btedp[7]["name"] - assert buildtool == btedp[7]["taskRef"]["name"] - assert "sonar" in btedp[8]["name"] - assert "build" in btedp[9]["name"] - assert buildtool == btedp[9]["taskRef"]["name"] - assert "push" in btedp[10]["name"] - assert buildtool == btedp[10]["taskRef"]["name"] - assert "save-cache" in btedp[11]["name"] - assert "git-tag" in btedp[12]["name"] + assert "save-cache" in btedp[12]["name"] + assert "git-tag" in btedp[13]["name"] assert "update-cbb" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "gitlab-set-success-status" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "gitlab-set-failure-status" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][3]["name"] def test_java_maven_pipelines_harbor_bitbucket(): config = """ @@ -475,15 +489,31 @@ def test_java_maven_pipelines_harbor_bitbucket(): # build with default versioning btd = r["pipeline"][bitbucket_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "get-cache" in btd[3]["name"] - assert "update-build-number" in btd[4]["name"] - assert f"{buildtool}" == btd[4]["taskRef"]["name"] + assert "bitbucket-set-pending-status" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "get-cache" in btd[4]["name"] + assert "update-build-number" in btd[5]["name"] + assert f"{buildtool}" == btd[5]["taskRef"]["name"] if cbtype == "app": - assert "get-maven-module" in btd[5]["name"] + assert "get-maven-module" in btd[6]["name"] + assert "security" in btd[7]["name"] + assert "compile" in btd[8]["name"] + assert buildtool == btd[8]["taskRef"]["name"] + assert "test" in btd[9]["name"] + assert buildtool == btd[9]["taskRef"]["name"] + assert "sonar" in btd[10]["name"] + assert "build" in btd[11]["name"] + assert buildtool == btd[11]["taskRef"]["name"] + assert "push" in btd[12]["name"] + assert buildtool == btd[12]["taskRef"]["name"] + assert "kaniko-build" in btd[13]["name"] + assert "save-cache" in btd[14]["name"] + assert "git-tag" in btd[15]["name"] + assert "update-cbis" in btd[16]["name"] + if cbtype == "lib": assert "security" in btd[6]["name"] assert "compile" in btd[7]["name"] assert buildtool == btd[7]["taskRef"]["name"] @@ -494,36 +524,39 @@ def test_java_maven_pipelines_harbor_bitbucket(): assert buildtool == btd[10]["taskRef"]["name"] assert "push" in btd[11]["name"] assert buildtool == btd[11]["taskRef"]["name"] - assert "kaniko-build" in btd[12]["name"] - assert "save-cache" in btd[13]["name"] - assert "git-tag" in btd[14]["name"] - assert "update-cbis" in btd[15]["name"] - if cbtype == "lib": - assert "security" in btd[5]["name"] - assert "compile" in btd[6]["name"] - assert buildtool == btd[6]["taskRef"]["name"] - assert "test" in btd[7]["name"] - assert buildtool == btd[7]["taskRef"]["name"] - assert "sonar" in btd[8]["name"] - assert "build" in btd[9]["name"] - assert buildtool == btd[9]["taskRef"]["name"] - assert "push" in btd[10]["name"] - assert buildtool == btd[10]["taskRef"]["name"] - assert "save-cache" in btd[11]["name"] - assert "git-tag" in btd[12]["name"] + assert "save-cache" in btd[12]["name"] + assert "git-tag" in btd[13]["name"] assert "push-to-jira" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "bitbucket-set-success-status" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "bitbucket-set-failure-status" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "get-cache" in btedp[3]["taskRef"]["name"] - assert "update-build-number" in btedp[4]["name"] - assert f"{buildtool}" == btedp[4]["taskRef"]["name"] + assert "bitbucket-set-pending-status" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "get-cache" in btedp[4]["taskRef"]["name"] + assert "update-build-number" in btedp[5]["name"] + assert f"{buildtool}" == btedp[5]["taskRef"]["name"] if cbtype == "app": - assert "get-maven-module" in btedp[5]["name"] + assert "get-maven-module" in btedp[6]["name"] + assert "security" in btedp[7]["name"] + assert "compile" in btedp[8]["name"] + assert buildtool == btedp[8]["taskRef"]["name"] + assert "test" in btedp[9]["name"] + assert buildtool == btedp[9]["taskRef"]["name"] + assert "sonar" in btedp[10]["name"] + assert "build" in btedp[11]["name"] + assert buildtool == btedp[11]["taskRef"]["name"] + assert "push" in btedp[12]["name"] + assert buildtool == btedp[12]["taskRef"]["name"] + assert "kaniko-build" in btedp[13]["name"] + assert "save-cache" in btedp[14]["name"] + assert "git-tag" in btedp[15]["name"] + assert "update-cbis" in btedp[16]["name"] + if cbtype == "lib": assert "security" in btedp[6]["name"] assert "compile" in btedp[7]["name"] assert buildtool == btedp[7]["taskRef"]["name"] @@ -534,22 +567,9 @@ def test_java_maven_pipelines_harbor_bitbucket(): assert buildtool == btedp[10]["taskRef"]["name"] assert "push" in btedp[11]["name"] assert buildtool == btedp[11]["taskRef"]["name"] - assert "kaniko-build" in btedp[12]["name"] - assert "save-cache" in btedp[13]["name"] - assert "git-tag" in btedp[14]["name"] - assert "update-cbis" in btedp[15]["name"] - if cbtype == "lib": - assert "security" in btedp[5]["name"] - assert "compile" in btedp[6]["name"] - assert buildtool == btedp[6]["taskRef"]["name"] - assert "test" in btedp[7]["name"] - assert buildtool == btedp[7]["taskRef"]["name"] - assert "sonar" in btedp[8]["name"] - assert "build" in btedp[9]["name"] - assert buildtool == btedp[9]["taskRef"]["name"] - assert "push" in btedp[10]["name"] - assert buildtool == btedp[10]["taskRef"]["name"] - assert "save-cache" in btedp[11]["name"] - assert "git-tag" in btedp[12]["name"] + assert "save-cache" in btedp[12]["name"] + assert "git-tag" in btedp[13]["name"] assert "update-cbb" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "bitbucket-set-success-status" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "bitbucket-set-failure-status" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][3]["name"] diff --git a/charts/pipelines-library/tests/test_javascript_antora_pipelines.py b/charts/pipelines-library/tests/test_javascript_antora_pipelines.py index 147eee43..e739566a 100644 --- a/charts/pipelines-library/tests/test_javascript_antora_pipelines.py +++ b/charts/pipelines-library/tests/test_javascript_antora_pipelines.py @@ -111,38 +111,44 @@ def test_javascript_antora_pipelines_harbor_github(): # build with default versioning btd = r["pipeline"][github_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "get-cache" in btd[3]["name"] - assert "update-build-number" in btd[4]["name"] - assert "security" in btd[5]["name"] - assert "build" in btd[6]["name"] - assert buildtool == btd[6]["taskRef"]["name"] - assert "kaniko-build" in btd[7]["name"] - assert "save-cache" in btd[8]["name"] - assert "git-tag" in btd[9]["name"] - assert "update-cbis" in btd[10]["name"] + assert "github-set-pending-status" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "get-cache" in btd[4]["name"] + assert "update-build-number" in btd[5]["name"] + assert "security" in btd[6]["name"] + assert "build" in btd[7]["name"] + assert buildtool == btd[7]["taskRef"]["name"] + assert "kaniko-build" in btd[8]["name"] + assert "save-cache" in btd[9]["name"] + assert "git-tag" in btd[10]["name"] + assert "update-cbis" in btd[11]["name"] assert "push-to-jira" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "github-set-success-status" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "github-set-failure-status" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][2]["name"] btedp = r["pipeline"][github_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "get-cache" in btedp[3]["name"] - assert "update-build-number" in btedp[4]["taskRef"]["name"] - assert f"update-build-number-{buildtool}" == btedp[4]["taskRef"]["name"] - assert "security" in btedp[5]["name"] - assert "build" in btedp[6]["name"] - assert buildtool == btedp[6]["taskRef"]["name"] - assert "kaniko-build" in btedp[7]["name"] - assert "save-cache" in btedp[8]["name"] - assert "git-tag" in btedp[9]["name"] - assert "update-cbis" in btedp[10]["name"] + assert "github-set-pending-status" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "get-cache" in btedp[4]["name"] + assert "update-build-number" in btedp[5]["taskRef"]["name"] + assert f"update-build-number-{buildtool}" == btedp[5]["taskRef"]["name"] + assert "security" in btedp[6]["name"] + assert "build" in btedp[7]["name"] + assert buildtool == btedp[7]["taskRef"]["name"] + assert "kaniko-build" in btedp[8]["name"] + assert "save-cache" in btedp[9]["name"] + assert "git-tag" in btedp[10]["name"] + assert "update-cbis" in btedp[11]["name"] assert "update-cbb" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "github-set-success-status" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "github-set-failure-status" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][3]["name"] def test_javascript_antora_pipelines_harbor_gitlab(): config = """ @@ -182,40 +188,46 @@ def test_javascript_antora_pipelines_harbor_gitlab(): # build with default versioning btd = r["pipeline"][gitlab_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] + assert "report-pipeline-start-to-gitlab" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] # ensure we have default versioning - assert "get-version" in btd[2]["name"] - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "get-cache" in btd[3]["name"] - assert "update-build-number" in btd[4]["name"] - assert "security" in btd[5]["name"] - assert "build" in btd[6]["name"] - assert buildtool == btd[6]["taskRef"]["name"] - assert "kaniko-build" in btd[7]["name"] - assert "save-cache" in btd[8]["name"] - assert "git-tag" in btd[9]["name"] - assert "update-cbis" in btd[10]["name"] + assert "get-version" in btd[3]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "get-cache" in btd[4]["name"] + assert "update-build-number" in btd[5]["name"] + assert "security" in btd[6]["name"] + assert "build" in btd[7]["name"] + assert buildtool == btd[7]["taskRef"]["name"] + assert "kaniko-build" in btd[8]["name"] + assert "save-cache" in btd[9]["name"] + assert "git-tag" in btd[10]["name"] + assert "update-cbis" in btd[11]["name"] assert "push-to-jira" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "gitlab-set-success-status" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "gitlab-set-failure-status" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][gitlab_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "get-cache" in btedp[3]["taskRef"]["name"] - assert "update-build-number" in btedp[4]["taskRef"]["name"] - assert f"update-build-number-{buildtool}" == btedp[4]["taskRef"]["name"] - assert "security" in btedp[5]["name"] - assert "build" in btedp[6]["name"] - assert buildtool == btedp[6]["taskRef"]["name"] - assert "kaniko-build" in btedp[7]["name"] - assert "save-cache" in btedp[8]["name"] - assert "git-tag" in btedp[9]["name"] - assert "update-cbis" in btedp[10]["name"] + assert "report-pipeline-start-to-gitlab" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "get-cache" in btedp[4]["taskRef"]["name"] + assert "update-build-number" in btedp[5]["taskRef"]["name"] + assert f"update-build-number-{buildtool}" == btedp[5]["taskRef"]["name"] + assert "security" in btedp[6]["name"] + assert "build" in btedp[7]["name"] + assert buildtool == btedp[7]["taskRef"]["name"] + assert "kaniko-build" in btedp[8]["name"] + assert "save-cache" in btedp[9]["name"] + assert "git-tag" in btedp[10]["name"] + assert "update-cbis" in btedp[11]["name"] assert "update-cbb" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "gitlab-set-success-status" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "gitlab-set-failure-status" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][3]["name"] def test_javascript_antora_pipelines_harbor_bitbucket(): config = """ @@ -255,37 +267,43 @@ def test_javascript_antora_pipelines_harbor_bitbucket(): # build with default versioning btd = r["pipeline"][bitbucket_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] + assert "bitbucket-set-pending-status" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] # ensure we have default versioning - assert "get-version" in btd[2]["name"] - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "get-cache" in btd[3]["name"] - assert "update-build-number" in btd[4]["name"] - assert "security" in btd[5]["name"] - assert "build" in btd[6]["name"] - assert buildtool == btd[6]["taskRef"]["name"] - assert "kaniko-build" in btd[7]["name"] - assert "save-cache" in btd[8]["name"] - assert "git-tag" in btd[9]["name"] - assert "update-cbis" in btd[10]["name"] + assert "get-version" in btd[3]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "get-cache" in btd[4]["name"] + assert "update-build-number" in btd[5]["name"] + assert "security" in btd[6]["name"] + assert "build" in btd[7]["name"] + assert buildtool == btd[7]["taskRef"]["name"] + assert "kaniko-build" in btd[8]["name"] + assert "save-cache" in btd[9]["name"] + assert "git-tag" in btd[10]["name"] + assert "update-cbis" in btd[11]["name"] assert "push-to-jira" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "bitbucket-set-success-status" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "bitbucket-set-failure-status" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "get-cache" in btedp[3]["taskRef"]["name"] - assert "update-build-number" in btedp[4]["taskRef"]["name"] - assert f"update-build-number-{buildtool}" == btedp[4]["taskRef"]["name"] - assert "security" in btedp[5]["name"] - assert "build" in btedp[6]["name"] - assert buildtool == btedp[6]["taskRef"]["name"] - assert "kaniko-build" in btedp[7]["name"] - assert "save-cache" in btedp[8]["name"] - assert "git-tag" in btedp[9]["name"] - assert "update-cbis" in btedp[10]["name"] + assert "bitbucket-set-pending-status" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "get-cache" in btedp[4]["taskRef"]["name"] + assert "update-build-number" in btedp[5]["taskRef"]["name"] + assert f"update-build-number-{buildtool}" == btedp[5]["taskRef"]["name"] + assert "security" in btedp[6]["name"] + assert "build" in btedp[7]["name"] + assert buildtool == btedp[7]["taskRef"]["name"] + assert "kaniko-build" in btedp[8]["name"] + assert "save-cache" in btedp[9]["name"] + assert "git-tag" in btedp[10]["name"] + assert "update-cbis" in btedp[11]["name"] assert "update-cbb" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "bitbucket-set-success-status" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "bitbucket-set-failure-status" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][3]["name"] diff --git a/charts/pipelines-library/tests/test_javascript_pipelines.py b/charts/pipelines-library/tests/test_javascript_pipelines.py index 7f68f9ab..e49c1920 100644 --- a/charts/pipelines-library/tests/test_javascript_pipelines.py +++ b/charts/pipelines-library/tests/test_javascript_pipelines.py @@ -155,56 +155,62 @@ def test_javascript_pipelines_harbor_github(): # build with default versioning btd = r["pipeline"][github_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] + assert "github-set-pending-status" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] # ensure we have default versioning - assert "get-version" in btd[2]["name"] - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "get-cache" in btd[3]["name"] - assert "update-build-number" in btd[4]["name"] - assert "security" in btd[5]["name"] - assert "build" in btd[6]["name"] - assert "edp-npm" == btd[6]["taskRef"]["name"] - assert "sonar" in btd[7]["name"] - assert "sonarqube-general" == btd[7]["taskRef"]["name"] - assert "push" in btd[8]["name"] - assert "npm" == btd[8]["taskRef"]["name"] + assert "get-version" in btd[3]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "get-cache" in btd[4]["name"] + assert "update-build-number" in btd[5]["name"] + assert "security" in btd[6]["name"] + assert "build" in btd[7]["name"] + assert "edp-npm" == btd[7]["taskRef"]["name"] + assert "sonar" in btd[8]["name"] + assert "sonarqube-general" == btd[8]["taskRef"]["name"] + assert "push" in btd[9]["name"] + assert "npm" == btd[9]["taskRef"]["name"] if cbtype == "app": - assert "kaniko-build" in btd[9]["name"] + assert "kaniko-build" in btd[10]["name"] + assert "save-cache" in btd[11]["name"] + assert "git-tag" in btd[12]["name"] + assert "update-cbis" in btd[13]["name"] + if cbtype == "lib": assert "save-cache" in btd[10]["name"] assert "git-tag" in btd[11]["name"] - assert "update-cbis" in btd[12]["name"] - if cbtype == "lib": - assert "save-cache" in btd[9]["name"] - assert "git-tag" in btd[10]["name"] assert "push-to-jira" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "github-set-success-status" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "github-set-failure-status" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][github_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "get-cache" in btedp[3]["taskRef"]["name"] - assert "update-build-number" in btedp[4]["taskRef"]["name"] - assert f"update-build-number-{buildtool}" == btedp[4]["taskRef"]["name"] - assert "security" in btedp[5]["name"] - assert "build" in btedp[6]["name"] - assert "edp-npm" == btedp[6]["taskRef"]["name"] - assert "sonar" in btedp[7]["name"] - assert "sonarqube-general" == btedp[7]["taskRef"]["name"] - assert "push" in btedp[8]["name"] - assert "npm" == btedp[8]["taskRef"]["name"] + assert "github-set-pending-status" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "get-cache" in btedp[4]["taskRef"]["name"] + assert "update-build-number" in btedp[5]["taskRef"]["name"] + assert f"update-build-number-{buildtool}" == btedp[5]["taskRef"]["name"] + assert "security" in btedp[6]["name"] + assert "build" in btedp[7]["name"] + assert "edp-npm" == btedp[7]["taskRef"]["name"] + assert "sonar" in btedp[8]["name"] + assert "sonarqube-general" == btedp[8]["taskRef"]["name"] + assert "push" in btedp[9]["name"] + assert "npm" == btedp[9]["taskRef"]["name"] if cbtype == "app": - assert "kaniko-build" in btedp[9]["name"] + assert "kaniko-build" in btedp[10]["name"] + assert "save-cache" in btedp[11]["name"] + assert "git-tag" in btedp[12]["name"] + assert "update-cbis" in btedp[13]["name"] + if cbtype == "lib": assert "save-cache" in btedp[10]["name"] assert "git-tag" in btedp[11]["name"] - assert "update-cbis" in btedp[12]["name"] - if cbtype == "lib": - assert "save-cache" in btedp[9]["name"] - assert "git-tag" in btedp[10]["name"] assert "update-cbb" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "github-set-success-status" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "github-set-failure-status" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][3]["name"] def test_javascript_pipelines_harbor_gitlab(): config = """ @@ -256,56 +262,62 @@ def test_javascript_pipelines_harbor_gitlab(): # build with default versioning btd = r["pipeline"][gitlab_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] + assert "report-pipeline-start-to-gitlab" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] # ensure we have default versioning - assert "get-version" in btd[2]["name"] - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "get-cache" in btd[3]["name"] - assert "update-build-number" in btd[4]["name"] - assert "security" in btd[5]["name"] - assert "build" in btd[6]["name"] - assert "edp-npm" == btd[6]["taskRef"]["name"] - assert "sonar" in btd[7]["name"] - assert "sonarqube-general" == btd[7]["taskRef"]["name"] - assert "push" in btd[8]["name"] - assert "npm" == btd[8]["taskRef"]["name"] + assert "get-version" in btd[3]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "get-cache" in btd[4]["name"] + assert "update-build-number" in btd[5]["name"] + assert "security" in btd[6]["name"] + assert "build" in btd[7]["name"] + assert "edp-npm" == btd[7]["taskRef"]["name"] + assert "sonar" in btd[8]["name"] + assert "sonarqube-general" == btd[8]["taskRef"]["name"] + assert "push" in btd[9]["name"] + assert "npm" == btd[9]["taskRef"]["name"] if cbtype == "app": - assert "kaniko-build" in btd[9]["name"] + assert "kaniko-build" in btd[10]["name"] + assert "save-cache" in btd[11]["name"] + assert "git-tag" in btd[12]["name"] + assert "update-cbis" in btd[13]["name"] + if cbtype == "lib": assert "save-cache" in btd[10]["name"] assert "git-tag" in btd[11]["name"] - assert "update-cbis" in btd[12]["name"] - if cbtype == "lib": - assert "save-cache" in btd[9]["name"] - assert "git-tag" in btd[10]["name"] assert "push-to-jira" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "gitlab-set-success-status" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "gitlab-set-failure-status" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][gitlab_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "get-cache" in btedp[3]["taskRef"]["name"] - assert "update-build-number" in btedp[4]["taskRef"]["name"] - assert f"update-build-number-{buildtool}" == btedp[4]["taskRef"]["name"] - assert "security" in btedp[5]["name"] - assert "build" in btedp[6]["name"] - assert "edp-npm" == btedp[6]["taskRef"]["name"] - assert "sonar" in btedp[7]["name"] - assert "sonarqube-general" == btedp[7]["taskRef"]["name"] - assert "push" in btedp[8]["name"] - assert "npm" == btedp[8]["taskRef"]["name"] + assert "report-pipeline-start-to-gitlab" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "get-cache" in btedp[4]["taskRef"]["name"] + assert "update-build-number" in btedp[5]["taskRef"]["name"] + assert f"update-build-number-{buildtool}" == btedp[5]["taskRef"]["name"] + assert "security" in btedp[6]["name"] + assert "build" in btedp[7]["name"] + assert "edp-npm" == btedp[7]["taskRef"]["name"] + assert "sonar" in btedp[8]["name"] + assert "sonarqube-general" == btedp[8]["taskRef"]["name"] + assert "push" in btedp[9]["name"] + assert "npm" == btedp[9]["taskRef"]["name"] if cbtype == "app": - assert "kaniko-build" in btedp[9]["name"] + assert "kaniko-build" in btedp[10]["name"] + assert "save-cache" in btedp[11]["name"] + assert "git-tag" in btedp[12]["name"] + assert "update-cbis" in btedp[13]["name"] + if cbtype == "lib": assert "save-cache" in btedp[10]["name"] assert "git-tag" in btedp[11]["name"] - assert "update-cbis" in btedp[12]["name"] - if cbtype == "lib": - assert "save-cache" in btedp[9]["name"] - assert "git-tag" in btedp[10]["name"] assert "update-cbb" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "gitlab-set-success-status" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "gitlab-set-failure-status" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][3]["name"] def test_javascript_pipelines_harbor_bitbucket(): config = """ @@ -357,53 +369,59 @@ def test_javascript_pipelines_harbor_bitbucket(): # build with default versioning btd = r["pipeline"][bitbucket_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] + assert "bitbucket-set-pending-status" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] # ensure we have default versioning - assert "get-version" in btd[2]["name"] - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "get-cache" in btd[3]["name"] - assert "update-build-number" in btd[4]["name"] - assert "security" in btd[5]["name"] - assert "build" in btd[6]["name"] - assert "edp-npm" == btd[6]["taskRef"]["name"] - assert "sonar" in btd[7]["name"] - assert "sonarqube-general" == btd[7]["taskRef"]["name"] - assert "push" in btd[8]["name"] - assert "npm" == btd[8]["taskRef"]["name"] + assert "get-version" in btd[3]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "get-cache" in btd[4]["name"] + assert "update-build-number" in btd[5]["name"] + assert "security" in btd[6]["name"] + assert "build" in btd[7]["name"] + assert "edp-npm" == btd[7]["taskRef"]["name"] + assert "sonar" in btd[8]["name"] + assert "sonarqube-general" == btd[8]["taskRef"]["name"] + assert "push" in btd[9]["name"] + assert "npm" == btd[9]["taskRef"]["name"] if cbtype == "app": - assert "kaniko-build" in btd[9]["name"] + assert "kaniko-build" in btd[10]["name"] + assert "save-cache" in btd[11]["name"] + assert "git-tag" in btd[12]["name"] + assert "update-cbis" in btd[13]["name"] + if cbtype == "lib": assert "save-cache" in btd[10]["name"] assert "git-tag" in btd[11]["name"] - assert "update-cbis" in btd[12]["name"] - if cbtype == "lib": - assert "save-cache" in btd[9]["name"] - assert "git-tag" in btd[10]["name"] assert "push-to-jira" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "bitbucket-set-success-status" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "bitbucket-set-failure-status" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "get-cache" in btedp[3]["taskRef"]["name"] - assert "update-build-number" in btedp[4]["taskRef"]["name"] - assert f"update-build-number-{buildtool}" == btedp[4]["taskRef"]["name"] - assert "security" in btedp[5]["name"] - assert "build" in btedp[6]["name"] - assert "edp-npm" == btedp[6]["taskRef"]["name"] - assert "sonar" in btedp[7]["name"] - assert "sonarqube-general" == btedp[7]["taskRef"]["name"] - assert "push" in btedp[8]["name"] - assert "npm" == btedp[8]["taskRef"]["name"] + assert "bitbucket-set-pending-status" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "get-cache" in btedp[4]["taskRef"]["name"] + assert "update-build-number" in btedp[5]["taskRef"]["name"] + assert f"update-build-number-{buildtool}" == btedp[5]["taskRef"]["name"] + assert "security" in btedp[6]["name"] + assert "build" in btedp[7]["name"] + assert "edp-npm" == btedp[7]["taskRef"]["name"] + assert "sonar" in btedp[8]["name"] + assert "sonarqube-general" == btedp[8]["taskRef"]["name"] + assert "push" in btedp[9]["name"] + assert "npm" == btedp[9]["taskRef"]["name"] if cbtype == "app": - assert "kaniko-build" in btedp[9]["name"] + assert "kaniko-build" in btedp[10]["name"] + assert "save-cache" in btedp[11]["name"] + assert "git-tag" in btedp[12]["name"] + assert "update-cbis" in btedp[13]["name"] + if cbtype == "lib": assert "save-cache" in btedp[10]["name"] assert "git-tag" in btedp[11]["name"] - assert "update-cbis" in btedp[12]["name"] - if cbtype == "lib": - assert "save-cache" in btedp[9]["name"] - assert "git-tag" in btedp[10]["name"] assert "update-cbb" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "bitbucket-set-success-status" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "bitbucket-set-failure-status" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][3]["name"] diff --git a/charts/pipelines-library/tests/test_opa_pipelines.py b/charts/pipelines-library/tests/test_opa_pipelines.py index eb8d2a7a..d0eb4ac3 100644 --- a/charts/pipelines-library/tests/test_opa_pipelines.py +++ b/charts/pipelines-library/tests/test_opa_pipelines.py @@ -96,27 +96,33 @@ def test_opa_pipelines_github(): # build with default versioning btd = r["pipeline"][github_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] + assert "github-set-pending-status" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] # ensure we have default versioning - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "test" in btd[3]["name"] - assert buildtool == btd[3]["taskRef"]["name"] - assert "git-tag" in btd[4]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "test" in btd[4]["name"] + assert buildtool == btd[4]["taskRef"]["name"] + assert "git-tag" in btd[5]["name"] assert "push-to-jira" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "github-set-success-status" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "github-set-failure-status" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][github_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "test" in btedp[3]["name"] - assert buildtool == btedp[3]["taskRef"]["name"] - assert "git-tag" in btedp[4]["name"] + assert "github-set-pending-status" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "test" in btedp[4]["name"] + assert buildtool == btedp[4]["taskRef"]["name"] + assert "git-tag" in btedp[5]["name"] assert "update-cbb" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "github-set-success-status" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "github-set-failure-status" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][3]["name"] def test_opa_pipelines_gitlab(): config = """ @@ -153,27 +159,33 @@ def test_opa_pipelines_gitlab(): # build with default versioning btd = r["pipeline"][gitlab_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] + assert "report-pipeline-start-to-gitlab" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] # ensure we have default versioning - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "test" in btd[3]["name"] - assert buildtool == btd[3]["taskRef"]["name"] - assert "git-tag" in btd[4]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "test" in btd[4]["name"] + assert buildtool == btd[4]["taskRef"]["name"] + assert "git-tag" in btd[5]["name"] assert "push-to-jira" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "gitlab-set-success-status" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "gitlab-set-failure-status" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][gitlab_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "test" in btedp[3]["name"] - assert buildtool == btedp[3]["taskRef"]["name"] - assert "git-tag" in btedp[4]["name"] + assert "report-pipeline-start-to-gitlab" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "test" in btedp[4]["name"] + assert buildtool == btedp[4]["taskRef"]["name"] + assert "git-tag" in btedp[5]["name"] assert "update-cbb" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "gitlab-set-success-status" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "gitlab-set-failure-status" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][3]["name"] def test_opa_pipelines_bitbucket(): config = """ @@ -210,24 +222,30 @@ def test_opa_pipelines_bitbucket(): # build with default versioning btd = r["pipeline"][bitbucket_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] + assert "bitbucket-set-pending-status" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] # ensure we have default versioning - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "test" in btd[3]["name"] - assert buildtool == btd[3]["taskRef"]["name"] - assert "git-tag" in btd[4]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "test" in btd[4]["name"] + assert buildtool == btd[4]["taskRef"]["name"] + assert "git-tag" in btd[5]["name"] assert "push-to-jira" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "bitbucket-set-success-status" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "bitbucket-set-failure-status" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "test" in btedp[3]["name"] - assert buildtool == btedp[3]["taskRef"]["name"] - assert "git-tag" in btedp[4]["name"] + assert "bitbucket-set-pending-status" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "test" in btedp[4]["name"] + assert buildtool == btedp[4]["taskRef"]["name"] + assert "git-tag" in btedp[5]["name"] assert "update-cbb" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "bitbucket-set-success-status" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "bitbucket-set-failure-status" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][3]["name"] diff --git a/charts/pipelines-library/tests/test_python_pipelines.py b/charts/pipelines-library/tests/test_python_pipelines.py index 412e1b7c..e0a0c2be 100644 --- a/charts/pipelines-library/tests/test_python_pipelines.py +++ b/charts/pipelines-library/tests/test_python_pipelines.py @@ -163,55 +163,61 @@ def test_python_common_pipelines_harbor_github(): # build with default versioning btd = r["pipeline"][github_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "get-cache" in btd[3]["name"] - assert "update-build-number" in btd[4]["name"] - assert "security" in btd[5]["name"] - assert "build" in btd[6]["name"] - assert "python" == btd[6]["taskRef"]["name"] - assert "sonar" in btd[7]["name"] - assert "sonarqube-general" == btd[7]["taskRef"]["name"] - assert "push" in btd[8]["name"] - assert buildtool == btd[8]["taskRef"]["name"] + assert "github-set-pending-status" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "get-cache" in btd[4]["name"] + assert "update-build-number" in btd[5]["name"] + assert "security" in btd[6]["name"] + assert "build" in btd[7]["name"] + assert "python" == btd[7]["taskRef"]["name"] + assert "sonar" in btd[8]["name"] + assert "sonarqube-general" == btd[8]["taskRef"]["name"] + assert "push" in btd[9]["name"] + assert buildtool == btd[9]["taskRef"]["name"] if cbtype == "app": - assert "kaniko-build" in btd[9]["name"] + assert "kaniko-build" in btd[10]["name"] + assert "save-cache" in btd[11]["name"] + assert "git-tag" in btd[12]["name"] + assert "update-cbis" in btd[13]["name"] + if cbtype == "lib": assert "save-cache" in btd[10]["name"] assert "git-tag" in btd[11]["name"] - assert "update-cbis" in btd[12]["name"] - if cbtype == "lib": - assert "save-cache" in btd[9]["name"] - assert "git-tag" in btd[10]["name"] assert "push-to-jira" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "github-set-success-status" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "github-set-failure-status" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][github_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "get-cache" in btedp[3]["name"] - assert "update-build-number" in btedp[4]["taskRef"]["name"] - assert f"update-build-number-{buildtool}" == btedp[4]["taskRef"]["name"] - assert "security" in btedp[5]["name"] - assert "build" in btedp[6]["name"] - assert "python" == btedp[6]["taskRef"]["name"] - assert "sonar" in btedp[7]["name"] - assert "sonarqube-general" == btedp[7]["taskRef"]["name"] - assert "push" in btedp[8]["name"] - assert buildtool == btedp[8]["taskRef"]["name"] + assert "github-set-pending-status" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "get-cache" in btedp[4]["name"] + assert "update-build-number" in btedp[5]["taskRef"]["name"] + assert f"update-build-number-{buildtool}" == btedp[5]["taskRef"]["name"] + assert "security" in btedp[6]["name"] + assert "build" in btedp[7]["name"] + assert "python" == btedp[7]["taskRef"]["name"] + assert "sonar" in btedp[8]["name"] + assert "sonarqube-general" == btedp[8]["taskRef"]["name"] + assert "push" in btedp[9]["name"] + assert buildtool == btedp[9]["taskRef"]["name"] if cbtype == "app": - assert "kaniko-build" in btedp[9]["name"] + assert "kaniko-build" in btedp[10]["name"] + assert "save-cache" in btedp[11]["name"] + assert "git-tag" in btedp[12]["name"] + assert "update-cbis" in btedp[13]["name"] + if cbtype == "lib": assert "save-cache" in btedp[10]["name"] assert "git-tag" in btedp[11]["name"] - assert "update-cbis" in btedp[12]["name"] - if cbtype == "lib": - assert "save-cache" in btedp[9]["name"] - assert "git-tag" in btedp[10]["name"] assert "update-cbb" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "github-set-success-status" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "github-set-failure-status" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][3]["name"] def test_python_common_pipelines_harbor_gitlab(): @@ -268,55 +274,61 @@ def test_python_common_pipelines_harbor_gitlab(): # build with default versioning btd = r["pipeline"][gitlab_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "get-cache" in btd[3]["name"] - assert "update-build-number" in btd[4]["name"] - assert "security" in btd[5]["name"] - assert "build" in btd[6]["name"] - assert "python" == btd[6]["taskRef"]["name"] - assert "sonar" in btd[7]["name"] - assert "sonarqube-general" == btd[7]["taskRef"]["name"] - assert "push" in btd[8]["name"] - assert buildtool == btd[8]["taskRef"]["name"] + assert "report-pipeline-start-to-gitlab" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "get-cache" in btd[4]["name"] + assert "update-build-number" in btd[5]["name"] + assert "security" in btd[6]["name"] + assert "build" in btd[7]["name"] + assert "python" == btd[7]["taskRef"]["name"] + assert "sonar" in btd[8]["name"] + assert "sonarqube-general" == btd[8]["taskRef"]["name"] + assert "push" in btd[9]["name"] + assert buildtool == btd[9]["taskRef"]["name"] if cbtype == "app": - assert "kaniko-build" in btd[9]["name"] + assert "kaniko-build" in btd[10]["name"] + assert "save-cache" in btd[11]["name"] + assert "git-tag" in btd[12]["name"] + assert "update-cbis" in btd[13]["name"] + if cbtype == "lib": assert "save-cache" in btd[10]["name"] assert "git-tag" in btd[11]["name"] - assert "update-cbis" in btd[12]["name"] - if cbtype == "lib": - assert "save-cache" in btd[9]["name"] - assert "git-tag" in btd[10]["name"] assert "push-to-jira" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "gitlab-set-success-status" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "gitlab-set-failure-status" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][gitlab_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "get-cache" in btedp[3]["name"] - assert "update-build-number" in btedp[4]["taskRef"]["name"] - assert f"update-build-number-{buildtool}" == btedp[4]["taskRef"]["name"] - assert "security" in btedp[5]["name"] - assert "build" in btedp[6]["name"] - assert "python" == btedp[6]["taskRef"]["name"] - assert "sonar" in btedp[7]["name"] - assert "sonarqube-general" == btedp[7]["taskRef"]["name"] - assert "push" in btedp[8]["name"] - assert buildtool == btedp[8]["taskRef"]["name"] + assert "report-pipeline-start-to-gitlab" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "get-cache" in btedp[4]["name"] + assert "update-build-number" in btedp[5]["taskRef"]["name"] + assert f"update-build-number-{buildtool}" == btedp[5]["taskRef"]["name"] + assert "security" in btedp[6]["name"] + assert "build" in btedp[7]["name"] + assert "python" == btedp[7]["taskRef"]["name"] + assert "sonar" in btedp[8]["name"] + assert "sonarqube-general" == btedp[8]["taskRef"]["name"] + assert "push" in btedp[9]["name"] + assert buildtool == btedp[9]["taskRef"]["name"] if cbtype == "app": - assert "kaniko-build" in btedp[9]["name"] + assert "kaniko-build" in btedp[10]["name"] + assert "save-cache" in btedp[11]["name"] + assert "git-tag" in btedp[12]["name"] + assert "update-cbis" in btedp[13]["name"] + if cbtype == "lib": assert "save-cache" in btedp[10]["name"] assert "git-tag" in btedp[11]["name"] - assert "update-cbis" in btedp[12]["name"] - if cbtype == "lib": - assert "save-cache" in btedp[9]["name"] - assert "git-tag" in btedp[10]["name"] assert "update-cbb" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "gitlab-set-success-status" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "gitlab-set-failure-status" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][3]["name"] def test_python_common_pipelines_harbor_bitbucket(): config = """ @@ -372,55 +384,61 @@ def test_python_common_pipelines_harbor_bitbucket(): # build with default versioning btd = r["pipeline"][bitbucket_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "get-cache" in btd[3]["name"] - assert "update-build-number" in btd[4]["name"] - assert "security" in btd[5]["name"] - assert "build" in btd[6]["name"] - assert "python" == btd[6]["taskRef"]["name"] - assert "sonar" in btd[7]["name"] - assert "sonarqube-general" == btd[7]["taskRef"]["name"] - assert "push" in btd[8]["name"] - assert buildtool == btd[8]["taskRef"]["name"] + assert "bitbucket-set-pending-status" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "get-cache" in btd[4]["name"] + assert "update-build-number" in btd[5]["name"] + assert "security" in btd[6]["name"] + assert "build" in btd[7]["name"] + assert "python" == btd[7]["taskRef"]["name"] + assert "sonar" in btd[8]["name"] + assert "sonarqube-general" == btd[8]["taskRef"]["name"] + assert "push" in btd[9]["name"] + assert buildtool == btd[9]["taskRef"]["name"] if cbtype == "app": - assert "kaniko-build" in btd[9]["name"] + assert "kaniko-build" in btd[10]["name"] + assert "save-cache" in btd[11]["name"] + assert "git-tag" in btd[12]["name"] + assert "update-cbis" in btd[13]["name"] + if cbtype == "lib": assert "save-cache" in btd[10]["name"] assert "git-tag" in btd[11]["name"] - assert "update-cbis" in btd[12]["name"] - if cbtype == "lib": - assert "save-cache" in btd[9]["name"] - assert "git-tag" in btd[10]["name"] assert "push-to-jira" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "bitbucket-set-success-status" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "bitbucket-set-failure-status" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "get-cache" in btedp[3]["name"] - assert "update-build-number" in btedp[4]["taskRef"]["name"] - assert f"update-build-number-{buildtool}" == btedp[4]["taskRef"]["name"] - assert "security" in btedp[5]["name"] - assert "build" in btedp[6]["name"] - assert "python" == btedp[6]["taskRef"]["name"] - assert "sonar" in btedp[7]["name"] - assert "sonarqube-general" == btedp[7]["taskRef"]["name"] - assert "push" in btedp[8]["name"] - assert buildtool == btedp[8]["taskRef"]["name"] + assert "bitbucket-set-pending-status" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "get-cache" in btedp[4]["name"] + assert "update-build-number" in btedp[5]["taskRef"]["name"] + assert f"update-build-number-{buildtool}" == btedp[5]["taskRef"]["name"] + assert "security" in btedp[6]["name"] + assert "build" in btedp[7]["name"] + assert "python" == btedp[7]["taskRef"]["name"] + assert "sonar" in btedp[8]["name"] + assert "sonarqube-general" == btedp[8]["taskRef"]["name"] + assert "push" in btedp[9]["name"] + assert buildtool == btedp[9]["taskRef"]["name"] if cbtype == "app": - assert "kaniko-build" in btedp[9]["name"] + assert "kaniko-build" in btedp[10]["name"] + assert "save-cache" in btedp[11]["name"] + assert "git-tag" in btedp[12]["name"] + assert "update-cbis" in btedp[13]["name"] + if cbtype == "lib": assert "save-cache" in btedp[10]["name"] assert "git-tag" in btedp[11]["name"] - assert "update-cbis" in btedp[12]["name"] - if cbtype == "lib": - assert "save-cache" in btedp[9]["name"] - assert "git-tag" in btedp[10]["name"] assert "update-cbb" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "bitbucket-set-success-status" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "bitbucket-set-failure-status" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][3]["name"] @pytest.mark.parametrize("framework", ["fastapi", "flask"]) @@ -550,47 +568,53 @@ def test_python_pipelines_harbor_gitlab(framework): # build with default versioning bd = ht["pipeline"][build_default]["spec"]["tasks"] - assert "fetch-repository" in bd[0]["name"] - assert "init-values" in bd[1]["name"] - assert "get-version" in bd[2]["name"] - assert f"get-version-default" == bd[2]["taskRef"]["name"] - assert "get-cache" in bd[3]["name"] - assert "update-build-number" in bd[4]["name"] - assert "security" in bd[5]["name"] - assert "build" in bd[6]["name"] - assert "python" == bd[6]["taskRef"]["name"] - assert "sonar" in bd[7]["name"] - assert "sonarqube-general" == bd[7]["taskRef"]["name"] - assert "push" in bd[8]["name"] - assert buildtool == bd[8]["taskRef"]["name"] - assert "kaniko-build" in bd[9]["name"] - assert "save-cache" in bd[10]["name"] - assert "git-tag" in bd[11]["name"] - assert "update-cbis" in bd[12]["name"] + assert "report-pipeline-start-to-gitlab" in bd[0]["name"] + assert "fetch-repository" in bd[1]["name"] + assert "init-values" in bd[2]["name"] + assert "get-version" in bd[3]["name"] + assert f"get-version-default" == bd[3]["taskRef"]["name"] + assert "get-cache" in bd[4]["name"] + assert "update-build-number" in bd[5]["name"] + assert "security" in bd[6]["name"] + assert "build" in bd[7]["name"] + assert "python" == bd[7]["taskRef"]["name"] + assert "sonar" in bd[8]["name"] + assert "sonarqube-general" == bd[8]["taskRef"]["name"] + assert "push" in bd[9]["name"] + assert buildtool == bd[9]["taskRef"]["name"] + assert "kaniko-build" in bd[10]["name"] + assert "save-cache" in bd[11]["name"] + assert "git-tag" in bd[12]["name"] + assert "update-cbis" in bd[13]["name"] assert "push-to-jira" in ht["pipeline"][build_default]["spec"]["finally"][0]["name"] + assert "gitlab-set-success-status" in ht["pipeline"][build_default]["spec"]["finally"][1]["name"] + assert "gitlab-set-failure-status" in ht["pipeline"][build_default]["spec"]["finally"][2]["name"] # build with edp versioning bedp = ht["pipeline"][build_edp]["spec"]["tasks"] - assert "fetch-repository" in bedp[0]["name"] - assert "init-values" in bedp[1]["name"] - assert "get-version" in bedp[2]["name"] - assert "get-version-edp" == bedp[2]["taskRef"]["name"] - assert "get-cache" in bedp[3]["name"] - assert "update-build-number" in bedp[4]["taskRef"]["name"] - assert f"update-build-number-{buildtool}" == bedp[4]["taskRef"]["name"] - assert "security" in bedp[5]["name"] - assert "build" in bedp[6]["name"] - assert "python" == bedp[6]["taskRef"]["name"] - assert "sonar" in bedp[7]["name"] - assert "sonarqube-general" == bedp[7]["taskRef"]["name"] - assert "push" in bedp[8]["name"] - assert buildtool == bedp[8]["taskRef"]["name"] - assert "kaniko-build" in bedp[9]["name"] - assert "save-cache" in bedp[10]["name"] - assert "git-tag" in bedp[11]["name"] - assert "update-cbis" in bedp[12]["name"] + assert "report-pipeline-start-to-gitlab" in bedp[0]["name"] + assert "fetch-repository" in bedp[1]["name"] + assert "init-values" in bedp[2]["name"] + assert "get-version" in bedp[3]["name"] + assert "get-version-edp" == bedp[3]["taskRef"]["name"] + assert "get-cache" in bedp[4]["name"] + assert "update-build-number" in bedp[5]["taskRef"]["name"] + assert f"update-build-number-{buildtool}" == bedp[5]["taskRef"]["name"] + assert "security" in bedp[6]["name"] + assert "build" in bedp[7]["name"] + assert "python" == bedp[7]["taskRef"]["name"] + assert "sonar" in bedp[8]["name"] + assert "sonarqube-general" == bedp[8]["taskRef"]["name"] + assert "push" in bedp[9]["name"] + assert buildtool == bedp[9]["taskRef"]["name"] + assert "kaniko-build" in bedp[10]["name"] + assert "save-cache" in bedp[11]["name"] + assert "git-tag" in bedp[12]["name"] + assert "update-cbis" in bedp[13]["name"] assert "update-cbb" in ht["pipeline"][build_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in ht["pipeline"][build_edp]["spec"]["finally"][1]["name"] + assert "gitlab-set-success-status" in ht["pipeline"][build_edp]["spec"]["finally"][2]["name"] + assert "gitlab-set-failure-status" in ht["pipeline"][build_edp]["spec"]["finally"][3]["name"] @pytest.mark.parametrize("framework", ["fastapi", "flask"]) def test_python_pipelines_harbor_bitbucket(framework): @@ -633,47 +657,53 @@ def test_python_pipelines_harbor_bitbucket(framework): # build with default versioning bd = ht["pipeline"][build_default]["spec"]["tasks"] - assert "fetch-repository" in bd[0]["name"] - assert "init-values" in bd[1]["name"] - assert "get-version" in bd[2]["name"] - assert f"get-version-default" == bd[2]["taskRef"]["name"] - assert "get-cache" in bd[3]["name"] - assert "update-build-number" in bd[4]["name"] - assert "security" in bd[5]["name"] - assert "build" in bd[6]["name"] - assert "python" == bd[6]["taskRef"]["name"] - assert "sonar" in bd[7]["name"] - assert "sonarqube-general" == bd[7]["taskRef"]["name"] - assert "push" in bd[8]["name"] - assert buildtool == bd[8]["taskRef"]["name"] - assert "kaniko-build" in bd[9]["name"] - assert "save-cache" in bd[10]["name"] - assert "git-tag" in bd[11]["name"] - assert "update-cbis" in bd[12]["name"] + assert "bitbucket-set-pending-status" in bd[0]["name"] + assert "fetch-repository" in bd[1]["name"] + assert "init-values" in bd[2]["name"] + assert "get-version" in bd[3]["name"] + assert f"get-version-default" == bd[3]["taskRef"]["name"] + assert "get-cache" in bd[4]["name"] + assert "update-build-number" in bd[5]["name"] + assert "security" in bd[6]["name"] + assert "build" in bd[7]["name"] + assert "python" == bd[7]["taskRef"]["name"] + assert "sonar" in bd[8]["name"] + assert "sonarqube-general" == bd[8]["taskRef"]["name"] + assert "push" in bd[9]["name"] + assert buildtool == bd[9]["taskRef"]["name"] + assert "kaniko-build" in bd[10]["name"] + assert "save-cache" in bd[11]["name"] + assert "git-tag" in bd[12]["name"] + assert "update-cbis" in bd[13]["name"] assert "push-to-jira" in ht["pipeline"][build_default]["spec"]["finally"][0]["name"] + assert "bitbucket-set-success-status" in ht["pipeline"][build_default]["spec"]["finally"][1]["name"] + assert "bitbucket-set-failure-status" in ht["pipeline"][build_default]["spec"]["finally"][2]["name"] # build with edp versioning bedp = ht["pipeline"][build_edp]["spec"]["tasks"] - assert "fetch-repository" in bedp[0]["name"] - assert "init-values" in bedp[1]["name"] - assert "get-version" in bedp[2]["name"] - assert "get-version-edp" == bedp[2]["taskRef"]["name"] - assert "get-cache" in bedp[3]["name"] - assert "update-build-number" in bedp[4]["taskRef"]["name"] - assert f"update-build-number-{buildtool}" == bedp[4]["taskRef"]["name"] - assert "security" in bedp[5]["name"] - assert "build" in bedp[6]["name"] - assert "python" == bedp[6]["taskRef"]["name"] - assert "sonar" in bedp[7]["name"] - assert "sonarqube-general" == bedp[7]["taskRef"]["name"] - assert "push" in bedp[8]["name"] - assert buildtool == bedp[8]["taskRef"]["name"] - assert "kaniko-build" in bedp[9]["name"] - assert "save-cache" in bedp[10]["name"] - assert "git-tag" in bedp[11]["name"] - assert "update-cbis" in bedp[12]["name"] + assert "bitbucket-set-pending-status" in bedp[0]["name"] + assert "fetch-repository" in bedp[1]["name"] + assert "init-values" in bedp[2]["name"] + assert "get-version" in bedp[3]["name"] + assert "get-version-edp" == bedp[3]["taskRef"]["name"] + assert "get-cache" in bedp[4]["name"] + assert "update-build-number" in bedp[5]["taskRef"]["name"] + assert f"update-build-number-{buildtool}" == bedp[5]["taskRef"]["name"] + assert "security" in bedp[6]["name"] + assert "build" in bedp[7]["name"] + assert "python" == bedp[7]["taskRef"]["name"] + assert "sonar" in bedp[8]["name"] + assert "sonarqube-general" == bedp[8]["taskRef"]["name"] + assert "push" in bedp[9]["name"] + assert buildtool == bedp[9]["taskRef"]["name"] + assert "kaniko-build" in bedp[10]["name"] + assert "save-cache" in bedp[11]["name"] + assert "git-tag" in bedp[12]["name"] + assert "update-cbis" in bedp[13]["name"] assert "update-cbb" in ht["pipeline"][build_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in ht["pipeline"][build_edp]["spec"]["finally"][1]["name"] + assert "bitbucket-set-success-status" in ht["pipeline"][build_edp]["spec"]["finally"][2]["name"] + assert "bitbucket-set-failure-status" in ht["pipeline"][build_edp]["spec"]["finally"][3]["name"] @pytest.mark.parametrize("framework", ["fastapi", "flask"]) @@ -717,47 +747,53 @@ def test_python_pipelines_harbor_github(framework): # build with default versioning bd = ht["pipeline"][build_default]["spec"]["tasks"] - assert "fetch-repository" in bd[0]["name"] - assert "init-values" in bd[1]["name"] - assert "get-version" in bd[2]["name"] - assert f"get-version-default" == bd[2]["taskRef"]["name"] - assert "get-cache" in bd[3]["name"] - assert "update-build-number" in bd[4]["name"] - assert "security" in bd[5]["name"] - assert "build" in bd[6]["name"] - assert "python" == bd[6]["taskRef"]["name"] - assert "sonar" in bd[7]["name"] - assert "sonarqube-general" == bd[7]["taskRef"]["name"] - assert "push" in bd[8]["name"] - assert buildtool == bd[8]["taskRef"]["name"] - assert "kaniko-build" in bd[9]["name"] - assert "save-cache" in bd[10]["name"] - assert "git-tag" in bd[11]["name"] - assert "update-cbis" in bd[12]["name"] + assert "github-set-pending-status" in bd[0]["name"] + assert "fetch-repository" in bd[1]["name"] + assert "init-values" in bd[2]["name"] + assert "get-version" in bd[3]["name"] + assert f"get-version-default" == bd[3]["taskRef"]["name"] + assert "get-cache" in bd[4]["name"] + assert "update-build-number" in bd[5]["name"] + assert "security" in bd[6]["name"] + assert "build" in bd[7]["name"] + assert "python" == bd[7]["taskRef"]["name"] + assert "sonar" in bd[8]["name"] + assert "sonarqube-general" == bd[8]["taskRef"]["name"] + assert "push" in bd[9]["name"] + assert buildtool == bd[9]["taskRef"]["name"] + assert "kaniko-build" in bd[10]["name"] + assert "save-cache" in bd[11]["name"] + assert "git-tag" in bd[12]["name"] + assert "update-cbis" in bd[13]["name"] assert "push-to-jira" in ht["pipeline"][build_default]["spec"]["finally"][0]["name"] + assert "github-set-success-status" in ht["pipeline"][build_default]["spec"]["finally"][1]["name"] + assert "github-set-failure-status" in ht["pipeline"][build_default]["spec"]["finally"][2]["name"] # build with edp versioning bedp = ht["pipeline"][build_edp]["spec"]["tasks"] - assert "fetch-repository" in bedp[0]["name"] - assert "init-values" in bedp[1]["name"] - assert "get-version" in bedp[2]["name"] - assert "get-version-edp" == bedp[2]["taskRef"]["name"] - assert "get-cache" in bedp[3]["name"] - assert "update-build-number" in bedp[4]["taskRef"]["name"] - assert f"update-build-number-{buildtool}" == bedp[4]["taskRef"]["name"] - assert "security" in bedp[5]["name"] - assert "build" in bedp[6]["name"] - assert "python" == bedp[6]["taskRef"]["name"] - assert "sonar" in bedp[7]["name"] - assert "sonarqube-general" == bedp[7]["taskRef"]["name"] - assert "push" in bedp[8]["name"] - assert buildtool == bedp[8]["taskRef"]["name"] - assert "kaniko-build" in bedp[9]["name"] - assert "save-cache" in bedp[10]["name"] - assert "git-tag" in bedp[11]["name"] - assert "update-cbis" in bedp[12]["name"] + assert "github-set-pending-status" in bedp[0]["name"] + assert "fetch-repository" in bedp[1]["name"] + assert "init-values" in bedp[2]["name"] + assert "get-version" in bedp[3]["name"] + assert "get-version-edp" == bedp[3]["taskRef"]["name"] + assert "get-cache" in bedp[4]["name"] + assert "update-build-number" in bedp[5]["taskRef"]["name"] + assert f"update-build-number-{buildtool}" == bedp[5]["taskRef"]["name"] + assert "security" in bedp[6]["name"] + assert "build" in bedp[7]["name"] + assert "python" == bedp[7]["taskRef"]["name"] + assert "sonar" in bedp[8]["name"] + assert "sonarqube-general" == bedp[8]["taskRef"]["name"] + assert "push" in bedp[9]["name"] + assert buildtool == bedp[9]["taskRef"]["name"] + assert "kaniko-build" in bedp[10]["name"] + assert "save-cache" in bedp[11]["name"] + assert "git-tag" in bedp[12]["name"] + assert "update-cbis" in bedp[13]["name"] assert "update-cbb" in ht["pipeline"][build_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in ht["pipeline"][build_edp]["spec"]["finally"][1]["name"] + assert "github-set-success-status" in ht["pipeline"][build_edp]["spec"]["finally"][2]["name"] + assert "github-set-failure-status" in ht["pipeline"][build_edp]["spec"]["finally"][3]["name"] from .helpers import helm_template @@ -863,27 +899,33 @@ def test_ansible_pipelines_github(): # build with default versioning btd = r["pipeline"][github_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] + assert "github-set-pending-status" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] # ensure we have default versioning - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "ansible-lint" in btd[3]["name"] - assert "ansible-tests" in btd[4]["name"] - assert "git-tag" in btd[5]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "ansible-lint" in btd[4]["name"] + assert "ansible-tests" in btd[5]["name"] + assert "git-tag" in btd[6]["name"] assert "push-to-jira" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "github-set-success-status" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "github-set-failure-status" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][github_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "ansible-lint" in btedp[3]["name"] - assert "ansible-tests" in btedp[4]["name"] - assert "git-tag" in btedp[5]["name"] + assert "github-set-pending-status" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "ansible-lint" in btedp[4]["name"] + assert "ansible-tests" in btedp[5]["name"] + assert "git-tag" in btedp[6]["name"] assert "update-cbb" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "github-set-success-status" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "github-set-failure-status" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][3]["name"] def test_ansible_pipelines_gitlab(): config = """ @@ -924,27 +966,33 @@ def test_ansible_pipelines_gitlab(): # build with default versioning btd = r["pipeline"][gitlab_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] + assert "report-pipeline-start-to-gitlab" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] # ensure we have default versioning - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "ansible-lint" in btd[3]["name"] - assert "ansible-tests" in btd[4]["name"] - assert "git-tag" in btd[5]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "ansible-lint" in btd[4]["name"] + assert "ansible-tests" in btd[5]["name"] + assert "git-tag" in btd[6]["name"] assert "push-to-jira" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "gitlab-set-success-status" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "gitlab-set-failure-status" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][gitlab_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "ansible-lint" in btedp[3]["name"] - assert "ansible-tests" in btedp[4]["name"] - assert "git-tag" in btedp[5]["name"] + assert "report-pipeline-start-to-gitlab" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "ansible-lint" in btedp[4]["name"] + assert "ansible-tests" in btedp[5]["name"] + assert "git-tag" in btedp[6]["name"] assert "update-cbb" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "gitlab-set-success-status" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "gitlab-set-failure-status" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][3]["name"] def test_ansible_pipelines_bitbucket(): config = """ @@ -985,24 +1033,30 @@ def test_ansible_pipelines_bitbucket(): # build with default versioning btd = r["pipeline"][bitbucket_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] + assert "bitbucket-set-pending-status" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] # ensure we have default versioning - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "ansible-lint" in btd[3]["name"] - assert "ansible-tests" in btd[4]["name"] - assert "git-tag" in btd[5]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "ansible-lint" in btd[4]["name"] + assert "ansible-tests" in btd[5]["name"] + assert "git-tag" in btd[6]["name"] assert "push-to-jira" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "bitbucket-set-success-status" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "bitbucket-set-failure-status" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "ansible-lint" in btedp[3]["name"] - assert "ansible-tests" in btedp[4]["name"] - assert "git-tag" in btedp[5]["name"] + assert "bitbucket-set-pending-status" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "ansible-lint" in btedp[4]["name"] + assert "ansible-tests" in btedp[5]["name"] + assert "git-tag" in btedp[6]["name"] assert "update-cbb" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "bitbucket-set-success-status" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "bitbucket-set-failure-status" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][3]["name"] diff --git a/charts/pipelines-library/tests/test_terraform_pipelines.py b/charts/pipelines-library/tests/test_terraform_pipelines.py index e0636c57..94a6764f 100644 --- a/charts/pipelines-library/tests/test_terraform_pipelines.py +++ b/charts/pipelines-library/tests/test_terraform_pipelines.py @@ -90,25 +90,31 @@ def test_terraform_pipelines_github(): # build with default versioning btd = r["pipeline"][github_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] + assert "github-set-pending-status" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] # ensure we have default versioning - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "terraform-check" in btd[3]["name"] - assert "git-tag" in btd[4]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "terraform-check" in btd[4]["name"] + assert "git-tag" in btd[5]["name"] assert "push-to-jira" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "github-set-success-status" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "github-set-failure-status" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][github_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "terraform-check" in btedp[3]["name"] - assert "git-tag" in btedp[4]["name"] + assert "github-set-pending-status" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "terraform-check" in btedp[4]["name"] + assert "git-tag" in btedp[5]["name"] assert "update-cbb" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "github-set-success-status" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "github-set-failure-status" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][3]["name"] def test_terraform_pipelines_gitlab(): config = """ @@ -144,25 +150,31 @@ def test_terraform_pipelines_gitlab(): # build with default versioning btd = r["pipeline"][gitlab_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] + assert "report-pipeline-start-to-gitlab" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] # ensure we have default versioning - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "terraform-check" in btd[3]["name"] - assert "git-tag" in btd[4]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "terraform-check" in btd[4]["name"] + assert "git-tag" in btd[5]["name"] assert "push-to-jira" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "gitlab-set-success-status" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "gitlab-set-failure-status" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][gitlab_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "terraform-check" in btedp[3]["name"] - assert "git-tag" in btedp[4]["name"] + assert "report-pipeline-start-to-gitlab" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "terraform-check" in btedp[4]["name"] + assert "git-tag" in btedp[5]["name"] assert "update-cbb" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "gitlab-set-success-status" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "gitlab-set-failure-status" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][3]["name"] def test_terraform_pipelines_bitbucket(): config = """ @@ -198,25 +210,31 @@ def test_terraform_pipelines_bitbucket(): # build with default versioning btd = r["pipeline"][bitbucket_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] + assert "bitbucket-set-pending-status" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] # ensure we have default versioning - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "terraform-check" in btd[3]["name"] - assert "git-tag" in btd[4]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "terraform-check" in btd[4]["name"] + assert "git-tag" in btd[5]["name"] assert "push-to-jira" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "bitbucket-set-success-status" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "bitbucket-set-failure-status" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "terraform-check" in btedp[3]["name"] - assert "git-tag" in btedp[4]["name"] + assert "bitbucket-set-pending-status" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "terraform-check" in btedp[4]["name"] + assert "git-tag" in btedp[5]["name"] assert "update-cbb" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "bitbucket-set-success-status" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "bitbucket-set-failure-status" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][3]["name"] def test_terraform_inf_pipelines_gerrit(): config = """ @@ -307,25 +325,31 @@ def test_terraform_inf_pipelines_github(): # build with default versioning btd = r["pipeline"][github_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] + assert "github-set-pending-status" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] # ensure we have default versioning - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "terraform-check" in btd[3]["name"] - assert "git-tag" in btd[4]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "terraform-check" in btd[4]["name"] + assert "git-tag" in btd[5]["name"] assert "push-to-jira" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "github-set-success-status" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "github-set-failure-status" in r["pipeline"][github_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][github_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "terraform-check" in btedp[3]["name"] - assert "git-tag" in btedp[4]["name"] + assert "github-set-pending-status" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "terraform-check" in btedp[4]["name"] + assert "git-tag" in btedp[5]["name"] assert "update-cbb" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "github-set-success-status" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "github-set-failure-status" in r["pipeline"][github_build_pipeline_edp]["spec"]["finally"][3]["name"] def test_terraform_inf_pipelines_gitlab(): config = """ @@ -361,25 +385,31 @@ def test_terraform_inf_pipelines_gitlab(): # build with default versioning btd = r["pipeline"][gitlab_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] + assert "report-pipeline-start-to-gitlab" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] # ensure we have default versioning - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "terraform-check" in btd[3]["name"] - assert "git-tag" in btd[4]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "terraform-check" in btd[4]["name"] + assert "git-tag" in btd[5]["name"] assert "push-to-jira" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "gitlab-set-success-status" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "gitlab-set-failure-status" in r["pipeline"][gitlab_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][gitlab_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "terraform-check" in btedp[3]["name"] - assert "git-tag" in btedp[4]["name"] + assert "report-pipeline-start-to-gitlab" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "terraform-check" in btedp[4]["name"] + assert "git-tag" in btedp[5]["name"] assert "update-cbb" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "gitlab-set-success-status" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "gitlab-set-failure-status" in r["pipeline"][gitlab_build_pipeline_edp]["spec"]["finally"][3]["name"] def test_terraform_inf_pipelines_bitbucket(): config = """ @@ -415,22 +445,28 @@ def test_terraform_inf_pipelines_bitbucket(): # build with default versioning btd = r["pipeline"][bitbucket_build_pipeline_def]["spec"]["tasks"] - assert "fetch-repository" in btd[0]["name"] - assert "init-values" in btd[1]["name"] - assert "get-version" in btd[2]["name"] + assert "bitbucket-set-pending-status" in btd[0]["name"] + assert "fetch-repository" in btd[1]["name"] + assert "init-values" in btd[2]["name"] + assert "get-version" in btd[3]["name"] # ensure we have default versioning - assert f"get-version-default" == btd[2]["taskRef"]["name"] - assert "terraform-check" in btd[3]["name"] - assert "git-tag" in btd[4]["name"] + assert f"get-version-default" == btd[3]["taskRef"]["name"] + assert "terraform-check" in btd[4]["name"] + assert "git-tag" in btd[5]["name"] assert "push-to-jira" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][0]["name"] + assert "bitbucket-set-success-status" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][1]["name"] + assert "bitbucket-set-failure-status" in r["pipeline"][bitbucket_build_pipeline_def]["spec"]["finally"][2]["name"] # build with edp versioning btedp = r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["tasks"] - assert "fetch-repository" in btedp[0]["name"] - assert "init-values" in btedp[1]["name"] - assert "get-version" in btedp[2]["name"] - assert "get-version-edp" == btedp[2]["taskRef"]["name"] - assert "terraform-check" in btedp[3]["name"] - assert "git-tag" in btedp[4]["name"] + assert "bitbucket-set-pending-status" in btedp[0]["name"] + assert "fetch-repository" in btedp[1]["name"] + assert "init-values" in btedp[2]["name"] + assert "get-version" in btedp[3]["name"] + assert "get-version-edp" == btedp[3]["taskRef"]["name"] + assert "terraform-check" in btedp[4]["name"] + assert "git-tag" in btedp[5]["name"] assert "update-cbb" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][0]["name"] assert "push-to-jira" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][1]["name"] + assert "bitbucket-set-success-status" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][2]["name"] + assert "bitbucket-set-failure-status" in r["pipeline"][bitbucket_build_pipeline_edp]["spec"]["finally"][3]["name"]