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