mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-08-28 13:31:30 +02:00
Merge pull request #96 from metalmatze/feature/drone-config
Create a first draft for .drone.yml
This commit is contained in:
commit
21e8deed89
4 changed files with 153 additions and 40 deletions
140
.drone.yml
Normal file
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
1
.drone.yml.sig
Normal file
|
@ -0,0 +1 @@
|
|||
eyJhbGciOiJIUzI1NiJ9.d29ya3NwYWNlOgogIGJhc2U6IC9zcnYvYXBwCiAgcGF0aDogc3JjL2NvZGUuZ2l0ZWEuaW8vZ2l0ZWEKCnBpcGVsaW5lOgogIHRlc3Q6CiAgICBpbWFnZTogd2ViaGlwcGllL2dvbGFuZ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zb3VyY2U6IGRpc3QvbGF0ZXN0LwogICAgdGFyZ2V0OiAvbGd0bS9sYXRlc3QKICAgIHdoZW46CiAgICAgIGV2ZW50OiB0YWcKICAgICAgYnJhbmNoOiByZWZzL3RhZ3MvKgogICAgICBtYXRyaXg6CiAgICAgICAgR09fVkVSU0lPTjogMS43CgogIGdpdGh1YjoKICAgIGltYWdlOiBwbHVnaW5zL2dpdGh1Yi1yZWxlYXNlCiAgICBmaWxlczoKICAgICAgLSBkaXN0L3JlbGVhc2UvKgogICAgd2hlbjoKICAgICAgZXZlbnQ6IHRhZwogICAgICBicmFuY2g6IHJlZnMvdGFncy8qCiAgICAgIG1hdHJpeDoKICAgICAgICBHT19WRVJTSU9OOiAxLjcKCiAgZ2l0dGVyOgogICAgaW1hZ2U6IHBsdWdpbnMvZ2l0dGVyCgpzZXJ2aWNlczoKICBteXNxbDoKICAgIGltYWdlOiBteXNxbDo1LjcKICAgIGVudmlyb25tZW50OgogICAgICAtIE1ZU1FMX0RBVEFCQVNFPXRlc3QKICAgICAgLSBNWVNRTF9BTExPV19FTVBUWV9QQVNTV09SRD15ZXMKICAgIHdoZW46CiAgICAgIGV2ZW50OiBwdXNoCgogIHBnc3FsOgogICAgaW1hZ2U6IHBvc3RncmVzOjkuNQogICAgZW52aXJvbm1lbnQ6CiAgICAgIC0gUE9TVEdSRVNfREI9dGVzdAogICAgd2hlbjoKICAgICAgZXZlbnQ6IHB1c2gKCm1hdHJpeDoKICBHT19WRVJTSU9OOgogICAgLSAxLjYKICAgIC0gMS43Cg.oE18Ibc0sX6XpnJXhtJvch7hW9cJNXCeGu7O59UW5-w
|
36
.travis.yml
36
.travis.yml
|
@ -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
|
16
Makefile
16
Makefile
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue