mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-15 14:34:26 +00:00
d15c642f91
* release cli images * update docs Co-authored-by: 6543 <6543@obermui.de>
227 lines
5.4 KiB
YAML
227 lines
5.4 KiB
YAML
clone:
|
|
git:
|
|
image: plugins/git:next
|
|
|
|
pipeline:
|
|
test:
|
|
image: golang:1.16
|
|
group: test
|
|
commands:
|
|
- make test
|
|
- make vet
|
|
- make formatcheck
|
|
|
|
test-frontend:
|
|
image: node:10.17.0-stretch
|
|
group: test
|
|
commands:
|
|
- (cd web/; yarn install)
|
|
- (cd web/; yarn run lesshint)
|
|
- (cd web/; yarn run lint --quiet)
|
|
- make test-frontend
|
|
|
|
test-postgres:
|
|
image: golang:1.16
|
|
group: db-test
|
|
environment:
|
|
- WOODPECKER_DATABASE_DRIVER=postgres
|
|
- WOODPECKER_DATABASE_CONFIG=host=postgres user=postgres dbname=postgres sslmode=disable
|
|
commands:
|
|
- go test -timeout 30s github.com/woodpecker-ci/woodpecker/server/store/datastore
|
|
|
|
test-mysql:
|
|
image: golang:1.16
|
|
group: db-test
|
|
environment:
|
|
- WOODPECKER_DATABASE_DRIVER=mysql
|
|
- WOODPECKER_DATABASE_CONFIG=root@tcp(mysql:3306)/test?parseTime=true
|
|
commands:
|
|
- go test -timeout 30s github.com/woodpecker-ci/woodpecker/server/store/datastore
|
|
|
|
build-frontend:
|
|
image: node:10.17.0-stretch
|
|
commands:
|
|
- make release-frontend
|
|
|
|
build-server:
|
|
group: build
|
|
image: golang:1.16
|
|
commands:
|
|
- make release-server
|
|
|
|
build-agent:
|
|
group: build
|
|
image: golang:1.16
|
|
commands:
|
|
- make release-agent
|
|
|
|
build-cli:
|
|
group: build
|
|
image: golang:1.16
|
|
commands:
|
|
- make release-cli
|
|
|
|
publish-server:
|
|
group: docker
|
|
image: plugins/docker
|
|
repo: woodpeckerci/woodpecker-server
|
|
dockerfile: docker/Dockerfile.server
|
|
secrets: [docker_username, docker_password]
|
|
# TODO: only release as next after 0.15.0 got released
|
|
tag: [next, latest]
|
|
when:
|
|
branch: master
|
|
event: push
|
|
|
|
publish-server-alpine:
|
|
group: docker
|
|
image: plugins/docker
|
|
repo: woodpeckerci/woodpecker-server
|
|
dockerfile: docker/Dockerfile.server.alpine
|
|
secrets: [ docker_username, docker_password ]
|
|
# TODO: only release as next-alpine after 0.15.0 got released
|
|
tag: [next-alpine, latest-alpine]
|
|
when:
|
|
branch: master
|
|
event: push
|
|
|
|
publish-agent:
|
|
group: docker
|
|
image: plugins/docker
|
|
repo: woodpeckerci/woodpecker-agent
|
|
dockerfile: docker/Dockerfile.agent
|
|
secrets: [docker_username, docker_password]
|
|
# TODO: only release as next after 0.15.0 got released
|
|
tag: [next, latest]
|
|
when:
|
|
branch: master
|
|
event: push
|
|
|
|
publish-agent-alpine:
|
|
group: docker
|
|
image: plugins/docker
|
|
repo: woodpeckerci/woodpecker-agent
|
|
dockerfile: docker/Dockerfile.agent.alpine
|
|
secrets: [ docker_username, docker_password ]
|
|
# TODO: only release as next-alpine after 0.15.0 got released
|
|
tag: [next-alpine, latest-alpine]
|
|
when:
|
|
branch: master
|
|
event: push
|
|
|
|
publish-cli:
|
|
group: docker
|
|
image: plugins/docker
|
|
repo: woodpeckerci/woodpecker-cli
|
|
dockerfile: docker/Dockerfile.cli
|
|
secrets: [docker_username, docker_password]
|
|
tag: [next]
|
|
when:
|
|
branch: master
|
|
event: push
|
|
|
|
publish-cli-alpine:
|
|
group: docker
|
|
image: plugins/docker
|
|
repo: woodpeckerci/woodpecker-cli
|
|
dockerfile: docker/Dockerfile.cli.alpine
|
|
secrets: [ docker_username, docker_password ]
|
|
tag: [next-alpine]
|
|
when:
|
|
branch: master
|
|
event: push
|
|
|
|
release-server:
|
|
group: docker
|
|
image: plugins/docker
|
|
repo: woodpeckerci/woodpecker-server
|
|
dockerfile: docker/Dockerfile.server
|
|
secrets: [docker_username, docker_password]
|
|
tag: [latest, "${DRONE_TAG}"]
|
|
when:
|
|
event: tag
|
|
|
|
release-server-alpine:
|
|
group: docker
|
|
image: plugins/docker
|
|
repo: woodpeckerci/woodpecker-server
|
|
dockerfile: docker/Dockerfile.server.alpine
|
|
secrets: [ docker_username, docker_password ]
|
|
tag: [latest-alpine, "${DRONE_TAG}-alpine"]
|
|
when:
|
|
event: tag
|
|
|
|
release-agent:
|
|
group: docker
|
|
image: plugins/docker
|
|
repo: woodpeckerci/woodpecker-agent
|
|
dockerfile: docker/Dockerfile.agent
|
|
secrets: [docker_username, docker_password]
|
|
tag: [latest, "${DRONE_TAG}"]
|
|
when:
|
|
event: tag
|
|
|
|
release-agent-alpine:
|
|
group: docker
|
|
image: plugins/docker
|
|
repo: woodpeckerci/woodpecker-agent
|
|
dockerfile: docker/Dockerfile.agent.alpine
|
|
secrets: [ docker_username, docker_password ]
|
|
tag: [latest-alpine, "${DRONE_TAG}-alpine"]
|
|
when:
|
|
event: tag
|
|
|
|
release-cli:
|
|
group: docker
|
|
image: plugins/docker
|
|
repo: woodpeckerci/woodpecker-cli
|
|
dockerfile: docker/Dockerfile.cli
|
|
secrets: [docker_username, docker_password]
|
|
tag: [latest, "${DRONE_TAG}"]
|
|
when:
|
|
event: tag
|
|
|
|
release-cli-alpine:
|
|
group: docker
|
|
image: plugins/docker
|
|
repo: woodpeckerci/woodpecker-cli
|
|
dockerfile: docker/Dockerfile.cli.alpine
|
|
secrets: [ docker_username, docker_password ]
|
|
tag: [latest-alpine, "${DRONE_TAG}-alpine"]
|
|
when:
|
|
event: tag
|
|
|
|
checksums:
|
|
image: golang:1.16
|
|
commands:
|
|
- make release-checksums
|
|
when:
|
|
event: tag
|
|
|
|
# TODO: upload build artifacts for pushes to master
|
|
|
|
release:
|
|
image: plugins/github-release
|
|
files:
|
|
- dist/*.tar.gz
|
|
- dist/checksums.txt
|
|
title: ${DRONE_TAG##v}
|
|
secrets:
|
|
- source: github_token
|
|
target: github_release_api_key
|
|
when:
|
|
event: tag
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:9.6
|
|
ports: ["5432"]
|
|
environment:
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_HOST_AUTH_METHOD=trust
|
|
mysql:
|
|
image: mysql:5.6.27
|
|
ports: ["3306"]
|
|
environment:
|
|
- MYSQL_DATABASE=test
|
|
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
|