mirror of
https://github.com/appleboy/drone-ssh.git
synced 2025-07-02 21:52:51 +08:00
refactor: add group build for drone. (#97)
* refactor: add group build for drone. * remove codecov_token Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> * fix format Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> * fix path Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
14fddbbba5
commit
e057a699a4
38
.drone.yml
38
.drone.yml
@ -9,24 +9,48 @@ clone:
|
|||||||
tags: true
|
tags: true
|
||||||
|
|
||||||
pipeline:
|
pipeline:
|
||||||
test:
|
lint:
|
||||||
image: appleboy/golang-testing
|
image: appleboy/golang-testing
|
||||||
pull: true
|
pull: true
|
||||||
|
group: golang
|
||||||
environment:
|
environment:
|
||||||
TAGS: netgo
|
TAGS: netgo
|
||||||
GOPATH: /srv/app
|
GOPATH: /srv/app
|
||||||
secrets: [ codecov_token ]
|
|
||||||
commands:
|
commands:
|
||||||
- make ssh-server
|
|
||||||
- make vet
|
- make vet
|
||||||
- make lint
|
- make lint
|
||||||
# - make test
|
|
||||||
- make test-vendor
|
- make test-vendor
|
||||||
- coverage all
|
|
||||||
- make coverage
|
build:
|
||||||
|
image: appleboy/golang-testing
|
||||||
|
pull: true
|
||||||
|
group: golang
|
||||||
|
environment:
|
||||||
|
TAGS: netgo
|
||||||
|
GOPATH: /srv/app
|
||||||
|
commands:
|
||||||
- make build
|
- make build
|
||||||
|
|
||||||
|
test:
|
||||||
|
image: appleboy/golang-testing
|
||||||
|
pull: true
|
||||||
|
group: golang
|
||||||
|
environment:
|
||||||
|
TAGS: netgo
|
||||||
|
GOPATH: /srv/app
|
||||||
|
commands:
|
||||||
|
- make ssh-server
|
||||||
|
- make test
|
||||||
|
- make coverage
|
||||||
|
|
||||||
|
codecov:
|
||||||
|
image: robertstettner/drone-codecov
|
||||||
|
secrets: [ codecov_token ]
|
||||||
|
files:
|
||||||
|
- .cover/coverage.txt
|
||||||
when:
|
when:
|
||||||
event: [ push, tag, pull_request ]
|
event: [ push, pull_request ]
|
||||||
|
status: [ success ]
|
||||||
|
|
||||||
publish_latest:
|
publish_latest:
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
|
5
Makefile
5
Makefile
@ -125,10 +125,7 @@ endif
|
|||||||
docker push $(DEPLOY_ACCOUNT)/$(DEPLOY_IMAGE):$(tag)
|
docker push $(DEPLOY_ACCOUNT)/$(DEPLOY_IMAGE):$(tag)
|
||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
sed -i '/main.go/d' .cover/coverage.txt
|
sed -i '/main.go/d' coverage.txt
|
||||||
curl -s https://codecov.io/bash > .codecov && \
|
|
||||||
chmod +x .codecov && \
|
|
||||||
./.codecov -f .cover/coverage.txt
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(GO) clean -x -i ./...
|
$(GO) clean -x -i ./...
|
||||||
|
Loading…
Reference in New Issue
Block a user