1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-11-30 08:06:52 +02:00
woodpecker/.woodpecker/docker.yml

537 lines
15 KiB
YAML
Raw Normal View History

when:
2023-07-25 14:08:21 +02:00
- event: [pull_request, tag]
- event: push
branch:
- ${CI_REPO_DEFAULT_BRANCH}
- release/*
- renovate/*
depends_on:
- test
- web
variables:
- &golang_image 'docker.io/golang:1.21.5'
- &node_image 'docker.io/node:21-alpine'
- &xgo_image 'docker.io/techknowlogick/xgo:go-1.21.5'
- &xgo_version 'go-1.21.2'
Update docker.io/woodpeckerci/plugin-docker-buildx Docker tag to v2.2.1 (#2883) [![Mend Renovate logo banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [docker.io/woodpeckerci/plugin-docker-buildx](https://codeberg.org/woodpecker-plugins/docker-buildx.git) | patch | `2.2.0` -> `2.2.1` | --- ### Release Notes <details> <summary>woodpecker-plugins/docker-buildx (docker.io/woodpeckerci/plugin-docker-buildx)</summary> ### [`v2.2.1`](https://codeberg.org/woodpecker-plugins/docker-buildx/releases/tag/v2.2.1) [Compare Source](https://codeberg.org/woodpecker-plugins/docker-buildx/compare/2.2.0...v2.2.1) ##### Fixes - Add `git` to image ([#&#8203;109](https://togithub.com/woodpecker-plugins/docker-buildx/issues/109)) - Fix separator for tags_file in docs ([#&#8203;107](https://togithub.com/woodpecker-plugins/docker-buildx/issues/107)) ##### Dependencies - chore(deps): update docker/buildx-bin docker tag to v0.12.0 ([#&#8203;111](https://togithub.com/woodpecker-plugins/docker-buildx/issues/111)) - chore(docker): update docker:24.0-dind docker digest to [`1dfc375`](https://togithub.com/woodpecker-plugins/docker-buildx/commit/1dfc375) ([#&#8203;106](https://togithub.com/woodpecker-plugins/docker-buildx/issues/106)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "every weekend" (UTC), Automerge - "before 4am" (UTC). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/woodpecker-ci/woodpecker). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-28 05:58:47 +02:00
- &buildx_plugin 'docker.io/woodpeckerci/plugin-docker-buildx:2.2.1'
- &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'
- &platforms_server 'linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le,linux/riscv64'
- &platforms_preview 'linux/amd64'
- &platforms_alpine 'linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le'
- &build_args 'CI_COMMIT_SHA=${CI_COMMIT_SHA},CI_COMMIT_BRANCH=${CI_COMMIT_BRANCH},CI_COMMIT_TAG=${CI_COMMIT_TAG}'
# vars used on push / tag events only
2023-10-24 14:42:05 +02:00
- publish_logins: &publish_logins # Default DockerHub login
- registry: https://index.docker.io/v1/
username: woodpeckerbot
password:
from_secret: docker_password
# Additional Quay.IO login
- registry: https://quay.io
username: 'woodpeckerci+wp_ci'
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/**'
# api source code
2023-10-24 14:42:05 +02:00
- 'server/api/**'
# go source code
2023-10-24 14:42:05 +02:00
- '**/*.go'
- 'go.*'
# schema changes
2023-10-24 14:42:05 +02:00
- 'pipeline/schema/**'
# Dockerfile changes
2023-10-24 14:42:05 +02:00
- 'docker/**'
steps:
vendor:
image: *golang_image
pull: true
commands:
- go mod vendor
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
###############
# S e r v e r #
###############
build-web:
image: *node_image
directory: web/
commands:
- corepack enable
- pnpm install --frozen-lockfile
- pnpm build
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
cross-compile-server-preview:
depends_on:
- vendor
- build-web
image: *xgo_image
pull: true
commands:
- apt update
- apt install -y tree
- make cross-compile-server
environment:
PLATFORMS: linux|amd64
TAGS: bindata sqlite sqlite_unlock_notify netgo
XGO_VERSION: *xgo_version
when:
- event: pull_request
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
- event: pull_request
path: *when_path
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
publish-server-preview:
depends_on:
- cross-compile-server-preview
image: *buildx_plugin
settings:
repo: woodpeckerci/woodpecker-server
dockerfile: docker/Dockerfile.server.multiarch
platforms: *platforms_preview
tag: pull_${CI_COMMIT_PULL_REQUEST}
2023-10-31 22:07:29 +02:00
logins: *publish_logins
when:
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
event: pull_request
publish-server-alpine-preview:
depends_on:
- cross-compile-server-preview
image: *buildx_plugin
settings:
repo: woodpeckerci/woodpecker-server
dockerfile: docker/Dockerfile.server.alpine.multiarch
platforms: *platforms_preview
tag: pull_${CI_COMMIT_PULL_REQUEST}-alpine
2023-10-31 22:07:29 +02:00
logins: *publish_logins
when:
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
event: pull_request
2023-10-31 22:07:29 +02:00
build-server:
depends_on:
- vendor
- build-web
- cross-compile-server-preview
image: *buildx_plugin
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")'
event: pull_request
path: *when_path
2023-10-31 22:07:29 +02:00
build-server-alpine:
depends_on:
- vendor
- build-web
- cross-compile-server-preview
image: *buildx_plugin
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")'
event: pull_request
path: *when_path
publish-next-server:
depends_on:
- cross-compile-server
image: *buildx_plugin
settings:
repo: *publish_repos_server
dockerfile: docker/Dockerfile.server.multiarch
platforms: *platforms_server
2023-10-24 14:42:05 +02:00
tag: [next, 'next-${CI_COMMIT_SHA:0:10}']
logins: *publish_logins
when:
branch: ${CI_REPO_DEFAULT_BRANCH}
event: push
path: *when_path
publish-next-server-alpine:
depends_on:
- cross-compile-server
image: *buildx_plugin
settings:
repo: *publish_repos_server
dockerfile: docker/Dockerfile.server.alpine.multiarch
platforms: *platforms_alpine
2023-10-24 14:42:05 +02:00
tag: [next-alpine, 'next-${CI_COMMIT_SHA:0:10}-alpine']
logins: *publish_logins
when:
branch: ${CI_REPO_DEFAULT_BRANCH}
event: push
path: *when_path
publish-release-branch-server:
depends_on:
- cross-compile-server
image: *buildx_plugin
settings:
repo: *publish_repos_server
dockerfile: docker/Dockerfile.server.multiarch
platforms: *platforms_server
tag: ${CI_COMMIT_BRANCH##release/}
logins: *publish_logins
when:
branch: release/*
event: push
path: *when_path
publish-release-branch-server-alpine:
depends_on:
- cross-compile-server
image: *buildx_plugin
settings:
repo: *publish_repos_server
dockerfile: docker/Dockerfile.server.alpine.multiarch
platforms: *platforms_alpine
tag: ${CI_COMMIT_BRANCH##release/}
logins: *publish_logins
when:
branch: release/*
event: push
path: *when_path
release-server:
depends_on:
- cross-compile-server
image: *buildx_plugin
settings:
repo: *publish_repos_server
dockerfile: docker/Dockerfile.server.multiarch
platforms: *platforms_server
# remove 'latest' on older version branches to avoid accidental downgrade
2023-10-24 14:42:05 +02:00
tag: [latest, '${CI_COMMIT_TAG}']
logins: *publish_logins
when:
event: tag
release-server-alpine:
depends_on:
- cross-compile-server
image: *buildx_plugin
settings:
repo: *publish_repos_server
dockerfile: docker/Dockerfile.server.alpine.multiarch
platforms: *platforms_alpine
# 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']
logins: *publish_logins
when:
event: tag
#############
# A g e n t #
#############
publish-agent-preview:
depends_on:
- vendor
image: *buildx_plugin
settings:
repo: woodpeckerci/woodpecker-agent
dockerfile: docker/Dockerfile.agent.multiarch
platforms: *platforms_preview
tag: pull_${CI_COMMIT_PULL_REQUEST}
build_args: *build_args
2023-10-31 22:07:29 +02:00
logins: *publish_logins
when:
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
event: pull_request
2023-10-31 22:07:29 +02:00
build-agent:
depends_on:
- vendor
image: *buildx_plugin
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")'
event: pull_request
path: *when_path
publish-next-agent:
depends_on:
- vendor
image: *buildx_plugin
settings:
repo: *publish_repos_agent
dockerfile: docker/Dockerfile.agent.multiarch
platforms: *platforms_release
2023-10-24 14:42:05 +02:00
tag: [next, 'next-${CI_COMMIT_SHA:0:10}']
logins: *publish_logins
build_args: *build_args
when:
branch: ${CI_REPO_DEFAULT_BRANCH}
event: push
path: *when_path
publish-next-agent-alpine:
depends_on:
- vendor
image: *buildx_plugin
settings:
repo: *publish_repos_agent
dockerfile: docker/Dockerfile.agent.alpine.multiarch
platforms: *platforms_alpine
2023-10-24 14:42:05 +02:00
tag: [next-alpine, 'next-${CI_COMMIT_SHA:0:10}-alpine']
logins: *publish_logins
build_args: *build_args
when:
branch: ${CI_REPO_DEFAULT_BRANCH}
event: push
path: *when_path
publish-release-branch-agent:
depends_on:
- vendor
image: *buildx_plugin
settings:
repo: *publish_repos_agent
dockerfile: docker/Dockerfile.agent.multiarch
platforms: *platforms_release
tag: ${CI_COMMIT_BRANCH##release/}
logins: *publish_logins
build_args: *build_args
when:
branch: release/*
event: push
path: *when_path
publish-release-branch-agent-alpine:
depends_on:
- vendor
image: *buildx_plugin
settings:
repo: *publish_repos_agent
dockerfile: docker/Dockerfile.agent.alpine.multiarch
platforms: *platforms_alpine
tag: ${CI_COMMIT_BRANCH##release/}
logins: *publish_logins
build_args: *build_args
when:
branch: release/*
event: push
path: *when_path
release-agent:
depends_on:
- vendor
image: *buildx_plugin
settings:
repo: *publish_repos_agent
dockerfile: docker/Dockerfile.agent.multiarch
platforms: *platforms_release
# remove 'latest' on older version branches to avoid accidental downgrade
2023-10-24 14:42:05 +02:00
tag: [latest, '${CI_COMMIT_TAG}']
logins: *publish_logins
build_args: *build_args
when:
event: tag
release-agent-alpine:
depends_on:
- vendor
image: *buildx_plugin
settings:
repo: *publish_repos_agent
dockerfile: docker/Dockerfile.agent.alpine.multiarch
platforms: *platforms_alpine
# 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']
logins: *publish_logins
build_args: *build_args
when:
event: tag
#########
# C L I #
#########
publish-cli-preview:
depends_on:
- vendor
image: *buildx_plugin
settings:
repo: woodpeckerci/woodpecker-cli
dockerfile: docker/Dockerfile.cli.multiarch
platforms: *platforms_preview
tag: pull_${CI_COMMIT_PULL_REQUEST}
build_args: *build_args
2023-10-31 22:07:29 +02:00
logins: *publish_logins
when:
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images"'
event: pull_request
2023-10-31 22:07:29 +02:00
build-cli:
depends_on:
- vendor
image: *buildx_plugin
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")'
event: pull_request
path: *when_path
publish-next-cli:
depends_on:
- vendor
image: *buildx_plugin
settings:
repo: *publish_repos_cli
dockerfile: docker/Dockerfile.cli.multiarch
platforms: *platforms_release
2023-10-24 14:42:05 +02:00
tag: [next, 'next-${CI_COMMIT_SHA:0:10}']
logins: *publish_logins
build_args: *build_args
when:
branch: ${CI_REPO_DEFAULT_BRANCH}
event: push
path: *when_path
publish-next-cli-alpine:
depends_on:
- vendor
image: *buildx_plugin
settings:
repo: *publish_repos_cli
dockerfile: docker/Dockerfile.cli.alpine.multiarch
platforms: *platforms_alpine
2023-10-24 14:42:05 +02:00
tag: [next-alpine, 'next-${CI_COMMIT_SHA:0:10}-alpine']
logins: *publish_logins
build_args: *build_args
when:
branch: ${CI_REPO_DEFAULT_BRANCH}
event: push
path: *when_path
publish-release-branch-cli:
depends_on:
- vendor
image: *buildx_plugin
settings:
repo: *publish_repos_cli
dockerfile: docker/Dockerfile.cli.multiarch
platforms: *platforms_release
tag: ${CI_COMMIT_BRANCH##release/}
logins: *publish_logins
build_args: *build_args
when:
branch: release/*
event: push
path: *when_path
publish-release-branch-cli-alpine:
depends_on:
- vendor
image: *buildx_plugin
settings:
repo: *publish_repos_cli
dockerfile: docker/Dockerfile.cli.alpine.multiarch
platforms: *platforms_alpine
tag: ${CI_COMMIT_BRANCH##release/}
logins: *publish_logins
build_args: *build_args
when:
branch: release/*
event: push
path: *when_path
release-cli:
depends_on:
- vendor
image: *buildx_plugin
settings:
repo: *publish_repos_cli
dockerfile: docker/Dockerfile.cli.multiarch
platforms: *platforms_release
# remove 'latest' on older version branches to avoid accidental downgrade
2023-10-24 14:42:05 +02:00
tag: [latest, '${CI_COMMIT_TAG}']
logins: *publish_logins
build_args: *build_args
when:
event: tag
release-cli-alpine:
depends_on:
- vendor
image: *buildx_plugin
settings:
repo: *publish_repos_cli
dockerfile: docker/Dockerfile.cli.alpine.multiarch
platforms: *platforms_alpine
# 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']
logins: *publish_logins
build_args: *build_args
when:
event: tag