Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
varac-home-assistant
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
varac-projects
varac-home-assistant
Commits
cdcf71b6
Verified
Commit
cdcf71b6
authored
3 years ago
by
Varac
Browse files
Options
Downloads
Patches
Plain Diff
Fix image tag
parent
c098f935
No related branches found
No related tags found
No related merge requests found
Pipeline
#75774
passed
3 years ago
Stage: build
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+2
-1
2 additions, 1 deletion
.gitlab-ci.yml
.kaniko.yaml
+31
-0
31 additions, 0 deletions
.kaniko.yaml
with
33 additions
and
1 deletion
.gitlab-ci.yml
+
2
−
1
View file @
cdcf71b6
include
:
-
remote
:
https://open.greenhost.net/stackspin/stackspin/raw/main/.gitlab/ci_templates/kaniko.yml
# - remote: https://open.greenhost.net/stackspin/stackspin/raw/main/.gitlab/ci_templates/kaniko.yml
-
.kaniko.yaml
build
:
stage
:
build
...
...
This diff is collapsed.
Click to expand it.
.kaniko.yaml
0 → 100644
+
31
−
0
View file @
cdcf71b6
# Optional environment variables:
#
# - KANIKO_BUILD_IMAGENAME: Build/target image name.
# If empty, image URL will be the root of the gitlab project path, i.e.
# `open.greenhost.net:4567/GROUP/PROJECT:TAG
# Is set, images will be named like
# `open.greenhost.net:4567/GROUP/PROJECT/KANIKO_BUILD_IMAGENAME:TAG
#
# - KANIKO_CONTEXT: The subdir which holds the Dockerfile, leave unset if
# the Dockerfile is located at root level of the project.
#
# - KANIKO_ADDITIONAL_ARGS: This variable allows you to pass in ARG values that
# are used at build time. Similarly to Docker you can specify multiple arguments
# using the format `--build-arg NAME=VALUE` as many times as you need.
#
# - KANIKO_TAG: Allows to override the name of the resulting image tag
.kaniko_build
:
stage
:
build
image
:
# We need a shell to provide the registry credentials, so we need to use the
# kaniko debug image (https://github.com/GoogleContainerTools/kaniko#debug-image)
name
:
gcr.io/kaniko-project/executor:v1.6.0-debug
entrypoint
:
[
"
"
]
script
:
-
mkdir -p /kaniko/.docker/
-
echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
-
if [ -n "${KANIKO_BUILD_IMAGENAME}" ]; then export IMAGENAME="/${KANIKO_BUILD_IMAGENAME}"; fi
# Convert tag according to docker standards (https://docs.docker.com/engine/reference/commandline/tag/#extended-description)
-
if [ -n "${KANIKO_TAG}" ]; then export TAG="${KANIKO_TAG}"; else TAG="$(echo "${CI_COMMIT_REF_NAME}" | sed 's/[^a-zA-Z0-9.-_]/-/g' | cut -c -128 )"; fi
-
/kaniko/executor --cache=true --context ${CI_PROJECT_DIR}/${KANIKO_CONTEXT:-.} --dockerfile ${CI_PROJECT_DIR}/${KANIKO_CONTEXT:-.}/Dockerfile --destination ${CI_REGISTRY_IMAGE}${IMAGENAME}:${TAG} ${KANIKO_ADDITIONAL_ARGS}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment