1
This commit is contained in:
parent
e1ebdb3eb6
commit
40bdd6eca6
12 changed files with 366 additions and 306 deletions
|
@ -1,45 +1,56 @@
|
|||
when:
|
||||
instance: ci.kokuwa.io
|
||||
repo: woodpecker/dockerd
|
||||
event: [manual, push, pull_request]
|
||||
branch: main
|
||||
path: [.woodpecker/build.yaml, .woodpecker/test.yaml, .woodpecker/push.yaml, Dockerfile, Dockerfile.dockerignore, entrypoint.sh]
|
||||
|
||||
services:
|
||||
- name: dockerd
|
||||
image: kokuwaio/dockerd:rootless
|
||||
ports: [2375]
|
||||
privileged: true
|
||||
path: [.woodpecker/build.yaml, Dockerfile, Dockerfile.dockerignore, entrypoint.sh]
|
||||
|
||||
steps:
|
||||
build-linux:
|
||||
depends_on: [init]
|
||||
image: kokuwaio/docker-cli
|
||||
commands:
|
||||
- docker login
|
||||
- docker buildx create --platform=linux/amd64,linux/arm64 --driver=docker-container --use
|
||||
- docker buildx build .
|
||||
--push
|
||||
--tag=ci-registry.schnabel.org/kokuwaio/dockerd:$CI_PIPELINE_NUMBER
|
||||
--platform=linux/amd64,linux/arm64
|
||||
--cache-from=type=registry,ref=ci-registry.schnabel.org/cache/dockerd:refs_heads_main
|
||||
--cache-from=type=registry,ref=ci-registry.schnabel.org/cache/dockerd:$CI_COMMIT_SHA
|
||||
--cache-from=type=registry,ref=ci-registry.schnabel.org/cache/dockerd:${CI_COMMIT_REF//\//_}
|
||||
--cache-to=type=registry,ref=ci-registry.schnabel.org/cache/dockerd:$CI_COMMIT_SHA,mode=max,compression=zstd
|
||||
--cache-to=type=registry,ref=ci-registry.schnabel.org/cache/dockerd:${CI_COMMIT_REF//\//_},mode=max,compression=zstd
|
||||
--label=org.opencontainers.image.title="Docker daemon"
|
||||
--label=org.opencontainers.image.description="Docker daemon for usage in Woodpecker CI"
|
||||
--label=org.opencontainers.image.url=$CI_REPO_URL
|
||||
--label=org.opencontainers.image.documentation=$CI_REPO_URL
|
||||
--label=org.opencontainers.image.source=$CI_REPO_CLONE_URL
|
||||
--label=org.opencontainers.image.vendor=kokuwa.io
|
||||
--label=org.opencontainers.image.licenses=GPL-3.0-or-later
|
||||
|
||||
export BUILDX_EXPERIMENTAL=1
|
||||
export CI_PIPELINE_NUMBER=88
|
||||
export CI_COMMIT_SHA=123
|
||||
export CI_COMMIT_REF=refs-heads-main
|
||||
docker buildx build . \
|
||||
--push \
|
||||
--tag=ci-registry.schnabel.org/kokuwaio/dockerd:$CI_PIPELINE_NUMBER \
|
||||
--platform=linux/amd64,linux/arm64 \
|
||||
--cache-to=type=registry,ref=ci-registry.schnabel.org/cache/dockerd:${CI_COMMIT_REF//\//},mode=max,compression=zstd
|
||||
|
||||
build:
|
||||
image: kokuwaio/buildctl
|
||||
settings: &settings
|
||||
name: registry.kokuwa.io/kokuwaio/dockerd:ci-${CI_PIPELINE_NUMBER}
|
||||
auth:
|
||||
registry.kokuwa.io:
|
||||
username: {from_secret: kokuwa_io_username}
|
||||
password: {from_secret: kokuwa_io_password}
|
||||
platform: [linux/amd64, linux/arm64]
|
||||
annotation:
|
||||
org.opencontainers.image.title: Docker Daemon WoodpeckerCI Plugin
|
||||
org.opencontainers.image.description: Docker daemon for usage in WoodpeckerCI.
|
||||
org.opencontainers.image.url: $CI_REPO_URL
|
||||
org.opencontainers.image.documentation: $CI_REPO_URL/README.md
|
||||
org.opencontainers.image.source: $CI_REPO_CLONE_URL
|
||||
org.opencontainers.image.revision: $CI_COMMIT_SHA
|
||||
org.opencontainers.image.vendor: kokuwa.io
|
||||
org.opencontainers.image.licenses: EUPL-1.2
|
||||
org.opencontainers.image.ref.name: kokuwaio/dockerd
|
||||
org.opencontainers.image.version: 28.1.1
|
||||
when:
|
||||
event: pull_request
|
||||
|
||||
push:
|
||||
image: kokuwaio/buildctl
|
||||
settings:
|
||||
<<: *settings
|
||||
name:
|
||||
- registry.kokuwa.io/kokuwaio/dockerd:latest
|
||||
- registry.kokuwa.io/kokuwaio/dockerd:28.1.1
|
||||
- docker.io/kokuwaio/dockerd:latest
|
||||
- docker.io/kokuwaio/dockerd:28.1.1
|
||||
- ghcr.io/kokuwaio/dockerd:latest
|
||||
- ghcr.io/kokuwaio/dockerd:28.1.1
|
||||
auth:
|
||||
"https://index.docker.io/v1/":
|
||||
username: {from_secret: docker_io_username}
|
||||
password: {from_secret: docker_io_password}
|
||||
ghcr.io:
|
||||
username: {from_secret: ghcr_io_username}
|
||||
password: {from_secret: ghcr_io_password}
|
||||
registry.kokuwa.io:
|
||||
username: {from_secret: kokuwa_io_username}
|
||||
password: {from_secret: kokuwa_io_password}
|
||||
when:
|
||||
event: [manual, push]
|
||||
branch: main
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue