Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
PMPL
Course Site
Commits
2457f385
Commit
2457f385
authored
Feb 04, 2021
by
Daya Adianto
Browse files
Fix authentication to the image registry
parent
2f4e04f6
Pipeline
#62668
failed with stages
in 5 minutes and 8 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
2457f385
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment