Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Common CI Configuration
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
Common CI Configuration
Commits
21b37681
Commit
21b37681
authored
4 months ago
by
Bartek Wrona
Browse files
Options
Downloads
Patches
Plain Diff
docker build specific job templates should define git safe directory
parent
e74d7109
No related branches found
No related tags found
1 merge request
!65
Docker building job templates cleanup
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/docker_image_jobs.gitlab-ci.yml
+11
-7
11 additions, 7 deletions
templates/docker_image_jobs.gitlab-ci.yml
with
11 additions
and
7 deletions
templates/docker_image_jobs.gitlab-ci.yml
+
11
−
7
View file @
21b37681
...
@@ -6,7 +6,8 @@ variables:
...
@@ -6,7 +6,8 @@ variables:
include
:
include
:
-
local
:
templates/base.gitlab-ci.yml
-
local
:
templates/base.gitlab-ci.yml
.docker_image_builder_job_template
:
# this version does not call git since it is not present in the pure dind image
.pure_docker_image_builder_job_template
:
extends
:
.job-defaults
extends
:
.job-defaults
variables
:
variables
:
DOCKER_DRIVER
:
overlay2
DOCKER_DRIVER
:
overlay2
...
@@ -22,6 +23,15 @@ include:
...
@@ -22,6 +23,15 @@ include:
-
name
:
registry.gitlab.syncad.com/hive/common-ci-configuration/docker-dind:${DOCKER_DIND_TAG}
-
name
:
registry.gitlab.syncad.com/hive/common-ci-configuration/docker-dind:${DOCKER_DIND_TAG}
alias
:
docker
alias
:
docker
.docker_image_builder_job_template
:
extends
:
.pure_docker_image_builder_job_template
before_script
:
-
!reference
[
.pure_docker_image_builder_job_template
,
before_script
]
-
|
echo -e "\e[0Ksection_start:$(date +%s):git[collapsed=true]\r\e[0KDisabling Git directory permission check"
git config --global --add safe.directory '*'
echo -e "\e[0Ksection_end:$(date +%s):git\r\e[0K"
.docker_image_cleanup_job_template
:
.docker_image_cleanup_job_template
:
extends
:
.job-defaults
extends
:
.job-defaults
image
:
registry.gitlab.syncad.com/hive/common-ci-configuration/python-scripts:${IMAGE_REMOVER_TAG}
image
:
registry.gitlab.syncad.com/hive/common-ci-configuration/python-scripts:${IMAGE_REMOVER_TAG}
...
@@ -57,12 +67,6 @@ include:
...
@@ -57,12 +67,6 @@ include:
variables
:
variables
:
DOCKER_HUB_USER
:
$DOCKER_HUB_USER
DOCKER_HUB_USER
:
$DOCKER_HUB_USER
DOCKER_HUB_PASSWORD
:
$DOCKER_HUB_PASSWORD
DOCKER_HUB_PASSWORD
:
$DOCKER_HUB_PASSWORD
before_script
:
-
!reference
[
.docker_image_builder_job_template
,
before_script
]
-
|
echo -e "\e[0Ksection_start:$(date +%s):git[collapsed=true]\r\e[0KDisabling Git directory permission check"
git config --global --add safe.directory '*'
echo -e "\e[0Ksection_end:$(date +%s):git\r\e[0K"
rules
:
rules
:
-
if
:
'
$CI_COMMIT_TAG
&&
$CI_COMMIT_REF_PROTECTED
==
"true"'
-
if
:
'
$CI_COMMIT_TAG
&&
$CI_COMMIT_REF_PROTECTED
==
"true"'
when
:
on_success
when
:
on_success
...
...
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