Improve layout.

This commit is contained in:
James Pace 2022-08-26 22:08:39 -04:00
parent 1399f382b1
commit d63cbd3327
3 changed files with 23 additions and 17 deletions

View File

@ -1,7 +1,7 @@
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: cat-git-repo
name: git-pipeline
spec:
description: A test pipeline.
params:
@ -23,20 +23,8 @@ spec:
params:
- name: url
value: $(params.repo-url)
taskSpec:
workspaces:
- name: output
- name: ssh-directory
params:
- name: url
steps:
- image: 192.168.1.128:8443/gitssh:latest
script: |
set -x
cp -r $(workspaces.ssh-directory.path) ~/.ssh
chmod 700 ~/.ssh
chmod -R 400 ~/.ssh/*
git clone $(params.url) $(workspaces.output.path)
taskRef:
name: j7s-git-clone
- name: cat-readme
runAfter: ["fetch-repo"]

View File

@ -1,10 +1,10 @@
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
name: with-custom-container-2
name: with-good-layout
spec:
pipelineRef:
name: cat-git-repo
name: git-pipeline
workspaces:
- name: shared-data
volumeClaimTemplate:

18
tasks/j7s-git-clone.yaml Normal file
View File

@ -0,0 +1,18 @@
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: j7s-git-clone
spec:
workspaces:
- name: output
- name: ssh-directory
params:
- name: url
steps:
- image: 192.168.1.128:8443/gitssh:latest
script: |
set -x
cp -r $(workspaces.ssh-directory.path) ~/.ssh
chmod 700 ~/.ssh
chmod -R 400 ~/.ssh/*
git clone $(params.url) $(workspaces.output.path)