charts/pipelines-library/templates/pipelines/csharp/bitbucket-build-lib-default.yaml (100 lines of code) (raw):
{{ if has "bitbucket" .Values.global.gitProviders }}
{{ if or ( index .Values.pipelines.deployableResources.cs "dotnet3.1" ) ( index .Values.pipelines.deployableResources.cs "dotnet6.0" ) }}
{{- $raw := include "edp-tekton.resourceMapping.cs" . | fromYaml -}}
{{- range $framework, $image:= $raw }}
apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
name: bitbucket-dotnet-{{ $framework }}-lib-build-default
labels:
app.edp.epam.com/pipelinetype: build
{{- include "edp-tekton.labels" $ | nindent 4 }}
spec:
description: "The Build pipeline for building {{ $framework }} library (default versioning)"
workspaces:
- 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/epmd-edp/csharp-dotnet-{{ $framework }}"
description: git url to clone
type: string
- name: git-source-revision
description: 'git revision to checkout (branch, tag, sha, ref…)'
default: "edp"
type: string
- name: CODEBASE_NAME
default: 'csharp-dotnet-{{ $framework }}'
description: "Project name"
type: string
- name: CODEBASEBRANCH_NAME
description: "Codebasebranch name"
type: string
- name: changeNumber
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"
type: string
- name: TICKET_NAME_PATTERN
description: "Ticket name pattern"
default: ""
- name: COMMIT_MESSAGE_PATTERN
description: "Pattern to validate a commit message"
default: ""
- name: COMMIT_MESSAGE
description: "Commit message"
default: ""
- name: JIRA_ISSUE_METADATA_PAYLOAD
description: "Jira Payload"
default: ""
- name: JIRA_SERVER
description: "Jira server name"
default: ""
{{- include "build-result" $ | nindent 2 }}
tasks:
{{- include "bitbucket-build-start" $ | nindent 4 }}
- name: get-version
taskRef:
kind: Task
name: get-version-dotnet-default
runAfter:
- init-values
params:
- name: BRANCH_NAME
value: $(params.git-source-revision)
workspaces:
- name: source
workspace: shared-workspace
subPath: source
{{- include "get-cache" $ | nindent 4 }}
{{ include "security" . | nindent 4 }}
- name: build
taskRef:
kind: Task
name: edp-dotnet
runAfter:
- get-cache
params:
- name: BASE_IMAGE
value: $(params.image)
workspaces:
- name: source
workspace: shared-workspace
{{- include "dotnet-6-0-build-common" . | nindent 4 }}
{{- include "save-cache" $ | nindent 4 }}
{{ include "build-pipeline-lib-end" . | nindent 4 }}
{{ include "finally-block-default" . | nindent 2 }}
{{ include "bitbucket-build-vote" . | nindent 4 }}
---
{{ end }}
{{ end }}
{{ end }}