Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 40 additions & 39 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ workspace:
base: /srv/app
path: src/code.gitea.io/gitea

pipeline:
clone:
image: plugins/git
clone:
git:
image: plugins/git:1
depth: 50
tags: true

pipeline:
build:
image: webhippie/golang:edge
pull: true
environment:
TAGS: bindata sqlite
GOPATH: /srv/app
commands:
- apk -U add openssh-client
- make clean
- make generate
- make vet
Expand All @@ -30,43 +30,31 @@ pipeline:
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 ]

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
- make coverage
when:
event: [ push ]
branch: master
event: [ push, tag, pull_request ]

test-sqlite:
image: webhippie/golang:edge
pull: true
group: test
environment:
TAGS: bindata
GOPATH: /srv/app
commands:
- echo "Needs to be fixed" # make test-sqlite
- make test-sqlite
when:
event: [ push, tag, pull_request ]

test-mysql:
image: webhippie/golang:edge
pull: true
group: test
environment:
TAGS: bindata
GOPATH: /srv/app
Expand All @@ -78,6 +66,7 @@ pipeline:
test-pgsql:
image: webhippie/golang:edge
pull: true
group: test
environment:
TAGS: bindata
GOPATH: /srv/app
Expand All @@ -86,6 +75,12 @@ pipeline:
when:
event: [ push, tag, pull_request ]

# coverage:
# image: plugins/coverage:latest
# pull: true
# secrets: [ github_token ]
# server: https://coverage.gitea.io

static:
image: karalabe/xgo-latest:latest
pull: true
Expand All @@ -97,42 +92,41 @@ 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 ]
branch: [ refs/tags/* ]

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:
event: [ push ]
branch: [ release/* ]

docker:
image: plugins/docker
image: plugins/docker:17.05
pull: true
secrets: [ docker_username, docker_password ]
repo: gitea/gitea
tags: [ 'latest' ]
when:
event: [ push ]
branch: [ master ]

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
strip_prefix: dist/release/
source: dist/release/*
Expand All @@ -142,7 +136,10 @@ pipeline:
branch: [ refs/tags/* ]

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
strip_prefix: dist/release/
source: dist/release/*
Expand All @@ -152,7 +149,10 @@ pipeline:
branch: [ 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
strip_prefix: dist/release/
source: dist/release/*
Expand All @@ -162,17 +162,18 @@ pipeline:
branch: [ master ]

github:
image: plugins/github-release
image: plugins/github-release:1
pull: true
files:
- dist/release/*
when:
event: [ tag ]
branch: [ refs/tags/* ]

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 ]
Expand Down
1 change: 0 additions & 1 deletion .drone.yml.sig

This file was deleted.

4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ fmt-check: required-gofmt-version
test: fmt-check
$(GO) test $(PACKAGES)

.PHONY: test-coverage
test-coverage: unit-test-coverage integration-test-coverage
.PHONY: coverage
coverage: unit-test-coverage integration-test-coverage
@hash gocovmerge > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GO) get -u github.com/wadey/gocovmerge; \
fi
Expand Down