162 lines
3.6 KiB
YAML
162 lines
3.6 KiB
YAML
|
apiVersion: tekton.dev/v1beta1
|
||
|
kind: Pipeline
|
||
|
metadata:
|
||
|
name: symfonycheck
|
||
|
spec:
|
||
|
description: |
|
||
|
This pipeline clones a git repo, then echoes the README file to the stout.
|
||
|
params:
|
||
|
- name: url
|
||
|
type: string
|
||
|
description: The git repo URL to clone from.
|
||
|
- name: revision
|
||
|
type: string
|
||
|
description: The git repo branch to checkout.
|
||
|
- name: apiurl
|
||
|
type: string
|
||
|
description: The gitea api url.
|
||
|
- name: requesttype
|
||
|
type: string
|
||
|
description: The gitea request type = "pullrequest / release".
|
||
|
- name: requestid
|
||
|
type: string
|
||
|
description: The gitea request id.
|
||
|
- name: access_token
|
||
|
type: string
|
||
|
description: The gitea access_token id.
|
||
|
|
||
|
workspaces:
|
||
|
- name: shared-data
|
||
|
description: This workspace contains the cloned repo files, so they can be read by the next task.
|
||
|
- name: config
|
||
|
- name: docker-credentials
|
||
|
|
||
|
tasks:
|
||
|
# 📥 Clone du repo git
|
||
|
- name: gitclone
|
||
|
taskRef:
|
||
|
name: git-clone
|
||
|
workspaces:
|
||
|
- name: output
|
||
|
workspace: shared-data
|
||
|
params:
|
||
|
- name: url
|
||
|
value: $(params.url)
|
||
|
- name: revision
|
||
|
value: $(params.revision)
|
||
|
- name: submodules
|
||
|
value: 'false'
|
||
|
- name: depth
|
||
|
value: '50'
|
||
|
|
||
|
# ⭐ Execution des tests phpsecuritycheck
|
||
|
- name: phpsecuritycheck
|
||
|
runAfter: ["gitclone"]
|
||
|
taskRef:
|
||
|
name: phpsecuritycheck
|
||
|
workspaces:
|
||
|
- name: source
|
||
|
workspace: shared-data
|
||
|
|
||
|
# ⭐ Execution des tests phpstan
|
||
|
- name: phpstan
|
||
|
runAfter: ["gitclone"]
|
||
|
taskRef:
|
||
|
name: phpstan
|
||
|
workspaces:
|
||
|
- name: source
|
||
|
workspace: shared-data
|
||
|
params:
|
||
|
- name: apiurl
|
||
|
value: $(params.apiurl)
|
||
|
- name: requestid
|
||
|
value: $(params.requestid)
|
||
|
- name: access_token
|
||
|
value: $(params.access_token)
|
||
|
|
||
|
# ⭐ Execution des tests php-cs-fixer
|
||
|
- name: phpcsfixer
|
||
|
runAfter: ["gitclone"]
|
||
|
taskRef:
|
||
|
name: phpcsfixer
|
||
|
workspaces:
|
||
|
- name: source
|
||
|
workspace: shared-data
|
||
|
- name: config
|
||
|
workspace: config
|
||
|
|
||
|
|
||
|
finally:
|
||
|
# ⭐ Envoyer le resulat de php-cs-fixer à gitea
|
||
|
- name: phpcsfixer-giteacomment
|
||
|
taskRef:
|
||
|
name: giteacomment
|
||
|
workspaces:
|
||
|
- name: source
|
||
|
workspace: shared-data
|
||
|
params:
|
||
|
- name: apiurl
|
||
|
value: $(params.apiurl)
|
||
|
- name: requestid
|
||
|
value: $(params.requestid)
|
||
|
- name: access_token
|
||
|
value: $(params.access_token)
|
||
|
- name: title
|
||
|
value: "PHP-CS-FIXER"
|
||
|
- name: filepath
|
||
|
value: "temp_phpcsfixer.txt"
|
||
|
|
||
|
# ⭐ Envoyer le resulat de phpstan à gitea
|
||
|
- name: phpstan-giteacomment
|
||
|
taskRef:
|
||
|
name: giteacomment
|
||
|
workspaces:
|
||
|
- name: source
|
||
|
workspace: shared-data
|
||
|
params:
|
||
|
- name: apiurl
|
||
|
value: $(params.apiurl)
|
||
|
- name: requestid
|
||
|
value: $(params.requestid)
|
||
|
- name: access_token
|
||
|
value: $(params.access_token)
|
||
|
- name: title
|
||
|
value: "PHPSTAN"
|
||
|
- name: filepath
|
||
|
value: "temp_phpstan.txt"
|
||
|
|
||
|
# ⭐ Envoyer le resulat de phpsecuritychecker à gitea
|
||
|
- name: phpsecuritychecker-giteacomment
|
||
|
taskRef:
|
||
|
name: giteacomment
|
||
|
workspaces:
|
||
|
- name: source
|
||
|
workspace: shared-data
|
||
|
params:
|
||
|
- name: apiurl
|
||
|
value: $(params.apiurl)
|
||
|
- name: requestid
|
||
|
value: $(params.requestid)
|
||
|
- name: access_token
|
||
|
value: $(params.access_token)
|
||
|
- name: title
|
||
|
value: ""
|
||
|
- name: filepath
|
||
|
value: "temp_phpsecuritychecker.txt"
|
||
|
|
||
|
## ⭐ Execution des tests unitaires avec une BDD en sidecar
|
||
|
#- name: phpunittest
|
||
|
# runAfter:
|
||
|
# - gitclone
|
||
|
# # - phpcsfixer
|
||
|
# # - phpstan
|
||
|
# # - phpsecuritycheck
|
||
|
# taskRef:
|
||
|
# name: phpunittest
|
||
|
# workspaces:
|
||
|
# - name: source
|
||
|
# workspace: shared-data
|
||
|
|
||
|
|
||
|
|