Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
whisper-webvtt-transcriber
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Container registry
Model registry
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
Jan Hartig
whisper-webvtt-transcriber
Commits
afd89ac5
Commit
afd89ac5
authored
2 years ago
by
Jan Hartig
Browse files
Options
Downloads
Patches
Plain Diff
Better kaniko build caching
parent
5437eb2b
No related branches found
No related tags found
1 merge request
!3
Resolve "Better Caching"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+8
-21
8 additions, 21 deletions
.gitlab-ci.yml
with
8 additions
and
21 deletions
.gitlab-ci.yml
+
8
−
21
View file @
afd89ac5
.
build_with_kaniko
:
build_with_kaniko
:
stage
:
build
variables
:
http_proxy
:
$http_proxy
https_proxy
:
$https_proxy
no_proxy
:
$no_proxy
image
:
name
:
gcr.io/kaniko-project/executor:v1.9.0-debug
entrypoint
:
[
"
"
]
script
:
-
echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(echo -n $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD | base64 -w 0)\"},\"$HARBOR_REGISTRY\":{\"auth\":\"$(echo -n $HARBOR_REGISTRY_USER:$HARBOR_REGISTRY_PASSWORD | base64 -w 0)\"}}}" > /kaniko/.docker/config.json
-
|
if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then
tag="latest"
...
...
@@ -17,14 +14,18 @@
echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag"
fi
-
/kaniko/executor
--cache=true --cache-copy-layers=true --cache-ttl=168h --compressed-caching=false
--cache=true
--cache-copy-layers=true
--compressed-caching=false
--cache-repo "$CI_REGISTRY_IMAGE/cache"
--registry-certificate=$HARBOR_REGISTRY=$HARBOR_CERT
--context "${CI_PROJECT_DIR}"
--build-arg http_proxy=$http_proxy
--build-arg https_proxy=$https_proxy
--build-arg no_proxy=$no_proxy
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
--destination "$CI_REGISTRY_IMAGE:${tag}"
"$EXTRA_ARGS
"
--destination "$HARBOR_REGISTRY_IMAGE:${tag}
"
rules
:
-
if
:
$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
exists
:
...
...
@@ -32,17 +33,3 @@
-
if
:
'
$CI_COMMIT_TAG
=~
/^\d+\.\d+$/'
exists
:
-
Dockerfile
build-for-gitlab-project-registry
:
extends
:
.build_with_kaniko
environment
:
# Since there are no CI CD Variables with this scope, the project defaults are used to push to this projects docker registry
name
:
push-to-gitlab-project-registry
build-for-hpc-harbor
:
extends
:
.build_with_kaniko
stage
:
build
# This causes CI CD Variables to be taken from GitLab Project definition for variable scope "push-to-hpc-harbor",
# which overrides CI_REGISTRY, CI_REGISTRY_IMAGE, CI_REGISTRY_USER and CI_REGISTRY_PASSWORD
environment
:
name
:
push-to-hpc-harbor
\ No newline at end of file
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