Use full qualifyer for images (#2692)

Supersedes https://github.com/woodpecker-ci/woodpecker/pull/1659

---------

Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
Robert Kaussow 2023-11-01 15:25:48 +01:00 committed by GitHub
parent 48e4eceb0a
commit 1f7c087074
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 55 additions and 54 deletions

View file

@ -7,9 +7,9 @@ when:
event: tag event: tag
variables: variables:
- &golang_image 'golang:1.21.3' - &golang_image 'docker.io/golang:1.21.3'
- &node_image 'node:21-alpine' - &node_image 'docker.io/node:21-alpine'
- &xgo_image 'techknowlogick/xgo:go-1.21.3' - &xgo_image 'docker.io/techknowlogick/xgo:go-1.21.3'
- &xgo_version 'go-1.21.2' - &xgo_version 'go-1.21.2'
steps: steps:
@ -72,7 +72,7 @@ steps:
- cat dist/checksums.txt - cat dist/checksums.txt
release: release:
image: plugins/github-release image: docker.io/plugins/github-release
secrets: secrets:
- source: github_token - source: github_token
target: github_release_api_key target: github_release_api_key

View file

@ -10,10 +10,11 @@ depends_on:
- web - web
variables: variables:
- &golang_image 'golang:1.21.3' - &golang_image 'docker.io/golang:1.21.3'
- &node_image 'node:21-alpine' - &node_image 'docker.io/node:21-alpine'
- &xgo_image 'techknowlogick/xgo:go-1.21.3' - &xgo_image 'docker.io/techknowlogick/xgo:go-1.21.3'
- &xgo_version 'go-1.21.2' - &xgo_version 'go-1.21.2'
- &buildx_plugin 'docker.io/woodpeckerci/plugin-docker-buildx:2.2.0'
- &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_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_server 'linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le,linux/riscv64'
- &platforms_preview 'linux/amd64' - &platforms_preview 'linux/amd64'
@ -102,7 +103,7 @@ steps:
path: *when_path path: *when_path
publish-server-preview: publish-server-preview:
image: woodpeckerci/plugin-docker-buildx:2.2.0 image: *buildx_plugin
group: docker group: docker
settings: settings:
repo: woodpeckerci/woodpecker-server repo: woodpeckerci/woodpecker-server
@ -115,7 +116,7 @@ steps:
event: pull_request event: pull_request
publish-server-alpine-preview: publish-server-alpine-preview:
image: woodpeckerci/plugin-docker-buildx:2.2.0 image: *buildx_plugin
group: docker group: docker
settings: settings:
repo: woodpeckerci/woodpecker-server repo: woodpeckerci/woodpecker-server
@ -128,7 +129,7 @@ steps:
event: pull_request event: pull_request
build-server: build-server:
image: woodpeckerci/plugin-docker-buildx:2.2.0 image: *buildx_plugin
group: docker group: docker
settings: settings:
dry_run: true dry_run: true
@ -142,7 +143,7 @@ steps:
path: *when_path path: *when_path
build-server-alpine: build-server-alpine:
image: woodpeckerci/plugin-docker-buildx:2.2.0 image: *buildx_plugin
group: docker group: docker
settings: settings:
dry_run: true dry_run: true
@ -174,7 +175,7 @@ steps:
path: *when_path path: *when_path
publish-next-server: publish-next-server:
image: woodpeckerci/plugin-docker-buildx:2.2.0 image: *buildx_plugin
group: docker group: docker
settings: settings:
repo: *publish_repos_server repo: *publish_repos_server
@ -188,7 +189,7 @@ steps:
path: *when_path path: *when_path
publish-next-server-alpine: publish-next-server-alpine:
image: woodpeckerci/plugin-docker-buildx:2.2.0 image: *buildx_plugin
group: docker group: docker
settings: settings:
repo: *publish_repos_server repo: *publish_repos_server
@ -202,7 +203,7 @@ steps:
path: *when_path path: *when_path
publish-release-branch-server: publish-release-branch-server:
image: woodpeckerci/plugin-docker-buildx:2.2.0 image: *buildx_plugin
group: docker group: docker
settings: settings:
repo: *publish_repos_server repo: *publish_repos_server
@ -216,7 +217,7 @@ steps:
path: *when_path path: *when_path
publish-release-branch-server-alpine: publish-release-branch-server-alpine:
image: woodpeckerci/plugin-docker-buildx:2.2.0 image: *buildx_plugin
group: docker group: docker
settings: settings:
repo: *publish_repos_server repo: *publish_repos_server
@ -231,7 +232,7 @@ steps:
release-server: release-server:
group: docker group: docker
image: woodpeckerci/plugin-docker-buildx:2.2.0 image: *buildx_plugin
settings: settings:
repo: *publish_repos_server repo: *publish_repos_server
dockerfile: docker/Dockerfile.server.multiarch dockerfile: docker/Dockerfile.server.multiarch
@ -244,7 +245,7 @@ steps:
release-server-alpine: release-server-alpine:
group: docker group: docker
image: woodpeckerci/plugin-docker-buildx:2.2.0 image: *buildx_plugin
settings: settings:
repo: *publish_repos_server repo: *publish_repos_server
dockerfile: docker/Dockerfile.server.alpine.multiarch dockerfile: docker/Dockerfile.server.alpine.multiarch
@ -261,7 +262,7 @@ steps:
publish-agent-preview: publish-agent-preview:
group: docker group: docker
image: woodpeckerci/plugin-docker-buildx:2.2.0 image: *buildx_plugin
settings: settings:
repo: woodpeckerci/woodpecker-agent repo: woodpeckerci/woodpecker-agent
dockerfile: docker/Dockerfile.agent.multiarch dockerfile: docker/Dockerfile.agent.multiarch
@ -275,7 +276,7 @@ steps:
build-agent: build-agent:
group: docker group: docker
image: woodpeckerci/plugin-docker-buildx:2.2.0 image: *buildx_plugin
settings: settings:
dry_run: true dry_run: true
repo: woodpeckerci/woodpecker-agent repo: woodpeckerci/woodpecker-agent
@ -290,7 +291,7 @@ steps:
publish-next-agent: publish-next-agent:
group: docker group: docker
image: woodpeckerci/plugin-docker-buildx:2.2.0 image: *buildx_plugin
settings: settings:
repo: *publish_repos_agent repo: *publish_repos_agent
dockerfile: docker/Dockerfile.agent.multiarch dockerfile: docker/Dockerfile.agent.multiarch
@ -305,7 +306,7 @@ steps:
publish-next-agent-alpine: publish-next-agent-alpine:
group: docker group: docker
image: woodpeckerci/plugin-docker-buildx:2.2.0 image: *buildx_plugin
settings: settings:
repo: *publish_repos_agent repo: *publish_repos_agent
dockerfile: docker/Dockerfile.agent.alpine.multiarch dockerfile: docker/Dockerfile.agent.alpine.multiarch
@ -320,7 +321,7 @@ steps:
publish-release-branch-agent: publish-release-branch-agent:
group: docker group: docker
image: woodpeckerci/plugin-docker-buildx:2.2.0 image: *buildx_plugin
settings: settings:
repo: *publish_repos_agent repo: *publish_repos_agent
dockerfile: docker/Dockerfile.agent.multiarch dockerfile: docker/Dockerfile.agent.multiarch
@ -335,7 +336,7 @@ steps:
publish-release-branch-agent-alpine: publish-release-branch-agent-alpine:
group: docker group: docker
image: woodpeckerci/plugin-docker-buildx:2.2.0 image: *buildx_plugin
settings: settings:
repo: *publish_repos_agent repo: *publish_repos_agent
dockerfile: docker/Dockerfile.agent.alpine.multiarch dockerfile: docker/Dockerfile.agent.alpine.multiarch
@ -350,7 +351,7 @@ steps:
release-agent: release-agent:
group: docker group: docker
image: woodpeckerci/plugin-docker-buildx:2.2.0 image: *buildx_plugin
settings: settings:
repo: *publish_repos_agent repo: *publish_repos_agent
dockerfile: docker/Dockerfile.agent.multiarch dockerfile: docker/Dockerfile.agent.multiarch
@ -364,7 +365,7 @@ steps:
release-agent-alpine: release-agent-alpine:
group: docker group: docker
image: woodpeckerci/plugin-docker-buildx:2.2.0 image: *buildx_plugin
settings: settings:
repo: *publish_repos_agent repo: *publish_repos_agent
dockerfile: docker/Dockerfile.agent.alpine.multiarch dockerfile: docker/Dockerfile.agent.alpine.multiarch
@ -382,7 +383,7 @@ steps:
publish-cli-preview: publish-cli-preview:
group: docker group: docker
image: woodpeckerci/plugin-docker-buildx:2.2.0 image: *buildx_plugin
settings: settings:
repo: woodpeckerci/woodpecker-cli repo: woodpeckerci/woodpecker-cli
dockerfile: docker/Dockerfile.cli.multiarch dockerfile: docker/Dockerfile.cli.multiarch
@ -396,7 +397,7 @@ steps:
build-cli: build-cli:
group: docker group: docker
image: woodpeckerci/plugin-docker-buildx:2.2.0 image: *buildx_plugin
settings: settings:
dry_run: true dry_run: true
repo: woodpeckerci/woodpecker-cli repo: woodpeckerci/woodpecker-cli
@ -411,7 +412,7 @@ steps:
publish-next-cli: publish-next-cli:
group: docker group: docker
image: woodpeckerci/plugin-docker-buildx:2.2.0 image: *buildx_plugin
settings: settings:
repo: *publish_repos_cli repo: *publish_repos_cli
dockerfile: docker/Dockerfile.cli.multiarch dockerfile: docker/Dockerfile.cli.multiarch
@ -426,7 +427,7 @@ steps:
publish-next-cli-alpine: publish-next-cli-alpine:
group: docker group: docker
image: woodpeckerci/plugin-docker-buildx:2.2.0 image: *buildx_plugin
settings: settings:
repo: *publish_repos_cli repo: *publish_repos_cli
dockerfile: docker/Dockerfile.cli.alpine.multiarch dockerfile: docker/Dockerfile.cli.alpine.multiarch
@ -441,7 +442,7 @@ steps:
publish-release-branch-cli: publish-release-branch-cli:
group: docker group: docker
image: woodpeckerci/plugin-docker-buildx:2.2.0 image: *buildx_plugin
settings: settings:
repo: *publish_repos_cli repo: *publish_repos_cli
dockerfile: docker/Dockerfile.cli.multiarch dockerfile: docker/Dockerfile.cli.multiarch
@ -456,7 +457,7 @@ steps:
publish-release-branch-cli-alpine: publish-release-branch-cli-alpine:
group: docker group: docker
image: woodpeckerci/plugin-docker-buildx:2.2.0 image: *buildx_plugin
settings: settings:
repo: *publish_repos_cli repo: *publish_repos_cli
dockerfile: docker/Dockerfile.cli.alpine.multiarch dockerfile: docker/Dockerfile.cli.alpine.multiarch
@ -471,7 +472,7 @@ steps:
release-cli: release-cli:
group: docker group: docker
image: woodpeckerci/plugin-docker-buildx:2.2.0 image: *buildx_plugin
settings: settings:
repo: *publish_repos_cli repo: *publish_repos_cli
dockerfile: docker/Dockerfile.cli.multiarch dockerfile: docker/Dockerfile.cli.multiarch
@ -485,7 +486,7 @@ steps:
release-cli-alpine: release-cli-alpine:
group: docker group: docker
image: woodpeckerci/plugin-docker-buildx:2.2.0 image: *buildx_plugin
settings: settings:
repo: *publish_repos_cli repo: *publish_repos_cli
dockerfile: docker/Dockerfile.cli.alpine.multiarch dockerfile: docker/Dockerfile.cli.alpine.multiarch

View file

@ -14,8 +14,8 @@ when:
event: cron event: cron
variables: variables:
- &golang_image 'golang:1.21.3' - &golang_image 'docker.io/golang:1.21.3'
- &node_image 'node:21-alpine' - &node_image 'docker.io/node:21-alpine'
steps: steps:
build-cli: build-cli:
@ -38,7 +38,7 @@ steps:
- event: cron - event: cron
deploy-preview: deploy-preview:
image: woodpeckerci/plugin-surge-preview:1.2.2 image: docker.io/woodpeckerci/plugin-surge-preview:1.2.2
settings: settings:
path: 'docs/build/' path: 'docs/build/'
surge_token: surge_token:
@ -55,7 +55,7 @@ steps:
# TODO: add step to remove preview again after PR is closed (waiting for #286) # TODO: add step to remove preview again after PR is closed (waiting for #286)
deploy: deploy:
image: alpine:3.18 image: docker.io/alpine:3.18
secrets: secrets:
- BOT_PRIVATE_KEY - BOT_PRIVATE_KEY
commands: commands:

View file

@ -6,7 +6,7 @@ when:
- release/* - release/*
variables: variables:
- &golang_image 'golang:1.21.3' - &golang_image 'docker.io/golang:1.21.3'
- &when - &when
- path: &when_path # related config files - path: &when_path # related config files
- '.woodpecker/test.yml' - '.woodpecker/test.yml'
@ -63,7 +63,7 @@ steps:
when: *when when: *when
lint-editorconfig: lint-editorconfig:
image: mstruebing/editorconfig-checker:2.7.2 image: docker.io/mstruebing/editorconfig-checker:2.7.2
group: test group: test
when: when:
- event: [pull_request, tag] - event: [pull_request, tag]
@ -77,7 +77,7 @@ steps:
when: *when when: *when
prettier: prettier:
image: woodpeckerci/plugin-prettier:next image: docker.io/woodpeckerci/plugin-prettier:next
group: test group: test
when: *when when: *when
@ -124,7 +124,7 @@ steps:
codecov: codecov:
pull: true pull: true
image: woodpeckerci/plugin-codecov:2.1.2 image: docker.io/woodpeckerci/plugin-codecov:2.1.2
settings: settings:
files: files:
- agent-coverage.out - agent-coverage.out
@ -140,7 +140,7 @@ steps:
services: services:
service-postgres: service-postgres:
image: postgres:16 image: docker.io/postgres:16
ports: ['5432'] ports: ['5432']
environment: environment:
- POSTGRES_USER=postgres - POSTGRES_USER=postgres
@ -148,7 +148,7 @@ services:
when: *when when: *when
service-mysql: service-mysql:
image: mysql:8.2.0 image: docker.io/mysql:8.2.0
ports: ['3306'] ports: ['3306']
environment: environment:
- MYSQL_DATABASE=test - MYSQL_DATABASE=test

View file

@ -6,7 +6,7 @@ when:
- release/* - release/*
variables: variables:
- &node_image 'node:21-alpine' - &node_image 'docker.io/node:21-alpine'
- &when - &when
path: path:
# related config files # related config files

View file

@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM golang:1.21 AS build FROM --platform=$BUILDPLATFORM docker.io/golang:1.21 AS build
WORKDIR /src WORKDIR /src
COPY . . COPY . .
@ -7,7 +7,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg \ --mount=type=cache,target=/go/pkg \
make build-agent make build-agent
FROM alpine:3.18 FROM docker.io/alpine:3.18
RUN apk add -U --no-cache ca-certificates RUN apk add -U --no-cache ca-certificates
ENV GODEBUG=netdns=go ENV GODEBUG=netdns=go
EXPOSE 3000 EXPOSE 3000

View file

@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM golang:1.21 AS build FROM --platform=$BUILDPLATFORM docker.io/golang:1.21 AS build
WORKDIR /src WORKDIR /src
COPY . . COPY . .

View file

@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM golang:1.21 AS build FROM --platform=$BUILDPLATFORM docker.io/golang:1.21 AS build
WORKDIR /src WORKDIR /src
COPY . . COPY . .
@ -7,7 +7,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg \ --mount=type=cache,target=/go/pkg \
make build-cli make build-cli
FROM alpine:3.18 FROM docker.io/alpine:3.18
RUN apk add -U --no-cache ca-certificates RUN apk add -U --no-cache ca-certificates
ENV GODEBUG=netdns=go ENV GODEBUG=netdns=go

View file

@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM golang:1.21 AS build FROM --platform=$BUILDPLATFORM docker.io/olang:1.21 AS build
WORKDIR /src WORKDIR /src
COPY . . COPY . .

View file

@ -1,6 +1,6 @@
# docker build --rm -f docker/Dockerfile.make -t woodpecker/make:local . # docker build --rm -f docker/Dockerfile.make -t woodpecker/make:local .
FROM golang:1.21-alpine as golang_image FROM docker.io/golang:1.21-alpine as golang_image
FROM node:21-alpine FROM docker.io/node:21-alpine
RUN apk add --no-cache --update make gcc binutils-gold musl-dev && \ RUN apk add --no-cache --update make gcc binutils-gold musl-dev && \
corepack enable corepack enable

View file

@ -1,4 +1,4 @@
FROM alpine:3.18 FROM docker.io/alpine:3.18
ARG TARGETOS TARGETARCH ARG TARGETOS TARGETARCH
RUN apk add -U --no-cache ca-certificates RUN apk add -U --no-cache ca-certificates

View file

@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM golang:1.21 AS certs FROM --platform=$BUILDPLATFORM docker.io/golang:1.21 AS certs
FROM scratch FROM scratch
ARG TARGETOS TARGETARCH ARG TARGETOS TARGETARCH