Skip to content
GitLab
Next
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
gitlab-runner
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
GitLab.org
gitlab-runner
Commits
d777bc42
There was a problem fetching the pipeline summary.
Commit
d777bc42
authored
7 years ago
by
Nick Thomas
Browse files
Options
Downloads
Plain Diff
Merge branch 'improvement/docker-image-id-logging' into 'master'
Don't show image's ID when it's the same as image's name Closes
#2374
See merge request
!557
parents
a3e05df8
16936ce6
No related branches found
No related tags found
1 merge request
!557
Don't show image's ID when it's the same as image's name
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
executors/docker/executor_docker.go
+12
-2
12 additions, 2 deletions
executors/docker/executor_docker.go
with
12 additions
and
2 deletions
executors/docker/executor_docker.go
+
12
−
2
View file @
d777bc42
...
...
@@ -520,6 +520,16 @@ func (s *executor) bindDevices() (err error) {
return
nil
}
func
(
s
*
executor
)
printUsedDockerImageID
(
imageName
,
imageID
,
containerType
,
containerTypeName
string
)
{
var
line
string
if
imageName
==
imageID
{
line
=
fmt
.
Sprintf
(
"Using docker image %s for %s %s..."
,
imageName
,
containerTypeName
,
containerType
)
}
else
{
line
=
fmt
.
Sprintf
(
"Using docker image %s ID=%s for %s %s..."
,
imageName
,
imageID
,
containerTypeName
,
containerType
)
}
s
.
Println
(
line
)
}
func
(
s
*
executor
)
splitServiceAndVersion
(
serviceDescription
string
)
(
service
,
version
,
imageName
string
,
linkNames
[]
string
)
{
ReferenceRegexpNoPort
:=
regexp
.
MustCompile
(
`^(.*?)(|:[0-9]+)(|/.*)$`
)
imageName
=
serviceDescription
...
...
@@ -560,7 +570,7 @@ func (s *executor) createService(service, version, image string) (*types.Contain
return
nil
,
err
}
s
.
Println
(
fmt
.
Sprintf
(
"Using d
ocker
i
mage
%s ID=%s for service %s..."
,
image
,
serviceImage
.
ID
,
service
)
)
s
.
printUsedD
ocker
I
mage
ID
(
image
,
serviceImage
.
ID
,
"
service
"
,
service
)
containerName
:=
s
.
Build
.
ProjectUniqueName
()
+
"-"
+
strings
.
Replace
(
service
,
"/"
,
"__"
,
-
1
)
...
...
@@ -704,7 +714,7 @@ func (s *executor) createContainer(containerType, imageName string, cmd []string
return
nil
,
err
}
s
.
Println
(
fmt
.
Sprintf
(
"Using d
ocker
i
mage
%s ID=%s for %s container..."
,
imageName
,
image
.
ID
,
containerType
)
)
s
.
printUsedD
ocker
I
mage
ID
(
imageName
,
image
.
ID
,
"container"
,
containerType
)
hostname
:=
s
.
Config
.
Docker
.
Hostname
if
hostname
==
""
{
...
...
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