From 74f813d68f4a76f592036a7612ba807d7af349ac Mon Sep 17 00:00:00 2001 From: Kelly Date: Mon, 15 Dec 2025 18:20:53 -0700 Subject: [PATCH] feat(ci): Switch to Kaniko for Docker builds (no daemon, better DNS) --- .woodpecker.yml | 104 ++++++++++++++++++++++++------------------------ 1 file changed, 53 insertions(+), 51 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 75921665..beb4a7b9 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -68,85 +68,87 @@ steps: event: pull_request # =========================================== - # MASTER DEPLOY: Parallel Docker builds - # NOTE: cache_from/cache_to removed due to plugin bug splitting on commas + # MASTER DEPLOY: Parallel Docker builds (Kaniko - no Docker daemon) # =========================================== docker-backend: - image: plugins/docker - settings: - registry: git.spdy.io - repo: git.spdy.io/creationshop/cannaiq - tags: - - latest - - sha-${CI_COMMIT_SHA:0:8} - dockerfile: backend/Dockerfile - context: backend - username: + image: gcr.io/kaniko-project/executor:debug + environment: + REGISTRY_USER: from_secret: registry_username - password: + REGISTRY_PASS: from_secret: registry_password - build_args: - - APP_BUILD_VERSION=sha-${CI_COMMIT_SHA:0:8} - - APP_GIT_SHA=${CI_COMMIT_SHA} - - APP_BUILD_TIME=${CI_PIPELINE_CREATED} - - CONTAINER_IMAGE_TAG=sha-${CI_COMMIT_SHA:0:8} + commands: + - echo "{\"auths\":{\"git.spdy.io\":{\"username\":\"$REGISTRY_USER\",\"password\":\"$REGISTRY_PASS\"}}}" > /kaniko/.docker/config.json + - /kaniko/executor + --context=backend + --dockerfile=backend/Dockerfile + --destination=git.spdy.io/creationshop/cannaiq:latest + --destination=git.spdy.io/creationshop/cannaiq:sha-${CI_COMMIT_SHA:0:8} + --build-arg=APP_BUILD_VERSION=sha-${CI_COMMIT_SHA:0:8} + --build-arg=APP_GIT_SHA=${CI_COMMIT_SHA} + --build-arg=APP_BUILD_TIME=${CI_PIPELINE_CREATED} + --build-arg=CONTAINER_IMAGE_TAG=sha-${CI_COMMIT_SHA:0:8} + --cache=true depends_on: [] when: branch: [master, develop] event: push docker-cannaiq: - image: plugins/docker - settings: - registry: git.spdy.io - repo: git.spdy.io/creationshop/cannaiq-frontend - tags: - - latest - - sha-${CI_COMMIT_SHA:0:8} - dockerfile: cannaiq/Dockerfile - context: cannaiq - username: + image: gcr.io/kaniko-project/executor:debug + environment: + REGISTRY_USER: from_secret: registry_username - password: + REGISTRY_PASS: from_secret: registry_password + commands: + - echo "{\"auths\":{\"git.spdy.io\":{\"username\":\"$REGISTRY_USER\",\"password\":\"$REGISTRY_PASS\"}}}" > /kaniko/.docker/config.json + - /kaniko/executor + --context=cannaiq + --dockerfile=cannaiq/Dockerfile + --destination=git.spdy.io/creationshop/cannaiq-frontend:latest + --destination=git.spdy.io/creationshop/cannaiq-frontend:sha-${CI_COMMIT_SHA:0:8} + --cache=true depends_on: [] when: branch: [master, develop] event: push docker-findadispo: - image: plugins/docker - settings: - registry: git.spdy.io - repo: git.spdy.io/creationshop/findadispo-frontend - tags: - - latest - - sha-${CI_COMMIT_SHA:0:8} - dockerfile: findadispo/frontend/Dockerfile - context: findadispo/frontend - username: + image: gcr.io/kaniko-project/executor:debug + environment: + REGISTRY_USER: from_secret: registry_username - password: + REGISTRY_PASS: from_secret: registry_password + commands: + - echo "{\"auths\":{\"git.spdy.io\":{\"username\":\"$REGISTRY_USER\",\"password\":\"$REGISTRY_PASS\"}}}" > /kaniko/.docker/config.json + - /kaniko/executor + --context=findadispo/frontend + --dockerfile=findadispo/frontend/Dockerfile + --destination=git.spdy.io/creationshop/findadispo-frontend:latest + --destination=git.spdy.io/creationshop/findadispo-frontend:sha-${CI_COMMIT_SHA:0:8} + --cache=true depends_on: [] when: branch: [master, develop] event: push docker-findagram: - image: plugins/docker - settings: - registry: git.spdy.io - repo: git.spdy.io/creationshop/findagram-frontend - tags: - - latest - - sha-${CI_COMMIT_SHA:0:8} - dockerfile: findagram/frontend/Dockerfile - context: findagram/frontend - username: + image: gcr.io/kaniko-project/executor:debug + environment: + REGISTRY_USER: from_secret: registry_username - password: + REGISTRY_PASS: from_secret: registry_password + commands: + - echo "{\"auths\":{\"git.spdy.io\":{\"username\":\"$REGISTRY_USER\",\"password\":\"$REGISTRY_PASS\"}}}" > /kaniko/.docker/config.json + - /kaniko/executor + --context=findagram/frontend + --dockerfile=findagram/frontend/Dockerfile + --destination=git.spdy.io/creationshop/findagram-frontend:latest + --destination=git.spdy.io/creationshop/findagram-frontend:sha-${CI_COMMIT_SHA:0:8} + --cache=true depends_on: [] when: branch: [master, develop]