Skip to content

Revert "Changes for latest DroneCI (#2355)" #2358

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 25 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

clone:
git:
image: plugins/git:latest
pipeline:
clone:
image: plugins/git
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,32 +30,32 @@ 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: [ pull_request ]
event: [ tag, pull_request ]

coverage:
test-coverage:
image: webhippie/golang:edge
pull: true
group: test
environment:
TAGS: bindata sqlite
GOPATH: /srv/app
commands:
- make coverage
- apk -U add openssh-client
- go get github.com/wadey/gocovmerge
- make test-coverage
when:
event: [ push, tag ]
event: [ push ]
branch: master

test-sqlite:
image: webhippie/golang:edge
pull: true
group: test
environment:
TAGS: bindata
GOPATH: /srv/app
Expand All @@ -67,7 +67,6 @@ pipeline:
test-mysql:
image: webhippie/golang:edge
pull: true
group: test
environment:
TAGS: bindata
GOPATH: /srv/app
Expand All @@ -79,7 +78,6 @@ pipeline:
test-pgsql:
image: webhippie/golang:edge
pull: true
group: test
environment:
TAGS: bindata
GOPATH: /srv/app
Expand All @@ -100,46 +98,41 @@ pipeline:
event: [ push, tag ]

# coverage:
# image: plugins/coverage:latest
# pull: true
# secrets: [ github_token ]
# image: plugins/coverage
# server: https://coverage.gitea.io
# when:
# event: [ push ]
# branch: master

docker:
image: plugins/docker:latest
image: plugins/docker
pull: true
secrets: [ docker_username, docker_password ]
repo: gitea/gitea
tags: [ '${DRONE_TAG##v}' ]
when:
event: [ tag ]
branch: [ refs/tags/* ]

docker:
image: plugins/docker:latest
image: plugins/docker
pull: true
secrets: [ docker_username, docker_password ]
repo: gitea/gitea
tags: [ '${DRONE_BRANCH##release/v}' ]
when:
event: [ push ]
branch: [ release/* ]

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

release:
image: plugins/s3:latest
pull: true
secrets: [ s3_access_key, s3_secret_key ]
endpoint: https://storage.gitea.io
image: plugins/s3
path_style: true
strip_prefix: dist/release/
source: dist/release/*
Expand All @@ -149,10 +142,7 @@ pipeline:
branch: [ refs/tags/* ]

release:
image: plugins/s3:latest
pull: true
secrets: [ s3_access_key, s3_secret_key ]
endpoint: https://storage.gitea.io
image: plugins/s3
path_style: true
strip_prefix: dist/release/
source: dist/release/*
Expand All @@ -162,10 +152,7 @@ pipeline:
branch: [ release/* ]

release:
image: plugins/s3:latest
pull: true
secrets: [ s3_access_key, s3_secret_key ]
endpoint: https://storage.gitea.io
image: plugins/s3
path_style: true
strip_prefix: dist/release/
source: dist/release/*
Expand All @@ -175,18 +162,17 @@ pipeline:
branch: [ master ]

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

discord:
image: appleboy/drone-discord:latest
pull: true
secrets: [ discord_webhook_id, discord_webhook_token ]
image: appleboy/drone-discord:0.0.4
webhook_id: ${WEBHOOK_ID}
webhook_token: ${WEBHOOK_TOKEN}
when:
event: [ push, tag, pull_request ]
status: [ changed, failure ]
Expand Down
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: coverage
coverage: unit-test-coverage integration-test-coverage
.PHONY: test-coverage
test-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