diff --git a/Dockerfile b/Dockerfile index e672e29..9908c35 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM centurylink/ca-certs -ADD drone-sftp / +ADD drone-scp / -ENTRYPOINT ["/drone-sftp"] +ENTRYPOINT ["/drone-scp"] diff --git a/Dockerfile.armhf b/Dockerfile.armhf index bf340e8..8ddfcb2 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -4,5 +4,5 @@ RUN apk update && \ apk add ca-certificates && \ rm -rf /var/cache/apk/* -ADD drone-sftp /bin/ -ENTRYPOINT ["/bin/drone-sftp"] +ADD drone-scp /bin/ +ENTRYPOINT ["/bin/drone-scp"] diff --git a/Makefile b/Makefile index 3b74c18..3e9c3f2 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ VERSION := $(shell git describe --tags || git rev-parse --short HEAD) DEPLOY_ACCOUNT := "appleboy" -DEPLOY_IMAGE := "drone-sftp" +DEPLOY_IMAGE := "drone-scp" ifneq ($(shell uname), Darwin) EXTLDFLAGS = -extldflags "-static" $(null) diff --git a/README.md b/README.md index 086c861..6987b89 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# drone-sftp +# drone-scp -[![Build Status](https://travis-ci.org/appleboy/drone-sftp.svg?branch=master)](https://travis-ci.org/appleboy/drone-sftp) [![codecov](https://codecov.io/gh/appleboy/drone-sftp/branch/master/graph/badge.svg)](https://codecov.io/gh/appleboy/drone-sftp) [![Go Report Card](https://goreportcard.com/badge/github.com/appleboy/drone-sftp)](https://goreportcard.com/report/github.com/appleboy/drone-sftp) +[![Build Status](https://travis-ci.org/appleboy/drone-scp.svg?branch=master)](https://travis-ci.org/appleboy/drone-scp) [![codecov](https://codecov.io/gh/appleboy/drone-scp/branch/master/graph/badge.svg)](https://codecov.io/gh/appleboy/drone-scp) [![Go Report Card](https://goreportcard.com/badge/github.com/appleboy/drone-scp)](https://goreportcard.com/report/github.com/appleboy/drone-scp) [Drone](https://github.com/drone/drone) plugin to publish files and artifacts via SFTP. @@ -33,7 +33,7 @@ GCO disabled will result in an error when running the Docker image: ``` docker: Error response from daemon: Container command -'/bin/drone-sftp' not found or does not exist.. +'/bin/drone-scp' not found or does not exist.. ``` ## Usage @@ -56,5 +56,5 @@ docker run --rm \ -e DRONE_BUILD_LINK=http://github.com/appleboy/go-hello \ -v $(pwd):$(pwd) \ -w $(pwd) \ - appleboy/drone-sftp + appleboy/drone-scp ``` diff --git a/main.go b/main.go index dfe7dc0..f065750 100644 --- a/main.go +++ b/main.go @@ -20,23 +20,23 @@ func main() { cli.StringFlag{ Name: "host", Usage: "Server host", - EnvVar: "PLUGIN_HOST,SFTP_HOST", + EnvVar: "PLUGIN_HOST,SCP_HOST", }, cli.StringFlag{ Name: "port", Value: "22", Usage: "Server port, default to 22", - EnvVar: "PLUGIN_PORT,SFTP_PORT", + EnvVar: "PLUGIN_PORT,SCP_PORT", }, cli.StringFlag{ Name: "username", Usage: "Server username", - EnvVar: "PLUGIN_USERNAME,SFTP_USERNAME", + EnvVar: "PLUGIN_USERNAME,SCP_USERNAME", }, cli.StringFlag{ Name: "password", Usage: "Password for password-based authentication", - EnvVar: "PLUGIN_PASSWORD,SFTP_PASSWORD", + EnvVar: "PLUGIN_PASSWORD,SCP_PASSWORD", }, cli.StringFlag{ Name: "path", @@ -46,7 +46,7 @@ func main() { }, cli.StringSliceFlag{ Name: "files", - Usage: "sftp files list", + Usage: "scp file list", EnvVar: "PLUGIN_FILE", }, cli.StringFlag{ diff --git a/plugin.go b/plugin.go index d637a0f..8f7e4ba 100644 --- a/plugin.go +++ b/plugin.go @@ -61,9 +61,9 @@ func trimElement(keys []string) []string { func (p Plugin) Exec() error { if len(p.Config.Host) == 0 || len(p.Config.Username) == 0 || len(p.Config.Password) == 0 { - log.Println("missing sftp config") + log.Println("missing ssh config") - return errors.New("missing sftp config") + return errors.New("missing ssh config") } return nil