fix(ci): configure kaniko auth for local registry
This commit is contained in:
parent
526432f072
commit
867035be71
1 changed files with 7 additions and 0 deletions
|
|
@ -5,7 +5,14 @@ when:
|
|||
steps:
|
||||
- name: build-and-push
|
||||
image: gcr.io/kaniko-project/executor:v1.23.2-debug
|
||||
environment:
|
||||
REGISTRY_USERNAME:
|
||||
from_secret: REGISTRY_USERNAME
|
||||
REGISTRY_PASSWORD:
|
||||
from_secret: REGISTRY_PASSWORD
|
||||
commands:
|
||||
- mkdir -p /kaniko/.docker
|
||||
- echo "{\"auths\":{\"docker-registry.registry.svc.cluster.local:5000\":{\"username\":\"${REGISTRY_USERNAME}\",\"password\":\"${REGISTRY_PASSWORD}\"}}}" > /kaniko/.docker/config.json
|
||||
- >-
|
||||
/kaniko/executor
|
||||
--context .
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue