--wip-- [skip ci]
This commit is contained in:
parent
4fe0c0b1a0
commit
94b8589b7c
13
kustomization.yaml
Normal file
13
kustomization.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- https://storage.googleapis.com/tekton-releases/operator/latest/release.yaml
|
||||
- https://raw.githubusercontent.com/tektoncd/operator/main/config/crs/kubernetes/config/all/operator_v1alpha1_config_cr.yaml
|
||||
# Catalog
|
||||
- https://raw.githubusercontent.com/tektoncd/catalog/main/task/git-clone/0.6/git-clone.yaml
|
||||
|
||||
secretGenerator:
|
||||
- name: git-credentials
|
||||
envs:
|
||||
- secrets/gitcred.txt
|
33
resources/pipeline/test-clone.yaml
Normal file
33
resources/pipeline/test-clone.yaml
Normal file
@ -0,0 +1,33 @@
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
kind: Pipeline
|
||||
metadata:
|
||||
name: test-clone
|
||||
spec:
|
||||
description: |
|
||||
This pipeline clones a git repo, then echoes the README file to the stdout.
|
||||
params:
|
||||
- name: repo-url
|
||||
type: string
|
||||
description: The git repo URL to clone from.
|
||||
workspaces:
|
||||
- name: shared-data
|
||||
description: |
|
||||
This workspace contains the cloned repo files, so they can be read by the
|
||||
next task.
|
||||
tasks:
|
||||
- name: git-clone
|
||||
taskRef:
|
||||
name: git-clone
|
||||
workspaces:
|
||||
- name: output
|
||||
workspace: shared-data
|
||||
params:
|
||||
- name: url
|
||||
value: $(params.repo-url)
|
||||
- name: show-readme
|
||||
runAfter: ["git-clone"]
|
||||
taskRef:
|
||||
name: show-readme
|
||||
workspace:
|
||||
- name: source
|
||||
workspace: shared-data
|
24
resources/pipelinerun/test-clone-run.yaml
Normal file
24
resources/pipelinerun/test-clone-run.yaml
Normal file
@ -0,0 +1,24 @@
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
kind: PipelineRun
|
||||
metadata:
|
||||
generateName: test-clone-run-
|
||||
|
||||
spec:
|
||||
pipelineRef:
|
||||
name: test-clone
|
||||
podTemplate:
|
||||
securityContext:
|
||||
fsGroup: 65532
|
||||
workspaces:
|
||||
- name: shared-data
|
||||
volumeClaimTemplate:
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
- name: git-credentials
|
||||
params:
|
||||
- name: repo-url
|
||||
value: https://forge.cadoles.com/CNOUS/mse.git
|
14
resources/task/common/show-readme.yaml
Normal file
14
resources/task/common/show-readme.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
kind: Task
|
||||
metadata:
|
||||
name: show-readme
|
||||
spec:
|
||||
description: Read and display README file.
|
||||
workspaces:
|
||||
- name: source
|
||||
steps:
|
||||
- name: read
|
||||
image: alpine:latest
|
||||
script: |
|
||||
#!/usr/bin/env sh
|
||||
cat $(workspaces.source.path)/README.md
|
1
secrets/.gitignore
vendored
Normal file
1
secrets/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/gitcred.txt
|
3
secrets/gitcred.txt.dist
Normal file
3
secrets/gitcred.txt.dist
Normal file
@ -0,0 +1,3 @@
|
||||
id_rsa=
|
||||
known_hosts=
|
||||
config=
|
Loading…
x
Reference in New Issue
Block a user