feat(ci): Switch to Kaniko for Docker builds (no daemon, better DNS)
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
104
.woodpecker.yml
104
.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]
|
||||
|
||||
Reference in New Issue
Block a user