2023-11-06 00:37:02 +00:00
|
|
|
version: 1
|
|
|
|
|
2023-07-12 21:25:05 +00:00
|
|
|
when:
|
2023-07-25 12:08:21 +00:00
|
|
|
- event: [pull_request, tag]
|
2023-07-12 21:25:05 +00:00
|
|
|
- event: push
|
2023-07-25 14:29:01 +00:00
|
|
|
branch:
|
|
|
|
- ${CI_REPO_DEFAULT_BRANCH}
|
|
|
|
- release/*
|
2023-11-11 20:35:48 +00:00
|
|
|
- renovate/*
|
2023-07-12 21:25:05 +00:00
|
|
|
|
2022-01-29 12:58:55 +00:00
|
|
|
depends_on:
|
|
|
|
- test
|
|
|
|
- web
|
|
|
|
|
2022-07-17 16:25:56 +00:00
|
|
|
variables:
|
2023-11-16 12:33:11 +00:00
|
|
|
- &golang_image 'docker.io/golang:1.21.4'
|
2023-11-01 14:25:48 +00:00
|
|
|
- &node_image 'docker.io/node:21-alpine'
|
2023-11-16 01:01:41 +00:00
|
|
|
- &xgo_image 'docker.io/techknowlogick/xgo:go-1.21.4'
|
2023-10-09 07:11:08 +00:00
|
|
|
- &xgo_version 'go-1.21.2'
|
2023-11-28 03:58:47 +00:00
|
|
|
- &buildx_plugin 'docker.io/woodpeckerci/plugin-docker-buildx:2.2.1'
|
2023-07-21 23:04:48 +00:00
|
|
|
- &platforms_release 'linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/386,linux/amd64,linux/ppc64le,linux/riscv64,linux/s390x,freebsd/arm64,freebsd/amd64,openbsd/arm64,openbsd/amd64'
|
2022-08-31 14:27:06 +00:00
|
|
|
- &platforms_server 'linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le,linux/riscv64'
|
2023-07-10 12:46:55 +00:00
|
|
|
- &platforms_preview 'linux/amd64'
|
2022-08-31 14:27:06 +00:00
|
|
|
- &platforms_alpine 'linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le'
|
2023-08-18 14:39:18 +00:00
|
|
|
- &build_args 'CI_COMMIT_SHA=${CI_COMMIT_SHA},CI_COMMIT_BRANCH=${CI_COMMIT_BRANCH},CI_COMMIT_TAG=${CI_COMMIT_TAG}'
|
2022-07-17 16:25:56 +00:00
|
|
|
|
2023-07-31 02:26:27 +00:00
|
|
|
# vars used on push / tag events only
|
2023-10-24 12:42:05 +00:00
|
|
|
- publish_logins: &publish_logins # Default DockerHub login
|
2023-07-31 02:26:27 +00:00
|
|
|
- registry: https://index.docker.io/v1/
|
2023-10-23 08:08:48 +00:00
|
|
|
username: woodpeckerbot
|
2023-07-31 02:26:27 +00:00
|
|
|
password:
|
|
|
|
from_secret: docker_password
|
|
|
|
# Additional Quay.IO login
|
|
|
|
- registry: https://quay.io
|
2023-10-23 08:08:48 +00:00
|
|
|
username: 'woodpeckerci+wp_ci'
|
2023-07-31 02:26:27 +00:00
|
|
|
password:
|
|
|
|
from_secret: QUAY_IO_TOKEN
|
|
|
|
- &publish_repos_server 'woodpeckerci/woodpecker-server,quay.io/woodpeckerci/woodpecker-server'
|
|
|
|
- &publish_repos_agent 'woodpeckerci/woodpecker-agent,quay.io/woodpeckerci/woodpecker-agent'
|
|
|
|
- &publish_repos_cli 'woodpeckerci/woodpecker-cli,quay.io/woodpeckerci/woodpecker-cli'
|
2023-10-24 12:42:05 +00:00
|
|
|
- path: &when_path # web source code
|
|
|
|
- 'web/**'
|
2023-10-23 08:08:48 +00:00
|
|
|
# api source code
|
2023-10-24 12:42:05 +00:00
|
|
|
- 'server/api/**'
|
2023-10-23 08:08:48 +00:00
|
|
|
# go source code
|
2023-10-24 12:42:05 +00:00
|
|
|
- '**/*.go'
|
|
|
|
- 'go.*'
|
2023-10-23 08:08:48 +00:00
|
|
|
# schema changes
|
2023-10-24 12:42:05 +00:00
|
|
|
- 'pipeline/schema/**'
|
2023-10-23 08:08:48 +00:00
|
|
|
# Dockerfile changes
|
2023-10-24 12:42:05 +00:00
|
|
|
- 'docker/**'
|
2023-07-31 02:26:27 +00:00
|
|
|
|
2023-06-30 11:32:17 +00:00
|
|
|
steps:
|
2022-06-16 23:57:02 +00:00
|
|
|
vendor:
|
2022-07-17 16:25:56 +00:00
|
|
|
image: *golang_image
|
2022-08-31 14:27:06 +00:00
|
|
|
pull: true
|
2022-06-16 23:57:02 +00:00
|
|
|
commands:
|
|
|
|
- go mod vendor
|
2023-10-23 11:43:40 +00:00
|
|
|
when:
|
|
|
|
- event: pull_request
|
|
|
|
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
|
|
|
|
- event: pull_request
|
|
|
|
path: *when_path
|
|
|
|
- branch:
|
|
|
|
- ${CI_REPO_DEFAULT_BRANCH}
|
|
|
|
- release/*
|
|
|
|
event: [push, tag]
|
|
|
|
path: *when_path
|
2022-06-16 23:57:02 +00:00
|
|
|
|
2022-03-01 15:40:24 +00:00
|
|
|
###############
|
|
|
|
# S e r v e r #
|
|
|
|
###############
|
2022-06-16 21:55:17 +00:00
|
|
|
build-web:
|
2022-07-17 16:25:56 +00:00
|
|
|
image: *node_image
|
2022-10-25 12:51:29 +00:00
|
|
|
directory: web/
|
2022-01-17 23:36:46 +00:00
|
|
|
commands:
|
2022-10-08 14:15:07 +00:00
|
|
|
- corepack enable
|
|
|
|
- pnpm install --frozen-lockfile
|
|
|
|
- pnpm build
|
2023-10-23 11:43:40 +00:00
|
|
|
when:
|
|
|
|
- event: pull_request
|
|
|
|
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
|
|
|
|
- event: pull_request
|
|
|
|
path: *when_path
|
|
|
|
- branch:
|
|
|
|
- ${CI_REPO_DEFAULT_BRANCH}
|
|
|
|
- release/*
|
|
|
|
event: [push, tag]
|
|
|
|
path: *when_path
|
2022-01-17 23:36:46 +00:00
|
|
|
|
2023-07-10 12:46:55 +00:00
|
|
|
cross-compile-server-preview:
|
2022-07-17 16:25:56 +00:00
|
|
|
image: *xgo_image
|
2022-08-31 14:27:06 +00:00
|
|
|
pull: true
|
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:
|
2023-07-10 12:46:55 +00:00
|
|
|
PLATFORMS: linux|amd64
|
2022-12-25 15:36:43 +00:00
|
|
|
TAGS: bindata sqlite sqlite_unlock_notify netgo
|
2022-07-17 16:25:56 +00:00
|
|
|
XGO_VERSION: *xgo_version
|
2023-07-10 12:46:55 +00:00
|
|
|
when:
|
2023-10-23 08:08:48 +00:00
|
|
|
- event: pull_request
|
|
|
|
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
|
|
|
|
- event: pull_request
|
|
|
|
path: *when_path
|
2022-01-17 23:36:46 +00:00
|
|
|
|
2022-08-14 17:04:19 +00:00
|
|
|
publish-server-preview:
|
2023-11-01 14:25:48 +00:00
|
|
|
image: *buildx_plugin
|
2022-01-17 23:36:46 +00:00
|
|
|
group: docker
|
|
|
|
settings:
|
|
|
|
repo: woodpeckerci/woodpecker-server
|
2022-03-01 15:40:24 +00:00
|
|
|
dockerfile: docker/Dockerfile.server.multiarch
|
2023-07-10 12:46:55 +00:00
|
|
|
platforms: *platforms_preview
|
2022-08-14 17:04:19 +00:00
|
|
|
tag: pull_${CI_COMMIT_PULL_REQUEST}
|
2023-10-31 20:07:29 +00:00
|
|
|
logins: *publish_logins
|
2022-01-17 23:36:46 +00:00
|
|
|
when:
|
2023-10-20 09:27:30 +00:00
|
|
|
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
|
2023-10-23 08:08:48 +00:00
|
|
|
event: pull_request
|
2022-01-17 23:36:46 +00:00
|
|
|
|
2022-08-14 17:04:19 +00:00
|
|
|
publish-server-alpine-preview:
|
2023-11-01 14:25:48 +00:00
|
|
|
image: *buildx_plugin
|
2022-01-17 23:36:46 +00:00
|
|
|
group: docker
|
|
|
|
settings:
|
|
|
|
repo: woodpeckerci/woodpecker-server
|
2022-03-01 15:40:24 +00:00
|
|
|
dockerfile: docker/Dockerfile.server.alpine.multiarch
|
2023-07-10 12:46:55 +00:00
|
|
|
platforms: *platforms_preview
|
2022-08-14 17:04:19 +00:00
|
|
|
tag: pull_${CI_COMMIT_PULL_REQUEST}-alpine
|
2023-10-31 20:07:29 +00:00
|
|
|
logins: *publish_logins
|
2022-01-17 23:36:46 +00:00
|
|
|
when:
|
2023-10-20 09:27:30 +00:00
|
|
|
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
|
2023-10-23 08:08:48 +00:00
|
|
|
event: pull_request
|
2023-10-20 09:27:30 +00:00
|
|
|
|
2023-10-31 20:07:29 +00:00
|
|
|
build-server:
|
2023-11-01 14:25:48 +00:00
|
|
|
image: *buildx_plugin
|
2023-10-20 09:27:30 +00:00
|
|
|
group: docker
|
|
|
|
settings:
|
|
|
|
dry_run: true
|
|
|
|
repo: woodpeckerci/woodpecker-server
|
|
|
|
dockerfile: docker/Dockerfile.server.multiarch
|
|
|
|
platforms: *platforms_preview
|
|
|
|
tag: pull_${CI_COMMIT_PULL_REQUEST}
|
|
|
|
when:
|
|
|
|
evaluate: 'not (CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images")'
|
2023-10-23 08:08:48 +00:00
|
|
|
event: pull_request
|
|
|
|
path: *when_path
|
2023-10-20 09:27:30 +00:00
|
|
|
|
2023-10-31 20:07:29 +00:00
|
|
|
build-server-alpine:
|
2023-11-01 14:25:48 +00:00
|
|
|
image: *buildx_plugin
|
2023-10-20 09:27:30 +00:00
|
|
|
group: docker
|
|
|
|
settings:
|
|
|
|
dry_run: true
|
|
|
|
repo: woodpeckerci/woodpecker-server
|
|
|
|
dockerfile: docker/Dockerfile.server.alpine.multiarch
|
|
|
|
platforms: *platforms_preview
|
|
|
|
tag: pull_${CI_COMMIT_PULL_REQUEST}-alpine
|
|
|
|
when:
|
|
|
|
evaluate: 'not (CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images")'
|
2023-10-23 08:08:48 +00:00
|
|
|
event: pull_request
|
|
|
|
path: *when_path
|
2023-07-10 12:46:55 +00:00
|
|
|
|
|
|
|
cross-compile-server:
|
|
|
|
image: *xgo_image
|
|
|
|
pull: true
|
|
|
|
commands:
|
|
|
|
- apt update
|
|
|
|
- apt install -y tree
|
|
|
|
- make cross-compile-server
|
|
|
|
environment:
|
|
|
|
PLATFORMS: linux|arm/v7;linux|arm64/v8;linux|amd64;linux|ppc64le;linux|riscv64
|
|
|
|
TAGS: bindata sqlite sqlite_unlock_notify netgo
|
|
|
|
XGO_VERSION: *xgo_version
|
|
|
|
when:
|
2023-07-25 14:29:01 +00:00
|
|
|
branch:
|
|
|
|
- ${CI_REPO_DEFAULT_BRANCH}
|
|
|
|
- release/*
|
|
|
|
event: [push, tag]
|
2023-10-23 08:08:48 +00:00
|
|
|
path: *when_path
|
2022-01-17 23:36:46 +00:00
|
|
|
|
2022-01-31 14:50:58 +00:00
|
|
|
publish-next-server:
|
2023-11-01 14:25:48 +00:00
|
|
|
image: *buildx_plugin
|
2022-01-17 23:36:46 +00:00
|
|
|
group: docker
|
|
|
|
settings:
|
2023-07-31 02:26:27 +00:00
|
|
|
repo: *publish_repos_server
|
2022-03-01 15:40:24 +00:00
|
|
|
dockerfile: docker/Dockerfile.server.multiarch
|
2022-08-31 14:27:06 +00:00
|
|
|
platforms: *platforms_server
|
2023-10-24 12:42:05 +00:00
|
|
|
tag: [next, 'next-${CI_COMMIT_SHA:0:10}']
|
2023-07-31 02:26:27 +00:00
|
|
|
logins: *publish_logins
|
2022-01-17 23:36:46 +00:00
|
|
|
when:
|
|
|
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
|
|
event: push
|
2023-10-23 08:08:48 +00:00
|
|
|
path: *when_path
|
2022-01-17 23:36:46 +00:00
|
|
|
|
2022-01-31 14:50:58 +00:00
|
|
|
publish-next-server-alpine:
|
2023-11-01 14:25:48 +00:00
|
|
|
image: *buildx_plugin
|
2022-01-17 23:36:46 +00:00
|
|
|
group: docker
|
|
|
|
settings:
|
2023-07-31 02:26:27 +00:00
|
|
|
repo: *publish_repos_server
|
2022-03-01 15:40:24 +00:00
|
|
|
dockerfile: docker/Dockerfile.server.alpine.multiarch
|
2022-08-31 14:27:06 +00:00
|
|
|
platforms: *platforms_alpine
|
2023-10-24 12:42:05 +00:00
|
|
|
tag: [next-alpine, 'next-${CI_COMMIT_SHA:0:10}-alpine']
|
2023-07-31 02:26:27 +00:00
|
|
|
logins: *publish_logins
|
2022-01-17 23:36:46 +00:00
|
|
|
when:
|
|
|
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
|
|
event: push
|
2023-10-23 08:08:48 +00:00
|
|
|
path: *when_path
|
2022-01-17 23:36:46 +00:00
|
|
|
|
2022-01-31 14:50:58 +00:00
|
|
|
publish-release-branch-server:
|
2023-11-01 14:25:48 +00:00
|
|
|
image: *buildx_plugin
|
2022-01-31 14:50:58 +00:00
|
|
|
group: docker
|
|
|
|
settings:
|
2023-07-31 02:26:27 +00:00
|
|
|
repo: *publish_repos_server
|
2022-03-02 17:21:04 +00:00
|
|
|
dockerfile: docker/Dockerfile.server.multiarch
|
2022-08-31 14:27:06 +00:00
|
|
|
platforms: *platforms_server
|
2022-01-31 14:50:58 +00:00
|
|
|
tag: ${CI_COMMIT_BRANCH##release/}
|
2023-07-31 02:26:27 +00:00
|
|
|
logins: *publish_logins
|
2022-01-31 14:50:58 +00:00
|
|
|
when:
|
|
|
|
branch: release/*
|
|
|
|
event: push
|
2023-10-23 08:08:48 +00:00
|
|
|
path: *when_path
|
2022-01-31 14:50:58 +00:00
|
|
|
|
|
|
|
publish-release-branch-server-alpine:
|
2023-11-01 14:25:48 +00:00
|
|
|
image: *buildx_plugin
|
2022-01-31 14:50:58 +00:00
|
|
|
group: docker
|
|
|
|
settings:
|
2023-07-31 02:26:27 +00:00
|
|
|
repo: *publish_repos_server
|
2022-03-02 17:21:04 +00:00
|
|
|
dockerfile: docker/Dockerfile.server.alpine.multiarch
|
2022-08-31 14:27:06 +00:00
|
|
|
platforms: *platforms_alpine
|
2022-01-31 14:50:58 +00:00
|
|
|
tag: ${CI_COMMIT_BRANCH##release/}
|
2023-07-31 02:26:27 +00:00
|
|
|
logins: *publish_logins
|
2022-01-31 14:50:58 +00:00
|
|
|
when:
|
|
|
|
branch: release/*
|
|
|
|
event: push
|
2023-10-23 08:08:48 +00:00
|
|
|
path: *when_path
|
2022-01-31 14:50:58 +00:00
|
|
|
|
2022-01-17 23:36:46 +00:00
|
|
|
release-server:
|
|
|
|
group: docker
|
2023-11-01 14:25:48 +00:00
|
|
|
image: *buildx_plugin
|
2022-01-17 23:36:46 +00:00
|
|
|
settings:
|
2023-07-31 02:26:27 +00:00
|
|
|
repo: *publish_repos_server
|
2022-03-01 15:40:24 +00:00
|
|
|
dockerfile: docker/Dockerfile.server.multiarch
|
2022-08-31 14:27:06 +00:00
|
|
|
platforms: *platforms_server
|
2022-01-31 14:50:58 +00:00
|
|
|
# remove 'latest' on older version branches to avoid accidental downgrade
|
2023-10-24 12:42:05 +00:00
|
|
|
tag: [latest, '${CI_COMMIT_TAG}']
|
2023-07-31 02:26:27 +00:00
|
|
|
logins: *publish_logins
|
2022-01-17 23:36:46 +00:00
|
|
|
when:
|
|
|
|
event: tag
|
|
|
|
|
|
|
|
release-server-alpine:
|
|
|
|
group: docker
|
2023-11-01 14:25:48 +00:00
|
|
|
image: *buildx_plugin
|
2022-01-17 23:36:46 +00:00
|
|
|
settings:
|
2023-07-31 02:26:27 +00:00
|
|
|
repo: *publish_repos_server
|
2022-03-01 15:40:24 +00:00
|
|
|
dockerfile: docker/Dockerfile.server.alpine.multiarch
|
2022-08-31 14:27:06 +00:00
|
|
|
platforms: *platforms_alpine
|
2022-01-31 14:50:58 +00:00
|
|
|
# remove 'latest-alpine' on older version branches to avoid accidental downgrade
|
2023-10-24 12:42:05 +00:00
|
|
|
tag: [latest-alpine, '${CI_COMMIT_TAG}-alpine']
|
2023-07-31 02:26:27 +00:00
|
|
|
logins: *publish_logins
|
2022-01-17 23:36:46 +00:00
|
|
|
when:
|
|
|
|
event: tag
|
|
|
|
|
|
|
|
#############
|
|
|
|
# A g e n t #
|
|
|
|
#############
|
|
|
|
|
2022-08-14 17:04:19 +00:00
|
|
|
publish-agent-preview:
|
2022-01-17 23:36:46 +00:00
|
|
|
group: docker
|
2023-11-01 14:25:48 +00:00
|
|
|
image: *buildx_plugin
|
2022-01-17 23:36:46 +00:00
|
|
|
settings:
|
|
|
|
repo: woodpeckerci/woodpecker-agent
|
|
|
|
dockerfile: docker/Dockerfile.agent.multiarch
|
2022-08-31 14:27:06 +00:00
|
|
|
platforms: *platforms_preview
|
2022-08-14 17:04:19 +00:00
|
|
|
tag: pull_${CI_COMMIT_PULL_REQUEST}
|
2023-08-18 14:39:18 +00:00
|
|
|
build_args: *build_args
|
2023-10-31 20:07:29 +00:00
|
|
|
logins: *publish_logins
|
2022-01-17 23:36:46 +00:00
|
|
|
when:
|
2023-10-20 09:27:30 +00:00
|
|
|
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
|
2023-10-23 08:08:48 +00:00
|
|
|
event: pull_request
|
2023-10-20 09:27:30 +00:00
|
|
|
|
2023-10-31 20:07:29 +00:00
|
|
|
build-agent:
|
2023-10-20 09:27:30 +00:00
|
|
|
group: docker
|
2023-11-01 14:25:48 +00:00
|
|
|
image: *buildx_plugin
|
2023-10-20 09:27:30 +00:00
|
|
|
settings:
|
|
|
|
dry_run: true
|
|
|
|
repo: woodpeckerci/woodpecker-agent
|
|
|
|
dockerfile: docker/Dockerfile.agent.multiarch
|
|
|
|
platforms: *platforms_preview
|
|
|
|
tag: pull_${CI_COMMIT_PULL_REQUEST}
|
|
|
|
build_args: *build_args
|
|
|
|
when:
|
|
|
|
evaluate: 'not (CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images")'
|
2023-10-23 08:08:48 +00:00
|
|
|
event: pull_request
|
|
|
|
path: *when_path
|
2022-01-17 23:36:46 +00:00
|
|
|
|
2022-01-31 14:50:58 +00:00
|
|
|
publish-next-agent:
|
2022-01-17 23:36:46 +00:00
|
|
|
group: docker
|
2023-11-01 14:25:48 +00:00
|
|
|
image: *buildx_plugin
|
2022-01-17 23:36:46 +00:00
|
|
|
settings:
|
2023-07-31 02:26:27 +00:00
|
|
|
repo: *publish_repos_agent
|
2022-01-17 23:36:46 +00:00
|
|
|
dockerfile: docker/Dockerfile.agent.multiarch
|
2022-08-31 14:27:06 +00:00
|
|
|
platforms: *platforms_release
|
2023-10-24 12:42:05 +00:00
|
|
|
tag: [next, 'next-${CI_COMMIT_SHA:0:10}']
|
2023-07-31 02:26:27 +00:00
|
|
|
logins: *publish_logins
|
2023-08-18 14:39:18 +00:00
|
|
|
build_args: *build_args
|
2022-01-17 23:36:46 +00:00
|
|
|
when:
|
|
|
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
|
|
event: push
|
2023-10-23 08:08:48 +00:00
|
|
|
path: *when_path
|
2022-01-17 23:36:46 +00:00
|
|
|
|
2022-01-31 14:50:58 +00:00
|
|
|
publish-next-agent-alpine:
|
2022-01-17 23:36:46 +00:00
|
|
|
group: docker
|
2023-11-01 14:25:48 +00:00
|
|
|
image: *buildx_plugin
|
2022-01-17 23:36:46 +00:00
|
|
|
settings:
|
2023-07-31 02:26:27 +00:00
|
|
|
repo: *publish_repos_agent
|
2022-01-17 23:36:46 +00:00
|
|
|
dockerfile: docker/Dockerfile.agent.alpine.multiarch
|
2022-08-31 14:27:06 +00:00
|
|
|
platforms: *platforms_alpine
|
2023-10-24 12:42:05 +00:00
|
|
|
tag: [next-alpine, 'next-${CI_COMMIT_SHA:0:10}-alpine']
|
2023-07-31 02:26:27 +00:00
|
|
|
logins: *publish_logins
|
2023-08-18 14:39:18 +00:00
|
|
|
build_args: *build_args
|
2022-01-17 23:36:46 +00:00
|
|
|
when:
|
|
|
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
|
|
event: push
|
2023-10-23 08:08:48 +00:00
|
|
|
path: *when_path
|
2022-01-17 23:36:46 +00:00
|
|
|
|
2022-01-31 14:50:58 +00:00
|
|
|
publish-release-branch-agent:
|
|
|
|
group: docker
|
2023-11-01 14:25:48 +00:00
|
|
|
image: *buildx_plugin
|
2022-01-31 14:50:58 +00:00
|
|
|
settings:
|
2023-07-31 02:26:27 +00:00
|
|
|
repo: *publish_repos_agent
|
2022-01-31 14:50:58 +00:00
|
|
|
dockerfile: docker/Dockerfile.agent.multiarch
|
2022-08-31 14:27:06 +00:00
|
|
|
platforms: *platforms_release
|
2022-01-31 14:50:58 +00:00
|
|
|
tag: ${CI_COMMIT_BRANCH##release/}
|
2023-07-31 02:26:27 +00:00
|
|
|
logins: *publish_logins
|
2023-08-18 14:39:18 +00:00
|
|
|
build_args: *build_args
|
2022-01-31 14:50:58 +00:00
|
|
|
when:
|
|
|
|
branch: release/*
|
|
|
|
event: push
|
2023-10-23 08:08:48 +00:00
|
|
|
path: *when_path
|
2022-01-31 14:50:58 +00:00
|
|
|
|
|
|
|
publish-release-branch-agent-alpine:
|
|
|
|
group: docker
|
2023-11-01 14:25:48 +00:00
|
|
|
image: *buildx_plugin
|
2022-01-31 14:50:58 +00:00
|
|
|
settings:
|
2023-07-31 02:26:27 +00:00
|
|
|
repo: *publish_repos_agent
|
2022-01-31 14:50:58 +00:00
|
|
|
dockerfile: docker/Dockerfile.agent.alpine.multiarch
|
2022-08-31 14:27:06 +00:00
|
|
|
platforms: *platforms_alpine
|
2022-01-31 14:50:58 +00:00
|
|
|
tag: ${CI_COMMIT_BRANCH##release/}
|
2023-07-31 02:26:27 +00:00
|
|
|
logins: *publish_logins
|
2023-08-18 14:39:18 +00:00
|
|
|
build_args: *build_args
|
2022-01-31 14:50:58 +00:00
|
|
|
when:
|
|
|
|
branch: release/*
|
|
|
|
event: push
|
2023-10-23 08:08:48 +00:00
|
|
|
path: *when_path
|
2022-01-31 14:50:58 +00:00
|
|
|
|
2022-01-17 23:36:46 +00:00
|
|
|
release-agent:
|
|
|
|
group: docker
|
2023-11-01 14:25:48 +00:00
|
|
|
image: *buildx_plugin
|
2022-01-17 23:36:46 +00:00
|
|
|
settings:
|
2023-07-31 02:26:27 +00:00
|
|
|
repo: *publish_repos_agent
|
2022-01-17 23:36:46 +00:00
|
|
|
dockerfile: docker/Dockerfile.agent.multiarch
|
2022-08-31 14:27:06 +00:00
|
|
|
platforms: *platforms_release
|
2022-01-31 14:50:58 +00:00
|
|
|
# remove 'latest' on older version branches to avoid accidental downgrade
|
2023-10-24 12:42:05 +00:00
|
|
|
tag: [latest, '${CI_COMMIT_TAG}']
|
2023-07-31 02:26:27 +00:00
|
|
|
logins: *publish_logins
|
2023-08-18 14:39:18 +00:00
|
|
|
build_args: *build_args
|
2022-01-17 23:36:46 +00:00
|
|
|
when:
|
|
|
|
event: tag
|
|
|
|
|
|
|
|
release-agent-alpine:
|
|
|
|
group: docker
|
2023-11-01 14:25:48 +00:00
|
|
|
image: *buildx_plugin
|
2022-01-17 23:36:46 +00:00
|
|
|
settings:
|
2023-07-31 02:26:27 +00:00
|
|
|
repo: *publish_repos_agent
|
2022-01-17 23:36:46 +00:00
|
|
|
dockerfile: docker/Dockerfile.agent.alpine.multiarch
|
2022-08-31 14:27:06 +00:00
|
|
|
platforms: *platforms_alpine
|
2022-01-31 14:50:58 +00:00
|
|
|
# remove 'latest-alpine' on older version branches to avoid accidental downgrade
|
2023-10-24 12:42:05 +00:00
|
|
|
tag: [latest-alpine, '${CI_COMMIT_TAG}-alpine']
|
2023-07-31 02:26:27 +00:00
|
|
|
logins: *publish_logins
|
2023-08-18 14:39:18 +00:00
|
|
|
build_args: *build_args
|
2022-01-17 23:36:46 +00:00
|
|
|
when:
|
|
|
|
event: tag
|
|
|
|
|
|
|
|
#########
|
|
|
|
# C L I #
|
|
|
|
#########
|
|
|
|
|
2022-08-14 17:04:19 +00:00
|
|
|
publish-cli-preview:
|
2022-01-17 23:36:46 +00:00
|
|
|
group: docker
|
2023-11-01 14:25:48 +00:00
|
|
|
image: *buildx_plugin
|
2022-01-17 23:36:46 +00:00
|
|
|
settings:
|
|
|
|
repo: woodpeckerci/woodpecker-cli
|
|
|
|
dockerfile: docker/Dockerfile.cli.multiarch
|
2022-08-31 14:27:06 +00:00
|
|
|
platforms: *platforms_preview
|
2022-08-14 17:04:19 +00:00
|
|
|
tag: pull_${CI_COMMIT_PULL_REQUEST}
|
2023-08-18 14:39:18 +00:00
|
|
|
build_args: *build_args
|
2023-10-31 20:07:29 +00:00
|
|
|
logins: *publish_logins
|
2022-01-17 23:36:46 +00:00
|
|
|
when:
|
2023-10-20 09:27:30 +00:00
|
|
|
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
|
2023-10-23 08:08:48 +00:00
|
|
|
event: pull_request
|
2023-10-20 09:27:30 +00:00
|
|
|
|
2023-10-31 20:07:29 +00:00
|
|
|
build-cli:
|
2023-10-20 09:27:30 +00:00
|
|
|
group: docker
|
2023-11-01 14:25:48 +00:00
|
|
|
image: *buildx_plugin
|
2023-10-20 09:27:30 +00:00
|
|
|
settings:
|
|
|
|
dry_run: true
|
|
|
|
repo: woodpeckerci/woodpecker-cli
|
|
|
|
dockerfile: docker/Dockerfile.cli.multiarch
|
|
|
|
platforms: *platforms_preview
|
|
|
|
tag: pull_${CI_COMMIT_PULL_REQUEST}
|
|
|
|
build_args: *build_args
|
|
|
|
when:
|
|
|
|
evaluate: 'not (CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images")'
|
2023-10-23 08:08:48 +00:00
|
|
|
event: pull_request
|
|
|
|
path: *when_path
|
2022-01-17 23:36:46 +00:00
|
|
|
|
2022-01-31 14:50:58 +00:00
|
|
|
publish-next-cli:
|
2022-01-17 23:36:46 +00:00
|
|
|
group: docker
|
2023-11-01 14:25:48 +00:00
|
|
|
image: *buildx_plugin
|
2022-01-17 23:36:46 +00:00
|
|
|
settings:
|
2023-07-31 02:26:27 +00:00
|
|
|
repo: *publish_repos_cli
|
2022-01-17 23:36:46 +00:00
|
|
|
dockerfile: docker/Dockerfile.cli.multiarch
|
2022-08-31 14:27:06 +00:00
|
|
|
platforms: *platforms_release
|
2023-10-24 12:42:05 +00:00
|
|
|
tag: [next, 'next-${CI_COMMIT_SHA:0:10}']
|
2023-07-31 02:26:27 +00:00
|
|
|
logins: *publish_logins
|
2023-08-18 14:39:18 +00:00
|
|
|
build_args: *build_args
|
2022-01-17 23:36:46 +00:00
|
|
|
when:
|
|
|
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
|
|
event: push
|
2023-10-23 08:08:48 +00:00
|
|
|
path: *when_path
|
2022-01-17 23:36:46 +00:00
|
|
|
|
2022-01-31 14:50:58 +00:00
|
|
|
publish-next-cli-alpine:
|
2022-01-17 23:36:46 +00:00
|
|
|
group: docker
|
2023-11-01 14:25:48 +00:00
|
|
|
image: *buildx_plugin
|
2022-01-17 23:36:46 +00:00
|
|
|
settings:
|
2023-07-31 02:26:27 +00:00
|
|
|
repo: *publish_repos_cli
|
2022-01-17 23:36:46 +00:00
|
|
|
dockerfile: docker/Dockerfile.cli.alpine.multiarch
|
2022-08-31 14:27:06 +00:00
|
|
|
platforms: *platforms_alpine
|
2023-10-24 12:42:05 +00:00
|
|
|
tag: [next-alpine, 'next-${CI_COMMIT_SHA:0:10}-alpine']
|
2023-07-31 02:26:27 +00:00
|
|
|
logins: *publish_logins
|
2023-08-18 14:39:18 +00:00
|
|
|
build_args: *build_args
|
2022-01-17 23:36:46 +00:00
|
|
|
when:
|
|
|
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
|
|
event: push
|
2023-10-23 08:08:48 +00:00
|
|
|
path: *when_path
|
2022-01-17 23:36:46 +00:00
|
|
|
|
2022-01-31 14:50:58 +00:00
|
|
|
publish-release-branch-cli:
|
|
|
|
group: docker
|
2023-11-01 14:25:48 +00:00
|
|
|
image: *buildx_plugin
|
2022-01-31 14:50:58 +00:00
|
|
|
settings:
|
2023-07-31 02:26:27 +00:00
|
|
|
repo: *publish_repos_cli
|
2022-01-31 14:50:58 +00:00
|
|
|
dockerfile: docker/Dockerfile.cli.multiarch
|
2022-08-31 14:27:06 +00:00
|
|
|
platforms: *platforms_release
|
2022-01-31 14:50:58 +00:00
|
|
|
tag: ${CI_COMMIT_BRANCH##release/}
|
2023-07-31 02:26:27 +00:00
|
|
|
logins: *publish_logins
|
2023-08-18 14:39:18 +00:00
|
|
|
build_args: *build_args
|
2022-01-31 14:50:58 +00:00
|
|
|
when:
|
|
|
|
branch: release/*
|
|
|
|
event: push
|
2023-10-23 08:08:48 +00:00
|
|
|
path: *when_path
|
2022-01-31 14:50:58 +00:00
|
|
|
|
|
|
|
publish-release-branch-cli-alpine:
|
|
|
|
group: docker
|
2023-11-01 14:25:48 +00:00
|
|
|
image: *buildx_plugin
|
2022-01-31 14:50:58 +00:00
|
|
|
settings:
|
2023-07-31 02:26:27 +00:00
|
|
|
repo: *publish_repos_cli
|
2022-01-31 14:50:58 +00:00
|
|
|
dockerfile: docker/Dockerfile.cli.alpine.multiarch
|
2022-08-31 14:27:06 +00:00
|
|
|
platforms: *platforms_alpine
|
2022-01-31 14:50:58 +00:00
|
|
|
tag: ${CI_COMMIT_BRANCH##release/}
|
2023-07-31 02:26:27 +00:00
|
|
|
logins: *publish_logins
|
2023-08-18 14:39:18 +00:00
|
|
|
build_args: *build_args
|
2022-01-31 14:50:58 +00:00
|
|
|
when:
|
|
|
|
branch: release/*
|
|
|
|
event: push
|
2023-10-23 08:08:48 +00:00
|
|
|
path: *when_path
|
2022-01-31 14:50:58 +00:00
|
|
|
|
2022-01-17 23:36:46 +00:00
|
|
|
release-cli:
|
|
|
|
group: docker
|
2023-11-01 14:25:48 +00:00
|
|
|
image: *buildx_plugin
|
2022-01-17 23:36:46 +00:00
|
|
|
settings:
|
2023-07-31 02:26:27 +00:00
|
|
|
repo: *publish_repos_cli
|
2022-01-17 23:36:46 +00:00
|
|
|
dockerfile: docker/Dockerfile.cli.multiarch
|
2022-08-31 14:27:06 +00:00
|
|
|
platforms: *platforms_release
|
2022-01-31 14:50:58 +00:00
|
|
|
# remove 'latest' on older version branches to avoid accidental downgrade
|
2023-10-24 12:42:05 +00:00
|
|
|
tag: [latest, '${CI_COMMIT_TAG}']
|
2023-07-31 02:26:27 +00:00
|
|
|
logins: *publish_logins
|
2023-08-18 14:39:18 +00:00
|
|
|
build_args: *build_args
|
2022-01-17 23:36:46 +00:00
|
|
|
when:
|
|
|
|
event: tag
|
|
|
|
|
|
|
|
release-cli-alpine:
|
|
|
|
group: docker
|
2023-11-01 14:25:48 +00:00
|
|
|
image: *buildx_plugin
|
2022-01-17 23:36:46 +00:00
|
|
|
settings:
|
2023-07-31 02:26:27 +00:00
|
|
|
repo: *publish_repos_cli
|
2022-01-17 23:36:46 +00:00
|
|
|
dockerfile: docker/Dockerfile.cli.alpine.multiarch
|
2022-08-31 14:27:06 +00:00
|
|
|
platforms: *platforms_alpine
|
2022-01-31 14:50:58 +00:00
|
|
|
# remove 'latest-alpine' on older version branches to avoid accidental downgrade
|
2023-10-24 12:42:05 +00:00
|
|
|
tag: [latest-alpine, '${CI_COMMIT_TAG}-alpine']
|
2023-07-31 02:26:27 +00:00
|
|
|
logins: *publish_logins
|
2023-08-18 14:39:18 +00:00
|
|
|
build_args: *build_args
|
2022-01-17 23:36:46 +00:00
|
|
|
when:
|
|
|
|
event: tag
|