mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-22 01:41:02 +00:00
use yaml alias and adjust build targets for docker images (#1143)
- use yaml alias for plaftorms settings - add linux/s390x for agent/cli release - add linux/riscv64 - remove darwin as mac use linux in hypervisor for docker
This commit is contained in:
parent
4e38a55c31
commit
65587e3e30
2 changed files with 30 additions and 24 deletions
|
@ -7,10 +7,15 @@ variables:
|
|||
- &node_image 'node:16-alpine'
|
||||
- &xgo_image 'techknowlogick/xgo:go-1.18.x'
|
||||
- &xgo_version 'go-1.18.x'
|
||||
- &platforms_release 'linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/386,linux/amd64,linux/ppc64le,linux/riscv64,linux/s390x,windows/amd64,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/arm/v6,linux/arm64/v8,linux/amd64,linux/riscv64,windows/amd64'
|
||||
- &platforms_alpine 'linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le'
|
||||
|
||||
pipeline:
|
||||
vendor:
|
||||
image: *golang_image
|
||||
pull: true
|
||||
commands:
|
||||
- go mod vendor
|
||||
|
||||
|
@ -26,12 +31,13 @@ pipeline:
|
|||
|
||||
cross-compile-server:
|
||||
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
|
||||
PLATFORMS: linux|arm/v7;linux|arm64/v8;linux|amd64;linux|ppc64le;linux|riscv64
|
||||
TAGS: bindata sqlite sqlite_unlock_notify
|
||||
XGO_VERSION: *xgo_version
|
||||
|
||||
|
@ -42,7 +48,7 @@ pipeline:
|
|||
settings:
|
||||
repo: woodpeckerci/woodpecker-server
|
||||
dockerfile: docker/Dockerfile.server.multiarch
|
||||
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
||||
platforms: *platforms_server
|
||||
tag: pull_${CI_COMMIT_PULL_REQUEST}
|
||||
when:
|
||||
event: pull_request
|
||||
|
@ -54,7 +60,7 @@ pipeline:
|
|||
settings:
|
||||
repo: woodpeckerci/woodpecker-server
|
||||
dockerfile: docker/Dockerfile.server.alpine.multiarch
|
||||
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
||||
platforms: *platforms_alpine
|
||||
tag: pull_${CI_COMMIT_PULL_REQUEST}-alpine
|
||||
when:
|
||||
event: pull_request
|
||||
|
@ -66,7 +72,7 @@ pipeline:
|
|||
settings:
|
||||
repo: woodpeckerci/woodpecker-server
|
||||
dockerfile: docker/Dockerfile.server.multiarch
|
||||
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
||||
platforms: *platforms_server
|
||||
tag: next
|
||||
when:
|
||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||
|
@ -79,7 +85,7 @@ pipeline:
|
|||
settings:
|
||||
repo: woodpeckerci/woodpecker-server
|
||||
dockerfile: docker/Dockerfile.server.alpine.multiarch
|
||||
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
||||
platforms: *platforms_alpine
|
||||
tag: next-alpine
|
||||
when:
|
||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||
|
@ -92,7 +98,7 @@ pipeline:
|
|||
settings:
|
||||
repo: woodpeckerci/woodpecker-server
|
||||
dockerfile: docker/Dockerfile.server.multiarch
|
||||
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
||||
platforms: *platforms_server
|
||||
tag: ${CI_COMMIT_BRANCH##release/}
|
||||
when:
|
||||
branch: release/*
|
||||
|
@ -105,7 +111,7 @@ pipeline:
|
|||
settings:
|
||||
repo: woodpeckerci/woodpecker-server
|
||||
dockerfile: docker/Dockerfile.server.alpine.multiarch
|
||||
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
||||
platforms: *platforms_alpine
|
||||
tag: ${CI_COMMIT_BRANCH##release/}
|
||||
when:
|
||||
branch: release/*
|
||||
|
@ -118,7 +124,7 @@ pipeline:
|
|||
settings:
|
||||
repo: woodpeckerci/woodpecker-server
|
||||
dockerfile: docker/Dockerfile.server.multiarch
|
||||
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
||||
platforms: *platforms_server
|
||||
# remove 'latest' on older version branches to avoid accidental downgrade
|
||||
tag: [latest, "${CI_COMMIT_TAG}"]
|
||||
when:
|
||||
|
@ -131,7 +137,7 @@ pipeline:
|
|||
settings:
|
||||
repo: woodpeckerci/woodpecker-server
|
||||
dockerfile: docker/Dockerfile.server.alpine.multiarch
|
||||
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
||||
platforms: *platforms_alpine
|
||||
# remove 'latest-alpine' on older version branches to avoid accidental downgrade
|
||||
tag: [latest-alpine, "${CI_COMMIT_TAG}-alpine"]
|
||||
when:
|
||||
|
@ -148,7 +154,7 @@ pipeline:
|
|||
settings:
|
||||
repo: woodpeckerci/woodpecker-agent
|
||||
dockerfile: docker/Dockerfile.agent.multiarch
|
||||
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le,windows/amd64,darwin/amd64,darwin/arm64
|
||||
platforms: *platforms_preview
|
||||
tag: pull_${CI_COMMIT_PULL_REQUEST}
|
||||
when:
|
||||
event: pull_request
|
||||
|
@ -160,7 +166,7 @@ pipeline:
|
|||
settings:
|
||||
repo: woodpeckerci/woodpecker-agent
|
||||
dockerfile: docker/Dockerfile.agent.multiarch
|
||||
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le,windows/amd64,darwin/amd64,darwin/arm64,freebsd/arm64,freebsd/amd64,openbsd/arm64,openbsd/amd64
|
||||
platforms: *platforms_release
|
||||
tag: next
|
||||
when:
|
||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||
|
@ -173,7 +179,7 @@ pipeline:
|
|||
settings:
|
||||
repo: woodpeckerci/woodpecker-agent
|
||||
dockerfile: docker/Dockerfile.agent.alpine.multiarch
|
||||
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
||||
platforms: *platforms_alpine
|
||||
tag: next-alpine
|
||||
when:
|
||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||
|
@ -186,7 +192,7 @@ pipeline:
|
|||
settings:
|
||||
repo: woodpeckerci/woodpecker-agent
|
||||
dockerfile: docker/Dockerfile.agent.multiarch
|
||||
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le,windows/amd64,darwin/amd64,darwin/arm64,freebsd/arm64,freebsd/amd64,openbsd/arm64,openbsd/amd64
|
||||
platforms: *platforms_release
|
||||
tag: ${CI_COMMIT_BRANCH##release/}
|
||||
when:
|
||||
branch: release/*
|
||||
|
@ -199,7 +205,7 @@ pipeline:
|
|||
settings:
|
||||
repo: woodpeckerci/woodpecker-agent
|
||||
dockerfile: docker/Dockerfile.agent.alpine.multiarch
|
||||
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
||||
platforms: *platforms_alpine
|
||||
tag: ${CI_COMMIT_BRANCH##release/}
|
||||
when:
|
||||
branch: release/*
|
||||
|
@ -212,7 +218,7 @@ pipeline:
|
|||
settings:
|
||||
repo: woodpeckerci/woodpecker-agent
|
||||
dockerfile: docker/Dockerfile.agent.multiarch
|
||||
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le,windows/amd64,darwin/amd64,darwin/arm64,freebsd/arm64,freebsd/amd64,openbsd/arm64,openbsd/amd64
|
||||
platforms: *platforms_release
|
||||
# remove 'latest' on older version branches to avoid accidental downgrade
|
||||
tag: [latest, "${CI_COMMIT_TAG}"]
|
||||
when:
|
||||
|
@ -225,7 +231,7 @@ pipeline:
|
|||
settings:
|
||||
repo: woodpeckerci/woodpecker-agent
|
||||
dockerfile: docker/Dockerfile.agent.alpine.multiarch
|
||||
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
||||
platforms: *platforms_alpine
|
||||
# remove 'latest-alpine' on older version branches to avoid accidental downgrade
|
||||
tag: [latest-alpine, "${CI_COMMIT_TAG}-alpine"]
|
||||
when:
|
||||
|
@ -242,7 +248,7 @@ pipeline:
|
|||
settings:
|
||||
repo: woodpeckerci/woodpecker-cli
|
||||
dockerfile: docker/Dockerfile.cli.multiarch
|
||||
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le,windows/amd64,darwin/amd64,darwin/arm64
|
||||
platforms: *platforms_preview
|
||||
tag: pull_${CI_COMMIT_PULL_REQUEST}
|
||||
when:
|
||||
event: pull_request
|
||||
|
@ -254,7 +260,7 @@ pipeline:
|
|||
settings:
|
||||
repo: woodpeckerci/woodpecker-cli
|
||||
dockerfile: docker/Dockerfile.cli.multiarch
|
||||
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le,windows/amd64,darwin/amd64,darwin/arm64,freebsd/arm64,freebsd/amd64,openbsd/arm64,openbsd/amd64
|
||||
platforms: *platforms_release
|
||||
tag: next
|
||||
when:
|
||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||
|
@ -267,7 +273,7 @@ pipeline:
|
|||
settings:
|
||||
repo: woodpeckerci/woodpecker-cli
|
||||
dockerfile: docker/Dockerfile.cli.alpine.multiarch
|
||||
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
||||
platforms: *platforms_alpine
|
||||
tag: next-alpine
|
||||
when:
|
||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||
|
@ -280,7 +286,7 @@ pipeline:
|
|||
settings:
|
||||
repo: woodpeckerci/woodpecker-cli
|
||||
dockerfile: docker/Dockerfile.cli.multiarch
|
||||
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le,windows/amd64,darwin/amd64,darwin/arm64,freebsd/arm64,freebsd/amd64,openbsd/arm64,openbsd/amd64
|
||||
platforms: *platforms_release
|
||||
tag: ${CI_COMMIT_BRANCH##release/}
|
||||
when:
|
||||
branch: release/*
|
||||
|
@ -293,7 +299,7 @@ pipeline:
|
|||
settings:
|
||||
repo: woodpeckerci/woodpecker-cli
|
||||
dockerfile: docker/Dockerfile.cli.alpine.multiarch
|
||||
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
||||
platforms: *platforms_alpine
|
||||
tag: ${CI_COMMIT_BRANCH##release/}
|
||||
when:
|
||||
branch: release/*
|
||||
|
@ -306,7 +312,7 @@ pipeline:
|
|||
settings:
|
||||
repo: woodpeckerci/woodpecker-cli
|
||||
dockerfile: docker/Dockerfile.cli.multiarch
|
||||
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le,windows/amd64,darwin/amd64,darwin/arm64,freebsd/arm64,freebsd/amd64,openbsd/arm64,openbsd/amd64
|
||||
platforms: *platforms_release
|
||||
# remove 'latest' on older version branches to avoid accidental downgrade
|
||||
tag: [latest, "${CI_COMMIT_TAG}"]
|
||||
when:
|
||||
|
@ -319,7 +325,7 @@ pipeline:
|
|||
settings:
|
||||
repo: woodpeckerci/woodpecker-cli
|
||||
dockerfile: docker/Dockerfile.cli.alpine.multiarch
|
||||
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
||||
platforms: *platforms_alpine
|
||||
# remove 'latest-alpine' on older version branches to avoid accidental downgrade
|
||||
tag: [latest-alpine, "${CI_COMMIT_TAG}-alpine"]
|
||||
when:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM golang:1.18 AS certs
|
||||
FROM --platform=$BUILDPLATFORM golang:1.18 AS certs
|
||||
|
||||
FROM scratch
|
||||
ARG TARGETOS TARGETARCH
|
||||
|
|
Loading…
Reference in a new issue