mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-15 22:41:19 +00:00
da99f47553
Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Anbraten <anton@ju60.de>
312 lines
10 KiB
YAML
312 lines
10 KiB
YAML
depends_on:
|
|
- test
|
|
- web
|
|
|
|
pipeline:
|
|
###############
|
|
# S e r v e r #
|
|
###############
|
|
build-web:
|
|
image: node:16-alpine
|
|
commands:
|
|
- cd web/
|
|
- yarn install --frozen-lockfile
|
|
- yarn build
|
|
|
|
cross-compile-server:
|
|
image: techknowlogick/xgo:go-1.17.x
|
|
commands:
|
|
- apt update
|
|
- apt install -y tree
|
|
- make cross-compile-server
|
|
environment:
|
|
PLATFORMS: linux|arm/v7;linux|arm64/v8;linux|amd64;linux|ppc64le
|
|
TAGS: bindata sqlite sqlite_unlock_notify
|
|
|
|
publish-server-dryrun:
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
group: docker
|
|
settings:
|
|
dry_run: true
|
|
repo: woodpeckerci/woodpecker-server
|
|
dockerfile: docker/Dockerfile.server.multiarch
|
|
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
|
tag: test
|
|
when:
|
|
event: pull_request
|
|
|
|
publish-server-alpine-dryrun:
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
group: docker
|
|
settings:
|
|
dry_run: true
|
|
repo: woodpeckerci/woodpecker-server
|
|
dockerfile: docker/Dockerfile.server.alpine.multiarch
|
|
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
|
tag: next-alpine
|
|
when:
|
|
event: pull_request
|
|
|
|
publish-next-server:
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
group: docker
|
|
secrets: [docker_username, docker_password]
|
|
settings:
|
|
repo: woodpeckerci/woodpecker-server
|
|
dockerfile: docker/Dockerfile.server.multiarch
|
|
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
|
tag: next
|
|
when:
|
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
event: push
|
|
|
|
publish-next-server-alpine:
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
group: docker
|
|
secrets: [ docker_username, docker_password ]
|
|
settings:
|
|
repo: woodpeckerci/woodpecker-server
|
|
dockerfile: docker/Dockerfile.server.alpine.multiarch
|
|
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
|
tag: next-alpine
|
|
when:
|
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
event: push
|
|
|
|
publish-release-branch-server:
|
|
image: plugins/docker
|
|
group: docker
|
|
secrets: [docker_username, docker_password]
|
|
settings:
|
|
repo: woodpeckerci/woodpecker-server
|
|
dockerfile: docker/Dockerfile.server
|
|
tag: ${CI_COMMIT_BRANCH##release/}
|
|
when:
|
|
branch: release/*
|
|
event: push
|
|
|
|
publish-release-branch-server-alpine:
|
|
image: plugins/docker
|
|
group: docker
|
|
secrets: [ docker_username, docker_password ]
|
|
settings:
|
|
repo: woodpeckerci/woodpecker-server
|
|
dockerfile: docker/Dockerfile.server.alpine
|
|
tag: ${CI_COMMIT_BRANCH##release/}
|
|
when:
|
|
branch: release/*
|
|
event: push
|
|
|
|
release-server:
|
|
group: docker
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
secrets: [docker_username, docker_password]
|
|
settings:
|
|
repo: woodpeckerci/woodpecker-server
|
|
dockerfile: docker/Dockerfile.server.multiarch
|
|
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
|
# remove 'latest' on older version branches to avoid accidental downgrade
|
|
tag: [latest, "${CI_COMMIT_TAG}"]
|
|
when:
|
|
event: tag
|
|
|
|
release-server-alpine:
|
|
group: docker
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
secrets: [ docker_username, docker_password ]
|
|
settings:
|
|
repo: woodpeckerci/woodpecker-server
|
|
dockerfile: docker/Dockerfile.server.alpine.multiarch
|
|
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
|
# remove 'latest-alpine' on older version branches to avoid accidental downgrade
|
|
tag: [latest-alpine, "${CI_COMMIT_TAG}-alpine"]
|
|
when:
|
|
event: tag
|
|
|
|
#############
|
|
# A g e n t #
|
|
#############
|
|
|
|
publish-agent-dryrun:
|
|
group: docker
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
settings:
|
|
dry_run: true
|
|
repo: woodpeckerci/woodpecker-agent
|
|
dockerfile: docker/Dockerfile.agent.multiarch
|
|
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le,windows/amd64,darwin/amd64,darwin/arm64
|
|
tag: test
|
|
when:
|
|
event: pull_request
|
|
|
|
publish-next-agent:
|
|
group: docker
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
secrets: [docker_username, docker_password]
|
|
settings:
|
|
repo: woodpeckerci/woodpecker-agent
|
|
dockerfile: docker/Dockerfile.agent.multiarch
|
|
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le,windows/amd64,darwin/amd64,darwin/arm64,freebsd/arm64,freebsd/amd64,openbsd/arm64,openbsd/amd64
|
|
tag: next
|
|
when:
|
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
event: push
|
|
|
|
publish-next-agent-alpine:
|
|
group: docker
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
secrets: [ docker_username, docker_password ]
|
|
settings:
|
|
repo: woodpeckerci/woodpecker-agent
|
|
dockerfile: docker/Dockerfile.agent.alpine.multiarch
|
|
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
|
tag: next-alpine
|
|
when:
|
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
event: push
|
|
|
|
publish-release-branch-agent:
|
|
group: docker
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
secrets: [docker_username, docker_password]
|
|
settings:
|
|
repo: woodpeckerci/woodpecker-agent
|
|
dockerfile: docker/Dockerfile.agent.multiarch
|
|
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le,windows/amd64,darwin/amd64,darwin/arm64,freebsd/arm64,freebsd/amd64,openbsd/arm64,openbsd/amd64
|
|
tag: ${CI_COMMIT_BRANCH##release/}
|
|
when:
|
|
branch: release/*
|
|
event: push
|
|
|
|
publish-release-branch-agent-alpine:
|
|
group: docker
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
secrets: [ docker_username, docker_password ]
|
|
settings:
|
|
repo: woodpeckerci/woodpecker-agent
|
|
dockerfile: docker/Dockerfile.agent.alpine.multiarch
|
|
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
|
tag: ${CI_COMMIT_BRANCH##release/}
|
|
when:
|
|
branch: release/*
|
|
event: push
|
|
|
|
release-agent:
|
|
group: docker
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
secrets: [docker_username, docker_password]
|
|
settings:
|
|
repo: woodpeckerci/woodpecker-agent
|
|
dockerfile: docker/Dockerfile.agent.multiarch
|
|
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le,windows/amd64,darwin/amd64,darwin/arm64,freebsd/arm64,freebsd/amd64,openbsd/arm64,openbsd/amd64
|
|
# remove 'latest' on older version branches to avoid accidental downgrade
|
|
tag: [latest, "${CI_COMMIT_TAG}"]
|
|
when:
|
|
event: tag
|
|
|
|
release-agent-alpine:
|
|
group: docker
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
secrets: [ docker_username, docker_password ]
|
|
settings:
|
|
repo: woodpeckerci/woodpecker-agent
|
|
dockerfile: docker/Dockerfile.agent.alpine.multiarch
|
|
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
|
# remove 'latest-alpine' on older version branches to avoid accidental downgrade
|
|
tag: [latest-alpine, "${CI_COMMIT_TAG}-alpine"]
|
|
when:
|
|
event: tag
|
|
|
|
#########
|
|
# C L I #
|
|
#########
|
|
|
|
publish-cli-dryrun:
|
|
group: docker
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
settings:
|
|
dry_run: true
|
|
repo: woodpeckerci/woodpecker-cli
|
|
dockerfile: docker/Dockerfile.cli.multiarch
|
|
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le,windows/amd64,darwin/amd64,darwin/arm64
|
|
tag: test
|
|
when:
|
|
event: pull_request
|
|
|
|
publish-next-cli:
|
|
group: docker
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
secrets: [docker_username, docker_password]
|
|
settings:
|
|
repo: woodpeckerci/woodpecker-cli
|
|
dockerfile: docker/Dockerfile.cli.multiarch
|
|
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le,windows/amd64,darwin/amd64,darwin/arm64,freebsd/arm64,freebsd/amd64,openbsd/arm64,openbsd/amd64
|
|
tag: next
|
|
when:
|
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
event: push
|
|
|
|
publish-next-cli-alpine:
|
|
group: docker
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
secrets: [ docker_username, docker_password ]
|
|
settings:
|
|
repo: woodpeckerci/woodpecker-cli
|
|
dockerfile: docker/Dockerfile.cli.alpine.multiarch
|
|
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
|
tag: next-alpine
|
|
when:
|
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
event: push
|
|
|
|
publish-release-branch-cli:
|
|
group: docker
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
secrets: [docker_username, docker_password]
|
|
settings:
|
|
repo: woodpeckerci/woodpecker-cli
|
|
dockerfile: docker/Dockerfile.cli.multiarch
|
|
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le,windows/amd64,darwin/amd64,darwin/arm64,freebsd/arm64,freebsd/amd64,openbsd/arm64,openbsd/amd64
|
|
tag: ${CI_COMMIT_BRANCH##release/}
|
|
when:
|
|
branch: release/*
|
|
event: push
|
|
|
|
publish-release-branch-cli-alpine:
|
|
group: docker
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
secrets: [ docker_username, docker_password ]
|
|
settings:
|
|
repo: woodpeckerci/woodpecker-cli
|
|
dockerfile: docker/Dockerfile.cli.alpine.multiarch
|
|
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
|
tag: ${CI_COMMIT_BRANCH##release/}
|
|
when:
|
|
branch: release/*
|
|
event: push
|
|
|
|
release-cli:
|
|
group: docker
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
secrets: [docker_username, docker_password]
|
|
settings:
|
|
repo: woodpeckerci/woodpecker-cli
|
|
dockerfile: docker/Dockerfile.cli.multiarch
|
|
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le,windows/amd64,darwin/amd64,darwin/arm64,freebsd/arm64,freebsd/amd64,openbsd/arm64,openbsd/amd64
|
|
# remove 'latest' on older version branches to avoid accidental downgrade
|
|
tag: [latest, "${CI_COMMIT_TAG}"]
|
|
when:
|
|
event: tag
|
|
|
|
release-cli-alpine:
|
|
group: docker
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
secrets: [ docker_username, docker_password ]
|
|
settings:
|
|
repo: woodpeckerci/woodpecker-cli
|
|
dockerfile: docker/Dockerfile.cli.alpine.multiarch
|
|
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
|
# remove 'latest-alpine' on older version branches to avoid accidental downgrade
|
|
tag: [latest-alpine, "${CI_COMMIT_TAG}-alpine"]
|
|
when:
|
|
event: tag
|