2022-01-29 12:58:55 +00:00
|
|
|
depends_on:
|
|
|
|
- test
|
|
|
|
- web
|
|
|
|
|
2022-01-17 23:36:46 +00:00
|
|
|
pipeline:
|
2022-03-01 15:40:24 +00:00
|
|
|
###############
|
|
|
|
# S e r v e r #
|
|
|
|
###############
|
2022-01-17 23:36:46 +00:00
|
|
|
build-web:
|
|
|
|
image: node:16-alpine
|
|
|
|
commands:
|
|
|
|
- cd web/
|
|
|
|
- yarn install --frozen-lockfile
|
|
|
|
- yarn build
|
|
|
|
|
2022-03-01 15:40:24 +00:00
|
|
|
cross-compile-server:
|
|
|
|
image: techknowlogick/xgo:go-1.17.x
|
2022-01-17 23:36:46 +00:00
|
|
|
commands:
|
2022-03-01 15:40:24 +00:00
|
|
|
- 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
|
2022-01-17 23:36:46 +00:00
|
|
|
|
|
|
|
publish-server-dryrun:
|
2022-03-01 15:40:24 +00:00
|
|
|
image: woodpeckerci/plugin-docker-buildx
|
2022-01-17 23:36:46 +00:00
|
|
|
group: docker
|
|
|
|
settings:
|
|
|
|
dry_run: true
|
|
|
|
repo: woodpeckerci/woodpecker-server
|
2022-03-01 15:40:24 +00:00
|
|
|
dockerfile: docker/Dockerfile.server.multiarch
|
|
|
|
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
|
|
|
tag: test
|
2022-01-17 23:36:46 +00:00
|
|
|
when:
|
|
|
|
event: pull_request
|
|
|
|
|
|
|
|
publish-server-alpine-dryrun:
|
2022-03-01 15:40:24 +00:00
|
|
|
image: woodpeckerci/plugin-docker-buildx
|
2022-01-17 23:36:46 +00:00
|
|
|
group: docker
|
|
|
|
settings:
|
|
|
|
dry_run: true
|
|
|
|
repo: woodpeckerci/woodpecker-server
|
2022-03-01 15:40:24 +00:00
|
|
|
dockerfile: docker/Dockerfile.server.alpine.multiarch
|
|
|
|
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
2022-01-17 23:36:46 +00:00
|
|
|
tag: next-alpine
|
|
|
|
when:
|
|
|
|
event: pull_request
|
|
|
|
|
2022-01-31 14:50:58 +00:00
|
|
|
publish-next-server:
|
2022-03-01 15:40:24 +00:00
|
|
|
image: woodpeckerci/plugin-docker-buildx
|
2022-01-17 23:36:46 +00:00
|
|
|
group: docker
|
|
|
|
secrets: [docker_username, docker_password]
|
|
|
|
settings:
|
|
|
|
repo: woodpeckerci/woodpecker-server
|
2022-03-01 15:40:24 +00:00
|
|
|
dockerfile: docker/Dockerfile.server.multiarch
|
|
|
|
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
2022-01-17 23:36:46 +00:00
|
|
|
tag: next
|
|
|
|
when:
|
|
|
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
|
|
event: push
|
|
|
|
|
2022-01-31 14:50:58 +00:00
|
|
|
publish-next-server-alpine:
|
2022-03-01 15:40:24 +00:00
|
|
|
image: woodpeckerci/plugin-docker-buildx
|
2022-01-17 23:36:46 +00:00
|
|
|
group: docker
|
|
|
|
secrets: [ docker_username, docker_password ]
|
|
|
|
settings:
|
|
|
|
repo: woodpeckerci/woodpecker-server
|
2022-03-01 15:40:24 +00:00
|
|
|
dockerfile: docker/Dockerfile.server.alpine.multiarch
|
|
|
|
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
2022-01-17 23:36:46 +00:00
|
|
|
tag: next-alpine
|
|
|
|
when:
|
|
|
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
|
|
event: push
|
|
|
|
|
2022-01-31 14:50:58 +00:00
|
|
|
publish-release-branch-server:
|
2022-03-02 17:21:04 +00:00
|
|
|
image: woodpeckerci/plugin-docker-buildx
|
2022-01-31 14:50:58 +00:00
|
|
|
group: docker
|
|
|
|
secrets: [docker_username, docker_password]
|
|
|
|
settings:
|
|
|
|
repo: woodpeckerci/woodpecker-server
|
2022-03-02 17:21:04 +00:00
|
|
|
dockerfile: docker/Dockerfile.server.multiarch
|
|
|
|
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
2022-01-31 14:50:58 +00:00
|
|
|
tag: ${CI_COMMIT_BRANCH##release/}
|
|
|
|
when:
|
|
|
|
branch: release/*
|
|
|
|
event: push
|
|
|
|
|
|
|
|
publish-release-branch-server-alpine:
|
2022-03-02 17:21:04 +00:00
|
|
|
image: woodpeckerci/plugin-docker-buildx
|
2022-01-31 14:50:58 +00:00
|
|
|
group: docker
|
|
|
|
secrets: [ docker_username, docker_password ]
|
|
|
|
settings:
|
|
|
|
repo: woodpeckerci/woodpecker-server
|
2022-03-02 17:21:04 +00:00
|
|
|
dockerfile: docker/Dockerfile.server.alpine.multiarch
|
|
|
|
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
2022-01-31 14:50:58 +00:00
|
|
|
tag: ${CI_COMMIT_BRANCH##release/}
|
|
|
|
when:
|
|
|
|
branch: release/*
|
|
|
|
event: push
|
|
|
|
|
2022-01-17 23:36:46 +00:00
|
|
|
release-server:
|
|
|
|
group: docker
|
2022-03-01 15:40:24 +00:00
|
|
|
image: woodpeckerci/plugin-docker-buildx
|
2022-01-17 23:36:46 +00:00
|
|
|
secrets: [docker_username, docker_password]
|
|
|
|
settings:
|
|
|
|
repo: woodpeckerci/woodpecker-server
|
2022-03-01 15:40:24 +00:00
|
|
|
dockerfile: docker/Dockerfile.server.multiarch
|
|
|
|
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
2022-01-31 14:50:58 +00:00
|
|
|
# remove 'latest' on older version branches to avoid accidental downgrade
|
2022-01-17 23:36:46 +00:00
|
|
|
tag: [latest, "${CI_COMMIT_TAG}"]
|
|
|
|
when:
|
|
|
|
event: tag
|
|
|
|
|
|
|
|
release-server-alpine:
|
|
|
|
group: docker
|
2022-03-01 15:40:24 +00:00
|
|
|
image: woodpeckerci/plugin-docker-buildx
|
2022-01-17 23:36:46 +00:00
|
|
|
secrets: [ docker_username, docker_password ]
|
|
|
|
settings:
|
|
|
|
repo: woodpeckerci/woodpecker-server
|
2022-03-01 15:40:24 +00:00
|
|
|
dockerfile: docker/Dockerfile.server.alpine.multiarch
|
|
|
|
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
2022-01-31 14:50:58 +00:00
|
|
|
# remove 'latest-alpine' on older version branches to avoid accidental downgrade
|
2022-01-17 23:36:46 +00:00
|
|
|
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
|
|
|
|
|
2022-01-31 14:50:58 +00:00
|
|
|
publish-next-agent:
|
2022-01-17 23:36:46 +00:00
|
|
|
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
|
|
|
|
|
2022-01-31 14:50:58 +00:00
|
|
|
publish-next-agent-alpine:
|
2022-01-17 23:36:46 +00:00
|
|
|
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
|
|
|
|
|
2022-01-31 14:50:58 +00:00
|
|
|
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
|
|
|
|
|
2022-01-17 23:36:46 +00:00
|
|
|
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
|
2022-01-31 14:50:58 +00:00
|
|
|
# remove 'latest' on older version branches to avoid accidental downgrade
|
2022-01-17 23:36:46 +00:00
|
|
|
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
|
2022-01-31 14:50:58 +00:00
|
|
|
# remove 'latest-alpine' on older version branches to avoid accidental downgrade
|
2022-01-17 23:36:46 +00:00
|
|
|
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
|
|
|
|
|
2022-01-31 14:50:58 +00:00
|
|
|
publish-next-cli:
|
2022-01-17 23:36:46 +00:00
|
|
|
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
|
|
|
|
|
2022-01-31 14:50:58 +00:00
|
|
|
publish-next-cli-alpine:
|
2022-01-17 23:36:46 +00:00
|
|
|
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
|
|
|
|
|
2022-01-31 14:50:58 +00:00
|
|
|
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
|
|
|
|
|
2022-01-17 23:36:46 +00:00
|
|
|
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
|
2022-01-31 14:50:58 +00:00
|
|
|
# remove 'latest' on older version branches to avoid accidental downgrade
|
2022-01-17 23:36:46 +00:00
|
|
|
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
|
2022-01-31 14:50:58 +00:00
|
|
|
# remove 'latest-alpine' on older version branches to avoid accidental downgrade
|
2022-01-17 23:36:46 +00:00
|
|
|
tag: [latest-alpine, "${CI_COMMIT_TAG}-alpine"]
|
|
|
|
when:
|
|
|
|
event: tag
|