Fork form https://github.com/edtan/concourse-ssh-resource
A resource for running a command through SSH primarily for simple deploys based on a small alpine base image.
Add support for hostname and port variable.
Add the following to the resource_types
section of a pipeline config:
---
resource_types:
- name: concourse-ssh-resource
type: docker-image
source:
repository: edtan1/concourse-ssh-resource
---
resources:
- name: my-server-ssh
type: concourse-ssh-resource
source:
username: my-username
private_key: ((ssh-private-key))
-
username
: Required. Username. -
private_key
: Required. The private key to use - use a credentials manager for this!
This resource currently does nothing for check
.
This resource currently does nothing for in
.
Runs the command in the provided in params
. The following command will be run:
ssh -o StrictHostKeyChecking=no -o ConnectTimeout=5 -p $port -i $private_key_file $username@$hostname $command
plan:
- put: my-server-ssh
params:
hostname: my-server-hostname
command: ./deploy.sh
hostname
: Required. Server to connect to.port
: Optional. Default22
. Port.command
: Required. The command to run on the server.