From 042c5d632cbf2779224fd077f8c67191b231d1ab Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sat, 6 May 2017 23:31:30 +0800 Subject: [PATCH] upgrade drone config (#17) * upgrade drone config Signed-off-by: Bo-Yi Wu * remove glide config Signed-off-by: Bo-Yi Wu --- .drone.yml | 40 +++++++++++++++------------------------- Makefile | 6 ------ 2 files changed, 15 insertions(+), 31 deletions(-) diff --git a/.drone.yml b/.drone.yml index 28fb2f8..e3ca283 100644 --- a/.drone.yml +++ b/.drone.yml @@ -2,27 +2,20 @@ workspace: base: /srv/app path: src/github.com/appleboy/drone-jenkins -pipeline: - clone: +clone: + git: image: plugins/git - tags: true - - # restore the cache from an sftp server - restore_cache: - image: appleboy/drone-sftp-cache - pull: true - restore: true - mount: [ .glide, vendor ] - ignore_branch: true + depth: 50 +pipeline: test: image: appleboy/golang-testing pull: true environment: TAGS: netgo GOPATH: /srv/app + secrets: [ codecov_token ] commands: - - make dep_install - make vet - make lint - make test @@ -44,37 +37,34 @@ pipeline: when: event: [ tag ] branch: [ refs/tags/* ] + local: false - docker: + publish_tag: image: plugins/docker repo: ${DRONE_REPO} tags: [ '${DRONE_TAG}' ] + secrets: [ docker_username, docker_password ] when: event: [ tag ] branch: [ refs/tags/* ] + local: false - docker: + publish_latest: image: plugins/docker repo: ${DRONE_REPO} tags: [ 'latest' ] + secrets: [ docker_username, docker_password ] when: event: [ push ] branch: [ master ] + local: false - github: + release: image: plugins/github-release + secrets: [ github_token ] files: - dist/release/* when: event: [ tag ] branch: [ refs/tags/* ] - - # rebuild the cache on the sftp server - rebuild_cache: - image: appleboy/drone-sftp-cache - pull: true - rebuild: true - mount: [ .glide, vendor ] - ignore_branch: true - when: - branch: master + local: false diff --git a/Makefile b/Makefile index 7f7abd0..9660860 100644 --- a/Makefile +++ b/Makefile @@ -57,12 +57,6 @@ test: html: go tool cover -html=coverage.txt -dep_install: - glide install - -dep_update: - glide up - install: $(SOURCES) go install -v -tags '$(TAGS)' -ldflags '$(EXTLDFLAGS)-s -w $(LDFLAGS)'