Skip to content
Snippets Groups Projects
Commit 5437eb2b authored by Jan Hartig's avatar Jan Hartig
Browse files

Merge branch 'hpc' into 'main'

Autobuild for HPC Container registry

See merge request !2
parents 3f4f3af9 02fed895
No related branches found
No related tags found
1 merge request!2Autobuild for HPC Container registry
build: .build_with_kaniko:
stage: build stage: build
variables: variables:
http_proxy: $http_proxy http_proxy: $http_proxy
...@@ -17,16 +17,32 @@ build: ...@@ -17,16 +17,32 @@ build:
echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag" echo "Running on branch '$CI_COMMIT_BRANCH': tag = $tag"
fi fi
- /kaniko/executor - /kaniko/executor
--cache=true --cache-copy-layers=true --cache-ttl=168h --compressed-caching=false
--context "${CI_PROJECT_DIR}" --context "${CI_PROJECT_DIR}"
--build-arg http_proxy=$http_proxy --build-arg http_proxy=$http_proxy
--build-arg https_proxy=$https_proxy --build-arg https_proxy=$https_proxy
--build-arg no_proxy=$no_proxy --build-arg no_proxy=$no_proxy
--dockerfile "${CI_PROJECT_DIR}/Dockerfile" --dockerfile "${CI_PROJECT_DIR}/Dockerfile"
--destination "$CI_REGISTRY_IMAGE:${tag}" --destination "$CI_REGISTRY_IMAGE:${tag}"
"$EXTRA_ARGS"
rules: rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
exists: exists:
- Dockerfile - Dockerfile
- if: '$CI_COMMIT_TAG =~ /^\d+\.\d+$/' - if: '$CI_COMMIT_TAG =~ /^\d+\.\d+$/'
exists: exists:
- Dockerfile - Dockerfile
\ No newline at end of file
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment