Created
October 26, 2022 23:56
-
-
Save kainlite/feee09258150a21cd8c5c49170cff343 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: tekton.dev/v1beta1 | |
| kind: Pipeline | |
| metadata: | |
| name: clone-build-push | |
| namespace: tekton-pipelines | |
| spec: | |
| description: | | |
| This pipeline clones a git repo, builds a Docker image with Kaniko and | |
| pushes it to a registry | |
| params: | |
| - name: repo-url | |
| type: string | |
| - name: image-reference | |
| type: string | |
| workspaces: | |
| - name: shared-data | |
| - name: docker-credentials | |
| tasks: | |
| - name: fetch-source | |
| taskRef: | |
| name: git-clone | |
| workspaces: | |
| - name: output | |
| workspace: shared-data | |
| params: | |
| - name: url | |
| value: $(params.repo-url) | |
| - name: build-push | |
| runAfter: ["fetch-source"] | |
| taskRef: | |
| name: kaniko | |
| workspaces: | |
| - name: source | |
| workspace: shared-data | |
| - name: dockerconfig | |
| workspace: docker-credentials | |
| params: | |
| - name: IMAGE | |
| value: $(params.image-reference) | |
| - name: restart-deployment | |
| runAfter: ["build-push"] | |
| taskRef: | |
| name: kubernetes-actions | |
| params: | |
| - name: script | |
| value: | | |
| kubectl -n tr rollout restart deployment/tr-deployment |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment