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
|
event: pull_request
|
||||||
|
|
||||||
# ===========================================
|
# ===========================================
|
||||||
# MASTER DEPLOY: Parallel Docker builds
|
# MASTER DEPLOY: Parallel Docker builds (Kaniko - no Docker daemon)
|
||||||
# NOTE: cache_from/cache_to removed due to plugin bug splitting on commas
|
|
||||||
# ===========================================
|
# ===========================================
|
||||||
docker-backend:
|
docker-backend:
|
||||||
image: plugins/docker
|
image: gcr.io/kaniko-project/executor:debug
|
||||||
settings:
|
environment:
|
||||||
registry: git.spdy.io
|
REGISTRY_USER:
|
||||||
repo: git.spdy.io/creationshop/cannaiq
|
|
||||||
tags:
|
|
||||||
- latest
|
|
||||||
- sha-${CI_COMMIT_SHA:0:8}
|
|
||||||
dockerfile: backend/Dockerfile
|
|
||||||
context: backend
|
|
||||||
username:
|
|
||||||
from_secret: registry_username
|
from_secret: registry_username
|
||||||
password:
|
REGISTRY_PASS:
|
||||||
from_secret: registry_password
|
from_secret: registry_password
|
||||||
build_args:
|
commands:
|
||||||
- APP_BUILD_VERSION=sha-${CI_COMMIT_SHA:0:8}
|
- echo "{\"auths\":{\"git.spdy.io\":{\"username\":\"$REGISTRY_USER\",\"password\":\"$REGISTRY_PASS\"}}}" > /kaniko/.docker/config.json
|
||||||
- APP_GIT_SHA=${CI_COMMIT_SHA}
|
- /kaniko/executor
|
||||||
- APP_BUILD_TIME=${CI_PIPELINE_CREATED}
|
--context=backend
|
||||||
- CONTAINER_IMAGE_TAG=sha-${CI_COMMIT_SHA:0:8}
|
--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: []
|
depends_on: []
|
||||||
when:
|
when:
|
||||||
branch: [master, develop]
|
branch: [master, develop]
|
||||||
event: push
|
event: push
|
||||||
|
|
||||||
docker-cannaiq:
|
docker-cannaiq:
|
||||||
image: plugins/docker
|
image: gcr.io/kaniko-project/executor:debug
|
||||||
settings:
|
environment:
|
||||||
registry: git.spdy.io
|
REGISTRY_USER:
|
||||||
repo: git.spdy.io/creationshop/cannaiq-frontend
|
|
||||||
tags:
|
|
||||||
- latest
|
|
||||||
- sha-${CI_COMMIT_SHA:0:8}
|
|
||||||
dockerfile: cannaiq/Dockerfile
|
|
||||||
context: cannaiq
|
|
||||||
username:
|
|
||||||
from_secret: registry_username
|
from_secret: registry_username
|
||||||
password:
|
REGISTRY_PASS:
|
||||||
from_secret: registry_password
|
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: []
|
depends_on: []
|
||||||
when:
|
when:
|
||||||
branch: [master, develop]
|
branch: [master, develop]
|
||||||
event: push
|
event: push
|
||||||
|
|
||||||
docker-findadispo:
|
docker-findadispo:
|
||||||
image: plugins/docker
|
image: gcr.io/kaniko-project/executor:debug
|
||||||
settings:
|
environment:
|
||||||
registry: git.spdy.io
|
REGISTRY_USER:
|
||||||
repo: git.spdy.io/creationshop/findadispo-frontend
|
|
||||||
tags:
|
|
||||||
- latest
|
|
||||||
- sha-${CI_COMMIT_SHA:0:8}
|
|
||||||
dockerfile: findadispo/frontend/Dockerfile
|
|
||||||
context: findadispo/frontend
|
|
||||||
username:
|
|
||||||
from_secret: registry_username
|
from_secret: registry_username
|
||||||
password:
|
REGISTRY_PASS:
|
||||||
from_secret: registry_password
|
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: []
|
depends_on: []
|
||||||
when:
|
when:
|
||||||
branch: [master, develop]
|
branch: [master, develop]
|
||||||
event: push
|
event: push
|
||||||
|
|
||||||
docker-findagram:
|
docker-findagram:
|
||||||
image: plugins/docker
|
image: gcr.io/kaniko-project/executor:debug
|
||||||
settings:
|
environment:
|
||||||
registry: git.spdy.io
|
REGISTRY_USER:
|
||||||
repo: git.spdy.io/creationshop/findagram-frontend
|
|
||||||
tags:
|
|
||||||
- latest
|
|
||||||
- sha-${CI_COMMIT_SHA:0:8}
|
|
||||||
dockerfile: findagram/frontend/Dockerfile
|
|
||||||
context: findagram/frontend
|
|
||||||
username:
|
|
||||||
from_secret: registry_username
|
from_secret: registry_username
|
||||||
password:
|
REGISTRY_PASS:
|
||||||
from_secret: registry_password
|
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: []
|
depends_on: []
|
||||||
when:
|
when:
|
||||||
branch: [master, develop]
|
branch: [master, develop]
|
||||||
|
|||||||
Reference in New Issue
Block a user