Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
typo3
CI
testing-infrastructure
Commits
d7c244b0
Commit
d7c244b0
authored
Oct 15, 2016
by
Christian Kuhn
Committed by
Christian Kuhn
Oct 16, 2016
Browse files
[TASK] Simplify Makefile
parent
b8057258
Changes
2
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
d7c244b0
...
...
@@ -5,37 +5,31 @@ PATCHLEVEL=0
FULLVERSION
=
$(MAJOR)
.
$(MINOR)
.
$(PATCHLEVEL)
SHORTVERSION
=
$(MAJOR)
.
$(MINOR)
.PHONY
:
all build_all
\
build_php56
\
tag_latest release clean clean_images
.PHONY
:
\
all
\
build
\
release
\
clean
\
clean_images
all
:
build
_all
all
:
build
build_all
:
\
build_php56
# Docker doesn't support sharing files between different Dockerfiles. -_-
# So we copy things around.
build_php56
:
build
:
rm
-rf
php56_image
cp
-pR
image php56_image
echo
system.imageVersion
=
$(FULLVERSION)
>>
php56_image/config/bamboo/bamboo-capabilities.properties
echo
final
=
1
>>
php56_image/buildconfig
docker build
-t
$(NAME)
-php56
:
$(FULLVERSION)
--rm
php56_image
docker tag
$(NAME)
-php56
:
$(FULLVERSION)
$(NAME)
-php56
:
$(SHORTVERSION)
tag_latest
:
docker tag
$(NAME)
-php56
:
$(FULLVERSION)
$(NAME)
-php56
:latest
release
:
tag_latest
release
:
@
if
!
docker images
$(NAME)
-php56
|
awk
'{ print $$2 }'
|
grep
-q
-F
$(FULLVERSION)
;
then
echo
"
$(NAME)
-php56 version
$(FULLVERSION)
is not yet built. Please run 'make build'"
;
false
;
fi
docker tag
$(NAME)
-php56
:
$(FULLVERSION)
$(NAME)
-php56
:
$(SHORTVERSION)
docker tag
$(NAME)
-php56
:
$(FULLVERSION)
$(NAME)
-php56
:latest
docker push
$(NAME)
-php56
:latest
docker push
$(NAME)
-php56
:
$(FULLVERSION)
docker push
$(NAME)
-php56
:
$(SHORTVERSION)
# @echo "*** Don't forget to create a tag. git tag rel-
$(FULLVERSION)
&&
git push origin rel-
$(FULLVERSION)
"
clean
:
rm
-rf
php56_image
clean_images
:
docker rmi
$(NAME)
-php56
:latest
$(NAME)
-php56
:
$(FULLVERSION)
||
true
docker rmi
$(NAME)
-php56
:latest
$(NAME)
-php56
:
$(SHORTVERSION)
$(NAME)
-php56
:
$(FULLVERSION)
||
true
image/finalize.sh
View file @
d7c244b0
...
...
@@ -16,9 +16,4 @@ rm -rf \
/usr/include/php/20151012/ext/apcu/
\
#
if
[[
"
$final
"
=
1
]]
;
then
rm
-rf
/pd_build
else
rm
-f
/pd_build/
{
install
,enable_repos,prepare,pups,nginx-passenger,finalize
}
.sh
rm
-f
/pd_build/
{
Dockerfile,insecure_key
*
}
fi
rm
-rf
/pd_build
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment