21 lines
535 B
YAML
21 lines
535 B
YAML
apiVersion: tekton.dev/v1beta1
|
|
kind: Task
|
|
metadata:
|
|
name: j7s-git-clone
|
|
spec:
|
|
workspaces:
|
|
- name: output
|
|
- name: ssh-directory
|
|
params:
|
|
- name: url
|
|
- name: branch
|
|
steps:
|
|
- image: harbor.internal.jpace121.net/gitssh:latest
|
|
script: |
|
|
set -x
|
|
cp -r $(workspaces.ssh-directory.path) ~/.ssh
|
|
chmod 700 ~/.ssh
|
|
chmod -R 400 ~/.ssh/*
|
|
ssh-keyscan -H -p 2222 git.jpace121.net >> ~/.ssh/known_hosts
|
|
|
|
git clone --single-branch --branch $(params.branch) $(params.url) $(workspaces.output.path) |