This repository has been archived on 2024-09-11. You can view files and clone it, but cannot push or open issues or pull requests.
k8s-cluster-config/manifests/git_clone.yaml
2023-09-27 06:26:54 +02:00

81 lines
1.5 KiB
YAML

apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: git-clone-repo
namespace: tekton-jobs
spec:
workspaces:
- name: src
mountPath: /src
params:
- name: url
steps:
- name: Git Clone
image: alpine/git
script: |
#!/bin/bash
---
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: write
namespace: tekton-jobs
spec:
workspaces:
- name: src
mountPath: /custom/path/relative/to/root
steps:
- name: goodbye
image: ubuntu
script: |
#!/bin/bash
cat $(workspaces.src.path)/check
---
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: hello-goodbye
namespace: tekton-jobs
spec:
tasks:
- name: read
taskRef:
name: read
workspaces:
- name: src
workspace: src
- name: write
runAfter:
- read
taskRef:
name: read
workspaces:
- name: src
workspace: src
workspaces:
- name: src
---
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
name: hello-goodbye-run
namespace: tekton-jobs
spec:
pipelineRef:
name: hello-goodbye
namespace: tekton-jobs
params:
- name: username
value: "Tekton"
workspaces:
- name: src
volumeClaimTemplate:
spec:
accessModes:
- ReadWriteOnce # access mode may affect how you can use this volume in parallel tasks
resources:
requests:
storage: 1Gi