base: /srv/app
path: src/code.gitea.io/gitea
-pipeline:
- clone:
- image: plugins/git
+clone:
+ git:
+ image: plugins/git:latest
depth: 50
tags: true
+pipeline:
build:
image: webhippie/golang:edge
pull: true
TAGS: bindata sqlite
GOPATH: /srv/app
commands:
- - apk -U add openssh-client
- make clean
- make generate
- make vet
test:
image: webhippie/golang:edge
pull: true
+ group: test
environment:
TAGS: bindata sqlite
GOPATH: /srv/app
commands:
- - apk -U add openssh-client
- make test
when:
- event: [ tag, pull_request ]
+ event: [ pull_request ]
- test-coverage:
+ coverage:
image: webhippie/golang:edge
pull: true
+ group: test
environment:
TAGS: bindata sqlite
GOPATH: /srv/app
commands:
- - apk -U add openssh-client
- - go get github.com/wadey/gocovmerge
- - make test-coverage
+ - make coverage
when:
- event: [ push ]
+ event: [ push, tag ]
branch: master
test-sqlite:
image: webhippie/golang:edge
pull: true
+ group: test
environment:
TAGS: bindata
GOPATH: /srv/app
test-mysql:
image: webhippie/golang:edge
pull: true
+ group: test
environment:
TAGS: bindata
GOPATH: /srv/app
test-pgsql:
image: webhippie/golang:edge
pull: true
+ group: test
environment:
TAGS: bindata
GOPATH: /srv/app
event: [ push, tag ]
# coverage:
- # image: plugins/coverage
+ # image: plugins/coverage:latest
+ # pull: true
+ # secrets: [ github_token ]
# server: https://coverage.gitea.io
- # when:
- # event: [ push ]
- # branch: master
docker:
- image: plugins/docker
+ image: plugins/docker:latest
pull: true
+ secrets: [ docker_username, docker_password ]
repo: gitea/gitea
tags: [ '${DRONE_TAG##v}' ]
when:
branch: [ refs/tags/* ]
docker:
- image: plugins/docker
+ image: plugins/docker:latest
pull: true
+ secrets: [ docker_username, docker_password ]
repo: gitea/gitea
tags: [ '${DRONE_BRANCH##release/v}' ]
when:
branch: [ release/* ]
docker:
- image: plugins/docker
+ image: plugins/docker:latest
pull: true
+ secrets: [ docker_username, docker_password ]
repo: gitea/gitea
tags: [ 'latest' ]
when:
branch: [ master ]
release:
- image: plugins/s3
+ image: plugins/s3:latest
+ pull: true
+ secrets: [ s3_access_key, s3_secret_key ]
+ endpoint: https://storage.gitea.io
path_style: true
strip_prefix: dist/release/
source: dist/release/*
branch: [ refs/tags/* ]
release:
- image: plugins/s3
+ image: plugins/s3:latest
+ pull: true
+ secrets: [ s3_access_key, s3_secret_key ]
+ endpoint: https://storage.gitea.io
path_style: true
strip_prefix: dist/release/
source: dist/release/*
branch: [ release/* ]
release:
- image: plugins/s3
+ image: plugins/s3:latest
+ pull: true
+ secrets: [ s3_access_key, s3_secret_key ]
+ endpoint: https://storage.gitea.io
path_style: true
strip_prefix: dist/release/
source: dist/release/*
branch: [ master ]
github:
- image: plugins/github-release
+ image: plugins/github-release:latest
+ pull: true
files:
- dist/release/*
when:
branch: [ refs/tags/* ]
discord:
- image: appleboy/drone-discord:0.0.4
- webhook_id: ${WEBHOOK_ID}
- webhook_token: ${WEBHOOK_TOKEN}
+ image: appleboy/drone-discord:latest
+ pull: true
+ secrets: [ discord_webhook_id, discord_webhook_token ]
when:
event: [ push, tag, pull_request ]
status: [ changed, failure ]