用作 cicd/ssh-action 仓库基础组件
Go to file
2016-01-01 21:35:10 +01:00
.drone.sec initial commit for ssh plugin 2015-10-21 12:34:42 -07:00
.drone.yml Use new make tasks within drone config 2016-01-01 21:32:59 +01:00
.gitignore Added empty line at the end of gitignore 2016-01-01 21:33:20 +01:00
Dockerfile Updated dockerfile to latest alpine image and updated docs 2016-01-01 21:34:17 +01:00
DOCS.md add sleep option 2015-10-30 11:21:11 -07:00
LICENSE Initial commit 2015-10-20 11:05:53 -07:00
logo.svg initial commit for ssh plugin 2015-10-21 12:34:42 -07:00
main_test.go fixed unit test 2015-10-30 11:12:29 -07:00
main.go print error when running command, fix default port comment 2015-11-10 17:52:52 -08:00
MAINTAINERS Updated MAINTAINERS file [CI SKIP] 2015-12-09 14:19:04 -08:00
Makefile Added makefile 2016-01-01 21:32:30 +01:00
README.md Added useful content to readme 2016-01-01 21:34:37 +01:00
types.go Use the drone-go StringSlice instead of custom implementation 2016-01-01 21:35:10 +01:00

drone-ssh

Build Status

Drone plugin for executing commands on a remote host through SSH

Usage

./drone-ssh <<EOF
{
    "repo" : {
        "owner": "foo",
        "name": "bar",
        "full_name": "foo/bar"
    },
    "build" : {
        "number": 22,
        "status": "success",
        "started_at": 1421029603,
        "finished_at": 1421029813,
        "commit": "9f2849d5",
        "branch": "master",
        "message": "Update the Readme",
        "author": "johnsmith",
        "author_email": "john.smith@gmail.com"
    },
    "vargs": {
        "host": "foo.com",
        "user": "root",
        "port": 22,
        "commands": [
            "echo hello",
            "echo world"
        ]
    }
}
EOF

Docker

Build the Docker container using make:

make deps build docker

Example

docker run -i plugins/drone-ssh <<EOF
{
    "repo" : {
        "owner": "foo",
        "name": "bar",
        "full_name": "foo/bar"
    },
    "build" : {
        "number": 22,
        "status": "success",
        "started_at": 1421029603,
        "finished_at": 1421029813,
        "commit": "9f2849d5",
        "branch": "master",
        "message": "Update the Readme",
        "author": "johnsmith",
        "author_email": "john.smith@gmail.com"
    },
    "vargs": {
        "host": "foo.com",
        "user": "root",
        "port": 22,
        "commands": [
            "echo hello",
            "echo world"
        ]
    }
}
EOF