diff options
| author | Martin André <m.andre@redhat.com> | 2017-04-10 10:52:44 +0200 |
|---|---|---|
| committer | Martin André <m.andre@redhat.com> | 2017-05-10 17:10:28 +0200 |
| commit | 41dc35dc3145ad8933a9bf6a5f0580a85810a317 (patch) | |
| tree | 3e523477b760f37aa052fda90fc47312becdba23 | |
| parent | 15543949b118ec30fcc1bbfc4c2f6d9188ef7664 (diff) | |
| download | kolla-41dc35dc3145ad8933a9bf6a5f0580a85810a317.tar.gz kolla-41dc35dc3145ad8933a9bf6a5f0580a85810a317.zip | |
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
| -rwxr-xr-x | kolla/image/build.py | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/kolla/image/build.py b/kolla/image/build.py index ff2409c63..5118f2723 100755 --- a/kolla/image/build.py +++ b/kolla/image/build.py @@ -419,26 +419,27 @@ class BuildTask(DockerTask): if image.status in STATUS_ERRORS: return - try: - plugins_am = make_an_archive(image.plugins, 'plugins') - except ArchivingError: - self.logger.error( - "Failed turning any plugins into a plugins archive") - return - else: - self.logger.debug( - "Turned %s plugins into plugins archive", - plugins_am) - try: - additions_am = make_an_archive(image.additions, 'additions') - except ArchivingError: - self.logger.error( - "Failed turning any additions into a additions archive") - return - else: - self.logger.debug( - "Turned %s additions into additions archive", - additions_am) + if self.conf.install_type == 'source': + try: + plugins_am = make_an_archive(image.plugins, 'plugins') + except ArchivingError: + self.logger.error( + "Failed turning any plugins into a plugins archive") + return + else: + self.logger.debug( + "Turned %s plugins into plugins archive", + plugins_am) + try: + additions_am = make_an_archive(image.additions, 'additions') + except ArchivingError: + self.logger.error( + "Failed turning any additions into a additions archive") + return + else: + self.logger.debug( + "Turned %s additions into additions archive", + additions_am) # Pull the latest image for the base distro only pull = self.conf.pull if image.parent is None else False |
