apiVersion: tekton.dev/v1beta1 kind: Pipeline metadata: name: pipeline-symfonyapp 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 git repo branch to merge to. # - name: image # type: string # description: Full name of image repo. # - name: dockerfile # type: string # description: 'The path to the Dockerfile to execute (default: ./Dockerfile)' 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: fetch-source 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' # ⭐ Lecture du readme du projet - name: show-readme runAfter: ["fetch-source"] taskRef: name: show-readme workspaces: - name: source workspace: shared-data # ⭐ Execution des tests php-security-check - name: php-security-check runAfter: ["fetch-source"] taskRef: name: php-security-check workspaces: - name: source workspace: shared-data # ⭐ Execution des tests phpstan - name: phpstan runAfter: ["fetch-source"] taskRef: name: phpstan workspaces: - name: source workspace: shared-data # ⭐ Execution des tests php-cs-fixer - name: php-cs-fixer runAfter: ["fetch-source"] taskRef: name: php-cs-fixer workspaces: - name: source workspace: shared-data - name: config workspace: config params: - name: destination value: $(params.destination) # ⭐ Execution des tests unitaires avec une BDD en sidecar - name: php-unit-test runAfter: - fetch-source # - php-cs-fixer # - phpstan # - php-security-check taskRef: name: php-unit-test workspaces: - name: source workspace: shared-data ## 🔨 Build de l'image # - name: kaniko-build # taskRef: # name: kaniko # params: # - name: IMAGE # value: $(params.image) # - name: DOCKERFILE # value: $(params.dockerfile) # - 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: # - php-unit-test # retries: 3