2022-07-17 18:25:56 +02:00
|
|
|
variables:
|
2024-09-05 11:53:05 +02:00
|
|
|
- &golang_image 'docker.io/golang:1.23'
|
2024-10-20 11:19:18 +02:00
|
|
|
- &node_image 'docker.io/node:23-alpine'
|
2024-11-08 01:44:50 +02:00
|
|
|
- &xgo_image 'docker.io/techknowlogick/xgo:go-1.23.x'
|
2024-10-09 15:15:24 +02:00
|
|
|
- &buildx_plugin 'docker.io/woodpeckerci/plugin-docker-buildx:5.0.0'
|
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
|
|
|
|
2024-07-14 22:59:45 +02:00
|
|
|
# cspell:words woodpeckerbot netgo
|
2024-05-24 22:35:04 +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/**'
|
2024-01-12 11:52:09 +02:00
|
|
|
# pipeline config changes
|
2024-01-12 11:53:34 +02:00
|
|
|
- '.woodpecker/docker.yaml'
|
2023-07-31 04:26:27 +02:00
|
|
|
|
2024-02-23 07:05:25 +02:00
|
|
|
when:
|
|
|
|
- event: [pull_request, tag]
|
|
|
|
- event: push
|
|
|
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
|
|
path: *when_path
|
|
|
|
|
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}
|
|
|
|
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}
|
|
|
|
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
|
2024-05-24 22:35:04 +02:00
|
|
|
TAGS: sqlite sqlite_unlock_notify netgo
|
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
|
2024-05-24 22:35:04 +02:00
|
|
|
TAGS: sqlite sqlite_unlock_notify netgo
|
2023-12-28 17:39:14 +02:00
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- ${CI_REPO_DEFAULT_BRANCH}
|
|
|
|
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
|
2024-01-12 11:48:41 +02:00
|
|
|
when: &when-preview
|
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
|
2024-01-12 11:48:41 +02:00
|
|
|
when: *when-preview
|
2023-10-20 11:27:30 +02:00
|
|
|
|
2024-01-12 11:48:41 +02:00
|
|
|
build-server-dryrun:
|
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}
|
2024-01-12 11:48:41 +02:00
|
|
|
when: &when-dryrun
|
2024-01-10 16:10:56 +02:00
|
|
|
- evaluate: 'not (CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images")'
|
|
|
|
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
|
2024-01-12 11:48:41 +02:00
|
|
|
when: &when-publish-next
|
2022-01-18 01:36:46 +02:00
|
|
|
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
|
2024-01-12 11:48:41 +02:00
|
|
|
when: *when-publish-next
|
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
|
2024-01-12 11:48:41 +02:00
|
|
|
when: &when-release
|
2022-01-18 01:36:46 +02:00
|
|
|
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
|
2024-01-12 11:48:41 +02:00
|
|
|
when: *when-release
|
2022-01-18 01:36:46 +02:00
|
|
|
|
|
|
|
#############
|
|
|
|
# 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
|
2024-01-12 11:48:41 +02:00
|
|
|
when: *when-preview
|
2023-10-20 11:27:30 +02:00
|
|
|
|
2024-01-12 11:48:41 +02:00
|
|
|
build-agent-dryrun:
|
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
|
2024-01-12 11:48:41 +02:00
|
|
|
when: *when-dryrun
|
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
|
2024-01-01 00:13:37 +02:00
|
|
|
# we also depend on cross-compile-server as we would have to hight
|
|
|
|
# ram usage otherwise
|
|
|
|
- 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_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
|
2024-01-01 00:13:37 +02:00
|
|
|
# we also depend on cross-compile-server as we would have to hight
|
|
|
|
# ram usage otherwise
|
|
|
|
- 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_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
|
2024-01-12 11:48:41 +02:00
|
|
|
when: *when-publish-next
|
2022-01-18 01:36:46 +02:00
|
|
|
|
|
|
|
release-agent:
|
2023-12-28 17:39:14 +02:00
|
|
|
depends_on:
|
|
|
|
- vendor
|
2024-01-01 00:13:37 +02:00
|
|
|
# we also depend on cross-compile-server as we would have to hight
|
|
|
|
# ram usage otherwise
|
|
|
|
- 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_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
|
2024-01-12 11:48:41 +02:00
|
|
|
when: *when-release
|
2022-01-18 01:36:46 +02:00
|
|
|
|
|
|
|
release-agent-alpine:
|
2023-12-28 17:39:14 +02:00
|
|
|
depends_on:
|
|
|
|
- vendor
|
2024-01-01 00:13:37 +02:00
|
|
|
# we also depend on cross-compile-server as we would have to hight
|
|
|
|
# ram usage otherwise
|
|
|
|
- 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_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
|
2024-01-12 11:48:41 +02:00
|
|
|
when: *when-release
|
2022-01-18 01:36:46 +02:00
|
|
|
|
|
|
|
#########
|
|
|
|
# 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
|
2024-01-12 11:48:41 +02:00
|
|
|
when: *when-preview
|
2023-10-20 11:27:30 +02:00
|
|
|
|
2024-01-12 11:48:41 +02:00
|
|
|
build-cli-dryrun:
|
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
|
2024-01-12 11:48:41 +02:00
|
|
|
when: *when-dryrun
|
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
|
2024-01-09 17:10:15 +02:00
|
|
|
# we also depend on publish-next-agent as we would have to hight
|
2024-01-01 00:13:37 +02:00
|
|
|
# ram usage otherwise
|
2024-01-09 17:10:15 +02:00
|
|
|
- publish-next-agent
|
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
|
2024-01-12 11:48:41 +02:00
|
|
|
when: *when-publish-next
|
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
|
2024-01-09 17:10:15 +02:00
|
|
|
# we also depend on publish-next-agent as we would have to hight
|
2024-01-01 00:13:37 +02:00
|
|
|
# ram usage otherwise
|
2024-01-09 17:10:15 +02:00
|
|
|
- publish-next-agent
|
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
|
2024-01-12 11:48:41 +02:00
|
|
|
when: *when-publish-next
|
2022-01-18 01:36:46 +02:00
|
|
|
|
|
|
|
release-cli:
|
2023-12-28 17:39:14 +02:00
|
|
|
depends_on:
|
|
|
|
- vendor
|
2024-01-09 17:10:15 +02:00
|
|
|
# we also depend on release-agent as we would have to hight
|
2024-01-01 00:13:37 +02:00
|
|
|
# ram usage otherwise
|
2024-01-09 17:10:15 +02:00
|
|
|
- release-agent
|
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
|
2024-01-12 11:48:41 +02:00
|
|
|
when: *when-release
|
2022-01-18 01:36:46 +02:00
|
|
|
|
|
|
|
release-cli-alpine:
|
2023-12-28 17:39:14 +02:00
|
|
|
depends_on:
|
|
|
|
- vendor
|
2024-01-09 17:10:15 +02:00
|
|
|
# we also depend on release-agent as we would have to hight
|
2024-01-01 00:13:37 +02:00
|
|
|
# ram usage otherwise
|
2024-01-09 17:10:15 +02:00
|
|
|
- release-agent
|
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
|
2024-01-12 11:48:41 +02:00
|
|
|
when: *when-release
|