Fakultas Ilmu Komputer UI

Commit 2457f385 authored by Daya Adianto's avatar Daya Adianto
Browse files

Fix authentication to the image registry

parent 2f4e04f6
Pipeline #62668 failed with stages
in 5 minutes and 8 seconds
......@@ -46,13 +46,9 @@ build:image:
name: gcr.io/kaniko-project/executor:v1.3.0-debug
entrypoint: [""]
variables:
REGISTRY_SERVER: $CSUI_REGISTRY_SERVER
REGISTRY_USERNAME: $CSUI_REGISTRY_USERNAME
REGISTRY_PASSWORD: $CSUI_REGISTRY_PASSWORD
IMAGE_TAG: latest
before_script:
- export REGISTRY_AUTH=$(printf $REGISTRY_USERNAME:$REGISTRY_PASSWORD | base64)
- printf "{\"auths\":{\"$REGISTRY_SERVER\":{\"auth\":\"$REGISTRY_AUTH\"}}}" > /kaniko/.docker/config.json
- mv ${CSUI_REGISTRY_AUTH_FILE} /kaniko/.docker/config.json
script:
- /kaniko/executor
--cache
......@@ -65,5 +61,4 @@ build:image:
--single-snapshot
--use-new-run
after_script:
- unset REGISTRY_AUTH
- rm /kaniko/.docker/config.json
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment