Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Dockerfiles
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Picasoft
Technique
Dockerfiles
Commits
81356ea2
Verified
Commit
81356ea2
authored
4 years ago
by
Quentin Duchemin
Browse files
Options
Downloads
Patches
Plain Diff
[CI] Proper get of image name when image is used multiple times in Docker Compose
parent
39740fb8
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
get-modified-image.sh
+8
-1
8 additions, 1 deletion
get-modified-image.sh
with
8 additions
and
1 deletion
get-modified-image.sh
+
8
−
1
View file @
81356ea2
...
...
@@ -14,11 +14,18 @@ do
;;
esac
done
if
[
"
$RES
"
=
""
]
;
then
echo
"Error : no folder starting by pica or meta modified in last commit."
echo
"Please check README.md for further understanding."
exit
1
;
fi
echo
"export MODIFIED_IMAGE=
${
RES
}
"
>
variables
echo
"Using modified folder :
$RES
"
# Image name with wanted registry and tag, fetched from Docker Compose
RES
=
$(
cat
$RES
/docker-compose.yml |
grep
$RES
: |
cut
-d
':'
-f2-
|
cut
-d
'/'
-f2-
|
tr
-d
' '
)
RES
=
$(
cat
$RES
/docker-compose.yml |
grep
$RES
: |
cut
-d
':'
-f2-
|
cut
-d
'/'
-f2-
|
tr
-d
' '
|
head
-n
1
)
if
[
"
$RES
"
=
""
]
;
then
echo
"Error : no reference to
$RES
found in docker-compose.yml."
echo
"Please check the repository README : the name of the folder must be the same as name of the image."
...
...
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