Created
September 7, 2023 14:08
-
-
Save zregvart/ae4170d97a25d1d4d214e45a6abf8b19 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
# prerequisite: | |
# kubectl apply -f - <<EOF | |
# --- | |
# apiVersion: v1 | |
# kind: PersistentVolumeClaim | |
# metadata: | |
# name: workspace | |
# spec: | |
# accessModes: | |
# - ReadWriteOnce | |
# resources: | |
# requests: | |
# storage: 1Gi | |
# storageClassName: standard | |
# EOF | |
# | |
# run: | |
# tkn pipeline start -f pipeline.yaml -w name=work,claimName=workspace | |
--- | |
apiVersion: tekton.dev/v1 | |
kind: Pipeline | |
metadata: | |
name: simple | |
spec: | |
tasks: | |
- name: checkout | |
params: | |
- name: url | |
value: https://github.com/enterprise-contract/golden-container.git | |
- name: revision | |
value: main | |
workspaces: | |
- name: output | |
workspace: work | |
taskRef: | |
resolver: git | |
params: | |
- name: url | |
value: https://github.com/tektoncd/catalog.git | |
- name: revision | |
value: main | |
- name: pathInRepo | |
value: task/git-clone/0.9/git-clone.yaml | |
- name: build | |
params: | |
- name: IMAGE | |
value: registry.image-registry.svc.cluster.local:5000/work/simple | |
- name: DOCKERFILE | |
value: ./Containerfile | |
- name: CONTEXT | |
value: /workspace/source/ | |
runAfter: | |
- checkout | |
workspaces: | |
- name: source | |
workspace: work | |
taskRef: | |
resolver: git | |
params: | |
- name: url | |
value: https://github.com/tektoncd/catalog.git | |
- name: revision | |
value: main | |
- name: pathInRepo | |
value: task/kaniko/0.6/kaniko.yaml | |
results: | |
- name: CHAINS-GIT_URL | |
value: $(tasks.checkout.results.url) | |
- name: CHAINS-GIT_COMMIT | |
value: $(tasks.checkout.results.commit) | |
- name: IMAGE_URL | |
value: $(tasks.build.results.IMAGE_URL) | |
- name: IMAGE_DIGEST | |
value: $(tasks.build.results.IMAGE_DIGEST) | |
workspaces: | |
- name: work |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment