25 lines
652 B
YAML
25 lines
652 B
YAML
apiVersion: tekton.dev/v1beta1
|
|
kind: Task
|
|
metadata:
|
|
name: j7s-ros-clone
|
|
spec:
|
|
workspaces:
|
|
- name: output
|
|
- name: ssh-directory
|
|
params:
|
|
- name: url
|
|
- name: branch
|
|
- name: repos-file
|
|
steps:
|
|
- image: harbor.internal.jpace121.net/k8s/vcs: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)
|
|
cd $(workspaces.output.path)
|
|
mkdir src
|
|
vcs import src < $(params.repos-file) |