{{ if has "gitlab" .Values.global.gitProviders }}
{{ if (index .Values.pipelines.deployableResources.python "python3.8" ) }}
apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
  name: gitlab-python-python-3.8-lib-review
  labels:
    app.edp.epam.com/pipelinetype: review
    {{- include "edp-tekton.labels" . | nindent 4 }}
spec:
  description: "The Review pipeline for building Python"
  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/python-python-python-3.8"
      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: git-refspec
      description: Refspec to fetch before checking out revision.
      default: ""
      type: string
    - name: changeNumber
      description: Change number from Merge Request
      default: ""
      type: string
    - name: targetBranch
      description: Target branch of Merge Request
      default: ""
      type: string
    - name: CODEBASE_NAME
      default: "python-app"
      description: "Project name"
      type: string
    - name: CODEBASEBRANCH_NAME
      description: "Codebasebranch name"
      type: string
    - name: image
      default: '{{ include "edp-tekton.registry" . }}/python:3.8-slim'
      description: "python image version"
      type: string
    - name: gitfullrepositoryname
      description: "repository full name"
      type: string
  tasks:

{{- include "gitlab-review-start" . | nindent 4 }}

{{- include "get-cache" $ | nindent 4 }}

{{ include "python-review-common" . | nindent 4 }}

{{- include "save-cache" $ | nindent 4 }}

{{ include "gitlab-review-vote" . | nindent 2 }}

{{ end }}
{{ end }}
