23 lines
569 B
YAML
23 lines
569 B
YAML
apiVersion: tekton.dev/v1beta1
|
|
kind: Task
|
|
metadata:
|
|
name: j7s-git-clone
|
|
spec:
|
|
workspaces:
|
|
- name: output
|
|
- name: ssh-directory
|
|
params:
|
|
- name: url
|
|
- name: commit
|
|
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)
|
|
cd $(workspaces.output.path)
|
|
git fetch origin $(params.commit)
|
|
git checkout -f $(params.commit) -b pr-check
|
|
git rebase origin/main |