Backport changes for latest drone (#2586)
This commit is contained in:
parent
9ca26432f6
commit
1837194882
85
.drone.yml
85
.drone.yml
|
@ -2,12 +2,13 @@ workspace:
|
|||
base: /srv/app
|
||||
path: src/code.gitea.io/gitea
|
||||
|
||||
pipeline:
|
||||
clone:
|
||||
image: plugins/git
|
||||
git:
|
||||
image: plugins/git:1
|
||||
depth: 50
|
||||
tags: true
|
||||
|
||||
pipeline:
|
||||
build:
|
||||
image: webhippie/golang:edge
|
||||
pull: true
|
||||
|
@ -15,7 +16,6 @@ pipeline:
|
|||
TAGS: bindata sqlite
|
||||
GOPATH: /srv/app
|
||||
commands:
|
||||
- apk -U add openssh-client
|
||||
- make clean
|
||||
- make generate
|
||||
- make vet
|
||||
|
@ -34,35 +34,21 @@ pipeline:
|
|||
TAGS: bindata sqlite
|
||||
GOPATH: /srv/app
|
||||
commands:
|
||||
- apk -U add openssh-client
|
||||
- make test
|
||||
when:
|
||||
event: [ tag, pull_request ]
|
||||
|
||||
test-coverage:
|
||||
image: webhippie/golang:edge
|
||||
pull: true
|
||||
environment:
|
||||
TAGS: bindata sqlite
|
||||
GOPATH: /srv/app
|
||||
commands:
|
||||
- apk -U add openssh-client
|
||||
- go get github.com/wadey/gocovmerge
|
||||
- make test-coverage
|
||||
when:
|
||||
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 ]
|
||||
# Commented until db locking have been resolved!
|
||||
# test-sqlite:
|
||||
# image: webhippie/golang:edge
|
||||
# pull: true
|
||||
# environment:
|
||||
# TAGS: bindata
|
||||
# GOPATH: /srv/app
|
||||
# commands:
|
||||
# - make test-sqlite
|
||||
# when:
|
||||
# event: [ push, tag, pull_request ]
|
||||
|
||||
test-mysql:
|
||||
image: webhippie/golang:edge
|
||||
|
@ -97,24 +83,19 @@ pipeline:
|
|||
when:
|
||||
event: [ push, tag ]
|
||||
|
||||
# coverage:
|
||||
# image: plugins/coverage
|
||||
# server: https://coverage.gitea.io
|
||||
# when:
|
||||
# event: [ push ]
|
||||
# branch: master
|
||||
|
||||
docker:
|
||||
image: plugins/docker
|
||||
image: plugins/docker:17.05
|
||||
pull: true
|
||||
secrets: [ docker_username, docker_password ]
|
||||
repo: gitea/gitea
|
||||
tags: [ '${DRONE_TAG##v}' ]
|
||||
when:
|
||||
event: [ tag ]
|
||||
|
||||
docker:
|
||||
image: plugins/docker
|
||||
image: plugins/docker:17.05
|
||||
pull: true
|
||||
secrets: [ docker_username, docker_password ]
|
||||
repo: gitea/gitea
|
||||
tags: [ '${DRONE_BRANCH##release/v}' ]
|
||||
when:
|
||||
|
@ -122,8 +103,9 @@ pipeline:
|
|||
branch: [ release/* ]
|
||||
|
||||
docker:
|
||||
image: plugins/docker
|
||||
image: plugins/docker:17.05
|
||||
pull: true
|
||||
secrets: [ docker_username, docker_password ]
|
||||
repo: gitea/gitea
|
||||
tags: [ 'latest' ]
|
||||
when:
|
||||
|
@ -131,7 +113,11 @@ pipeline:
|
|||
branch: [ master ]
|
||||
|
||||
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
|
||||
strip_prefix: dist/release/
|
||||
source: dist/release/*
|
||||
|
@ -140,7 +126,11 @@ pipeline:
|
|||
event: [ tag ]
|
||||
|
||||
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
|
||||
strip_prefix: dist/release/
|
||||
source: dist/release/*
|
||||
|
@ -150,7 +140,11 @@ pipeline:
|
|||
branch: [ 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
|
||||
strip_prefix: dist/release/
|
||||
source: dist/release/*
|
||||
|
@ -160,16 +154,17 @@ pipeline:
|
|||
branch: [ master ]
|
||||
|
||||
github:
|
||||
image: plugins/github-release
|
||||
image: plugins/github-release:1
|
||||
pull: true
|
||||
files:
|
||||
- dist/release/*
|
||||
when:
|
||||
event: [ tag ]
|
||||
|
||||
discord:
|
||||
image: appleboy/drone-discord:0.0.4
|
||||
webhook_id: ${WEBHOOK_ID}
|
||||
webhook_token: ${WEBHOOK_TOKEN}
|
||||
image: appleboy/drone-discord:1.0.0
|
||||
pull: true
|
||||
secrets: [ discord_webhook_id, discord_webhook_token ]
|
||||
when:
|
||||
event: [ push, tag, pull_request ]
|
||||
status: [ changed, failure ]
|
||||
|
|
Loading…
Reference in New Issue
Block a user