Backport changes for latest drone (#2586)

This commit is contained in:
Lauris BH 2017-09-23 12:33:52 +03:00 committed by Lunny Xiao
parent 9ca26432f6
commit 1837194882

View File

@ -2,12 +2,13 @@ workspace:
base: /srv/app base: /srv/app
path: src/code.gitea.io/gitea path: src/code.gitea.io/gitea
pipeline: clone:
clone: git:
image: plugins/git image: plugins/git:1
depth: 50 depth: 50
tags: true tags: true
pipeline:
build: build:
image: webhippie/golang:edge image: webhippie/golang:edge
pull: true pull: true
@ -15,7 +16,6 @@ pipeline:
TAGS: bindata sqlite TAGS: bindata sqlite
GOPATH: /srv/app GOPATH: /srv/app
commands: commands:
- apk -U add openssh-client
- make clean - make clean
- make generate - make generate
- make vet - make vet
@ -34,35 +34,21 @@ pipeline:
TAGS: bindata sqlite TAGS: bindata sqlite
GOPATH: /srv/app GOPATH: /srv/app
commands: commands:
- apk -U add openssh-client
- make test - make test
when: when:
event: [ tag, pull_request ] event: [ tag, pull_request ]
test-coverage: # Commented until db locking have been resolved!
image: webhippie/golang:edge # test-sqlite:
pull: true # image: webhippie/golang:edge
environment: # pull: true
TAGS: bindata sqlite # environment:
GOPATH: /srv/app # TAGS: bindata
commands: # GOPATH: /srv/app
- apk -U add openssh-client # commands:
- go get github.com/wadey/gocovmerge # - make test-sqlite
- make test-coverage # when:
when: # event: [ push, tag, pull_request ]
event: [ push ]
branch: master
test-sqlite:
image: webhippie/golang:edge
pull: true
environment:
TAGS: bindata
GOPATH: /srv/app
commands:
- echo "Needs to be fixed" # make test-sqlite
when:
event: [ push, tag, pull_request ]
test-mysql: test-mysql:
image: webhippie/golang:edge image: webhippie/golang:edge
@ -97,24 +83,19 @@ pipeline:
when: when:
event: [ push, tag ] event: [ push, tag ]
# coverage:
# image: plugins/coverage
# server: https://coverage.gitea.io
# when:
# event: [ push ]
# branch: master
docker: docker:
image: plugins/docker image: plugins/docker:17.05
pull: true pull: true
secrets: [ docker_username, docker_password ]
repo: gitea/gitea repo: gitea/gitea
tags: [ '${DRONE_TAG##v}' ] tags: [ '${DRONE_TAG##v}' ]
when: when:
event: [ tag ] event: [ tag ]
docker: docker:
image: plugins/docker image: plugins/docker:17.05
pull: true pull: true
secrets: [ docker_username, docker_password ]
repo: gitea/gitea repo: gitea/gitea
tags: [ '${DRONE_BRANCH##release/v}' ] tags: [ '${DRONE_BRANCH##release/v}' ]
when: when:
@ -122,8 +103,9 @@ pipeline:
branch: [ release/* ] branch: [ release/* ]
docker: docker:
image: plugins/docker image: plugins/docker:17.05
pull: true pull: true
secrets: [ docker_username, docker_password ]
repo: gitea/gitea repo: gitea/gitea
tags: [ 'latest' ] tags: [ 'latest' ]
when: when:
@ -131,7 +113,11 @@ pipeline:
branch: [ master ] branch: [ master ]
release: release:
image: plugins/s3 image: plugins/s3:1
pull: true
secrets: [ aws_access_key_id, aws_secret_access_key ]
bucket: releases
endpoint: https://storage.gitea.io
path_style: true path_style: true
strip_prefix: dist/release/ strip_prefix: dist/release/
source: dist/release/* source: dist/release/*
@ -140,7 +126,11 @@ pipeline:
event: [ tag ] event: [ tag ]
release: release:
image: plugins/s3 image: plugins/s3:1
pull: true
secrets: [ aws_access_key_id, aws_secret_access_key ]
bucket: releases
endpoint: https://storage.gitea.io
path_style: true path_style: true
strip_prefix: dist/release/ strip_prefix: dist/release/
source: dist/release/* source: dist/release/*
@ -150,7 +140,11 @@ pipeline:
branch: [ release/* ] branch: [ release/* ]
release: release:
image: plugins/s3 image: plugins/s3:1
pull: true
secrets: [ aws_access_key_id, aws_secret_access_key ]
bucket: releases
endpoint: https://storage.gitea.io
path_style: true path_style: true
strip_prefix: dist/release/ strip_prefix: dist/release/
source: dist/release/* source: dist/release/*
@ -160,16 +154,17 @@ pipeline:
branch: [ master ] branch: [ master ]
github: github:
image: plugins/github-release image: plugins/github-release:1
pull: true
files: files:
- dist/release/* - dist/release/*
when: when:
event: [ tag ] event: [ tag ]
discord: discord:
image: appleboy/drone-discord:0.0.4 image: appleboy/drone-discord:1.0.0
webhook_id: ${WEBHOOK_ID} pull: true
webhook_token: ${WEBHOOK_TOKEN} secrets: [ discord_webhook_id, discord_webhook_token ]
when: when:
event: [ push, tag, pull_request ] event: [ push, tag, pull_request ]
status: [ changed, failure ] status: [ changed, failure ]