Skip [plugins,additions]-archive for binary builts
Skip the creation of `plugins-archive` or `additions-archive` for binary builds as they are only checked-out as part of the source build process. Doing so also has the nice side-effect of failing the build in case someone accidently includes an 'ADD plugins-archive /' instruction to the binary section of a Dockerfile. Change-Id: I7442fcd9677466dd0878e124402b4d4170a1ab68 Related-Bug: #1681345
This commit is contained in:
parent
15543949b1
commit
41dc35dc31
@ -419,26 +419,27 @@ class BuildTask(DockerTask):
|
|||||||
if image.status in STATUS_ERRORS:
|
if image.status in STATUS_ERRORS:
|
||||||
return
|
return
|
||||||
|
|
||||||
try:
|
if self.conf.install_type == 'source':
|
||||||
plugins_am = make_an_archive(image.plugins, 'plugins')
|
try:
|
||||||
except ArchivingError:
|
plugins_am = make_an_archive(image.plugins, 'plugins')
|
||||||
self.logger.error(
|
except ArchivingError:
|
||||||
"Failed turning any plugins into a plugins archive")
|
self.logger.error(
|
||||||
return
|
"Failed turning any plugins into a plugins archive")
|
||||||
else:
|
return
|
||||||
self.logger.debug(
|
else:
|
||||||
"Turned %s plugins into plugins archive",
|
self.logger.debug(
|
||||||
plugins_am)
|
"Turned %s plugins into plugins archive",
|
||||||
try:
|
plugins_am)
|
||||||
additions_am = make_an_archive(image.additions, 'additions')
|
try:
|
||||||
except ArchivingError:
|
additions_am = make_an_archive(image.additions, 'additions')
|
||||||
self.logger.error(
|
except ArchivingError:
|
||||||
"Failed turning any additions into a additions archive")
|
self.logger.error(
|
||||||
return
|
"Failed turning any additions into a additions archive")
|
||||||
else:
|
return
|
||||||
self.logger.debug(
|
else:
|
||||||
"Turned %s additions into additions archive",
|
self.logger.debug(
|
||||||
additions_am)
|
"Turned %s additions into additions archive",
|
||||||
|
additions_am)
|
||||||
|
|
||||||
# Pull the latest image for the base distro only
|
# Pull the latest image for the base distro only
|
||||||
pull = self.conf.pull if image.parent is None else False
|
pull = self.conf.pull if image.parent is None else False
|
||||||
|
Loading…
Reference in New Issue
Block a user