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: destination type: string description: The branch to merge to. - 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. 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 - name: gitea-access-token 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' # ⭐ Exécution des tests phpsecuritycheck - name: phpsecuritycheck runAfter: ["gitclone"] taskRef: name: phpsecuritycheck workspaces: - name: source workspace: shared-data # ⭐ Exécution 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) # ⭐ Exécution des tests php-cs-fixer - name: phpcsfixer runAfter: ["gitclone"] taskRef: name: phpcsfixer workspaces: - name: source workspace: shared-data - name: config workspace: config params: - name: destination value: $(params.destination) # ⭐ Execution des tests unitaires et fonctionnels - name: phpunittest runAfter: ["gitclone"] taskRef: name: phpunittest workspaces: - name: source workspace: shared-data finally: # 📨 Envoie du resulat de php-cs-fixer à gitea - name: phpcsfixer-giteacomment taskRef: name: giteacomment workspaces: - name: source workspace: shared-data - name: gitea-access-token workspace: gitea-access-token params: - name: apiurl value: $(params.apiurl) - name: requestid value: $(params.requestid) - name: title value: "PHP-CS-FIXER" - name: filepath value: "temp_phpcsfixer.txt" # 📨 Envoi du resulat de phpstan à gitea - name: phpstan-giteacomment taskRef: name: giteacomment workspaces: - name: source workspace: shared-data - name: gitea-access-token workspace: gitea-access-token params: - name: apiurl value: $(params.apiurl) - name: requestid value: $(params.requestid) - name: title value: "PHPSTAN" - name: filepath value: "temp_phpstan.txt" # 📨 Envoie le resulat de phpsecuritychecker à gitea - name: phpsecuritychecker-giteacomment taskRef: name: giteacomment workspaces: - name: source workspace: shared-data - name: gitea-access-token workspace: gitea-access-token params: - name: apiurl value: $(params.apiurl) - name: requestid value: $(params.requestid) - name: title value: "PHP-SECURITY-CHECK" - name: filepath value: "temp_phpsecuritychecker.txt" # 🧹 Cleanup - name: cleanup-workspace taskRef: name: cleanup-workspace kind: Task workspaces: - name: source workspace: shared-data