Changes for latest DroneCI (#2362)

release/v1.3
Thomas Boerger 7 years ago committed by GitHub
parent 95c408ffa5
commit 4b8fef143e

@ -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
@ -30,43 +30,31 @@ pipeline:
test: test:
image: webhippie/golang:edge image: webhippie/golang:edge
pull: true pull: true
group: test
environment: environment:
TAGS: bindata sqlite TAGS: bindata sqlite
GOPATH: /srv/app GOPATH: /srv/app
commands: commands:
- apk -U add openssh-client - make coverage
- 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: when:
event: [ push ] event: [ push, tag, pull_request ]
branch: master
test-sqlite: test-sqlite:
image: webhippie/golang:edge image: webhippie/golang:edge
pull: true pull: true
group: test
environment: environment:
TAGS: bindata TAGS: bindata
GOPATH: /srv/app GOPATH: /srv/app
commands: commands:
- echo "Needs to be fixed" # make test-sqlite - make test-sqlite
when: when:
event: [ push, tag, pull_request ] event: [ push, tag, pull_request ]
test-mysql: test-mysql:
image: webhippie/golang:edge image: webhippie/golang:edge
pull: true pull: true
group: test
environment: environment:
TAGS: bindata TAGS: bindata
GOPATH: /srv/app GOPATH: /srv/app
@ -78,6 +66,7 @@ pipeline:
test-pgsql: test-pgsql:
image: webhippie/golang:edge image: webhippie/golang:edge
pull: true pull: true
group: test
environment: environment:
TAGS: bindata TAGS: bindata
GOPATH: /srv/app GOPATH: /srv/app
@ -86,6 +75,12 @@ pipeline:
when: when:
event: [ push, tag, pull_request ] event: [ push, tag, pull_request ]
# coverage:
# image: plugins/coverage:latest
# pull: true
# secrets: [ github_token ]
# server: https://coverage.gitea.io
static: static:
image: karalabe/xgo-latest:latest image: karalabe/xgo-latest:latest
pull: true pull: true
@ -97,16 +92,10 @@ 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:
@ -114,8 +103,9 @@ pipeline:
branch: [ refs/tags/* ] branch: [ refs/tags/* ]
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:
@ -123,8 +113,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:
@ -132,7 +123,10 @@ pipeline:
branch: [ master ] branch: [ master ]
release: release:
image: plugins/s3 image: plugins/s3:1
pull: true
secrets: [ s3_access_key, s3_secret_key ]
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/*
@ -142,7 +136,10 @@ pipeline:
branch: [ refs/tags/* ] branch: [ refs/tags/* ]
release: release:
image: plugins/s3 image: plugins/s3:1
pull: true
secrets: [ s3_access_key, s3_secret_key ]
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/*
@ -152,7 +149,10 @@ pipeline:
branch: [ release/* ] branch: [ release/* ]
release: release:
image: plugins/s3 image: plugins/s3:1
pull: true
secrets: [ s3_access_key, s3_secret_key ]
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/*
@ -162,7 +162,8 @@ 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:
@ -170,9 +171,9 @@ pipeline:
branch: [ refs/tags/* ] branch: [ refs/tags/* ]
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 ]

File diff suppressed because one or more lines are too long

@ -125,8 +125,8 @@ fmt-check: required-gofmt-version
test: fmt-check test: fmt-check
$(GO) test $(PACKAGES) $(GO) test $(PACKAGES)
.PHONY: test-coverage .PHONY: coverage
test-coverage: unit-test-coverage integration-test-coverage coverage: unit-test-coverage integration-test-coverage
@hash gocovmerge > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ @hash gocovmerge > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GO) get -u github.com/wadey/gocovmerge; \ $(GO) get -u github.com/wadey/gocovmerge; \
fi fi

Loading…
Cancel
Save