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