1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-21 05:55:35 +00:00
catalog/task/remote-scp/0.1/remote-scp.yaml
BoyChai 2552043d66 Add remote-scp new task
feat: update minVersion

Add remote-scp new task
2024-05-27 16:38:41 +01:00

46 lines
1.4 KiB
YAML

apiVersion: tekton.dev/v1
kind: Task
metadata:
name: remote-scp
labels:
app.kubernetes.io/version: "0.1"
annotations:
tekton.dev/pipelines.minVersion: "0.50.0"
tekton.dev/categories: Developer Tools
tekton.dev/tags: scp,remote
tekton.dev/displayName: "scp remote"
tekton.dev/platforms: "linux/amd64"
spec:
description: >-
The following tasks can be used to remotely upload files.
workspaces:
- name: credentials
description: >-
SSH private key
- name: storage
description: >-
External storage
params:
- name: HOST
type: string
description: Remote host to connect
- name: USERNAME
type: string
description: SSH username
- name: PORT
type: string
description: SSH port, default is 22
default: "22"
- name: TO_PATH
type: string
description: upload to path
- name: LOCAL_PATH
type: string
description: local path
steps:
- name: put
image: docker.io/appleboy/drone-scp:1.6.14@sha256:0e0597678b948b0aa09888c66ac75af904cce81baf6af955208527d259c61818
script: |
cd "$(workspaces.storage.path)" || exit
drone-scp --host "$(params.HOST)" --port "$(params.PORT)" --username "$(params.USERNAME)" --key-path "$(workspaces.credentials.path)/id_rsa" --target "$(params.TO_PATH)" --source "$(params.LOCAL_PATH)"