102 lines
2.2 KiB
YAML
102 lines
2.2 KiB
YAML
apiVersion: tekton.dev/v1beta1
|
|
kind: Pipeline
|
|
metadata:
|
|
name: symfonybuild
|
|
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: image
|
|
type: string
|
|
description: The image to build.
|
|
- name: apiurl
|
|
type: string
|
|
description: The gitea api url.
|
|
- name: requesttype
|
|
type: string
|
|
description: The gitea request type = pullrequet or 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
|
|
- name: config
|
|
- name: docker-credentials
|
|
|
|
tasks:
|
|
# ⭐ Execution des tests unitaires avec une BDD en sidecar
|
|
- name: imageformater
|
|
taskRef:
|
|
name: imageformater
|
|
params:
|
|
- name: image
|
|
value: $(params.image)
|
|
|
|
|
|
|
|
# 📥 Clone du repo git
|
|
- name: gitclone
|
|
runAfter: [imageformater]
|
|
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 unitaires avec une BDD en sidecar
|
|
#- name: phpunittest
|
|
# runAfter:
|
|
# - gitclone
|
|
# # - phpcsfixer
|
|
# # - phpstan
|
|
# # - phpsecuritycheck
|
|
# taskRef:
|
|
# name: phpunittest
|
|
# workspaces:
|
|
# - name: source
|
|
# workspace: shared-data
|
|
|
|
|
|
|
|
# 🔨 Build de l'image
|
|
- name: kanikobuild
|
|
taskRef:
|
|
name: kaniko
|
|
params:
|
|
- name: IMAGE
|
|
value: $(tasks.imageformater.results.imagetag)
|
|
- name: BUILDER_IMAGE
|
|
value: gcr.io/kaniko-project/executor:v1.20.0
|
|
- name: EXTRA_ARGS
|
|
value:
|
|
- --skip-tls-verify
|
|
- --insecure
|
|
- --ignore-path=/product_uuid
|
|
workspaces:
|
|
- name: source
|
|
workspace: shared-data
|
|
- name: dockerconfig
|
|
workspace: docker-credentials
|
|
runAfter:
|
|
- gitclone
|
|
|