Merge pull request #96 from metalmatze/feature/drone-config

Create a first draft for .drone.yml
This commit is contained in:
Thomas Boerger 2016-11-24 21:36:47 +01:00 committed by GitHub
commit 21e8deed89
4 changed files with 153 additions and 40 deletions

140
.drone.yml Normal file

@ -0,0 +1,140 @@
workspace:
base: /srv/app
path: src/code.gitea.io/gitea
pipeline:
test:
image: webhippie/golang:${GO_VERSION}
pull: true
environment:
CGO_ENABLED: 1
TAGS: cert sqlite pam miniwinsvc
commands:
- apk -U add linux-pam-dev openssh-client
- make clean
- make vet
# - make lint
- make test
- make build
test-mysql:
image: webhippie/golang:${GO_VERSION}
pull: true
commands:
- make test-mysql
when:
event: push
test-pgsql:
image: webhippie/golang:${GO_VERSION}
pull: true
commands:
- make test-pgsql
when:
event: push
updater:
image: karalabe/xgo-latest:latest
pull: true
commands:
- make publish
when:
event: [ push, tag ]
branch: [ master, refs/tags/* ]
matrix:
GO_VERSION: 1.7
coverage:
image: plugins/coverage
server: https://coverage.gitea.io
when:
matrix:
GO_VERSION: 1.7
docker:
image: plugins/docker
repo: gitea/gitea
tags: [ '${TAG}' ]
when:
event: tag
branch: refs/tags/*
matrix:
GO_VERSION: 1.7
docker:
image: plugins/docker
repo: gitea/gitea
tags: [ 'latest' ]
when:
event: push
branch: master
matrix:
GO_VERSION: 1.7
release:
image: plugins/s3
path_style: true
source: dist/release/
target: /lgtm/master
when:
event: push
branch: master
matrix:
GO_VERSION: 1.7
release:
image: plugins/s3
path_style: true
source: dist/release/
target: /lgtm/$$TAG
when:
event: tag
branch: refs/tags/*
matrix:
GO_VERSION: 1.7
latest:
image: plugins/s3
path_style: true
source: dist/latest/
target: /lgtm/latest
when:
event: tag
branch: refs/tags/*
matrix:
GO_VERSION: 1.7
github:
image: plugins/github-release
files:
- dist/release/*
when:
event: tag
branch: refs/tags/*
matrix:
GO_VERSION: 1.7
gitter:
image: plugins/gitter
services:
mysql:
image: mysql:5.7
environment:
- MYSQL_DATABASE=test
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
when:
event: push
pgsql:
image: postgres:9.5
environment:
- POSTGRES_DB=test
when:
event: push
matrix:
GO_VERSION:
- 1.6
- 1.7

1
.drone.yml.sig Normal file

File diff suppressed because one or more lines are too long

@ -1,36 +0,0 @@
language: go
go_import_path: code.gitea.io/gitea
go:
- 1.6
- 1.7
env:
TAGS: cert sqlite pam miniwinsvc
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y libpam-dev
script:
- make clean
- make vet
# - make lint
- make test
- make build
after_success:
- bash <(curl -s https://codecov.io/bash)
notifications:
webhooks:
on_success: change
on_failure: always
on_start: never
urls:
- https://webhooks.gitter.im/e/ee6b822f3cf54c98e70c
- https://webhooks.gitter.im/e/87428658ef177ce8a7e4
- https://webhooks.gitter.im/e/a1d2b69804dfda72187e

@ -19,11 +19,11 @@ PACKAGES ?= $(shell go list ./... | grep -v /vendor/)
TAGS ?=
ifneq ($(TRAVIS_TAG),)
VERSION ?= $(TRAVIS_TAG)
ifneq ($(DRONE_TAG),)
VERSION ?= $(DRONE_TAG)
else
ifneq ($(TRAVIS_BRANCH),)
VERSION ?= $(TRAVIS_BRANCH)
ifneq ($(DRONE_BRANCH),)
VERSION ?= $(DRONE_BRANCH)
else
VERSION ?= master
endif
@ -62,6 +62,14 @@ lint:
test:
for PKG in $(PACKAGES); do go test -cover -coverprofile $$GOPATH/src/$$PKG/coverage.out $$PKG || exit 1; done;
.PHONY: test-mysql
test-mysql:
@echo "Not integrated yet!"
.PHONY: test-pgsql
test-pgsql:
@echo "Not integrated yet!"
.PHONY: check
check: test