Commit Graph

35 Commits

Author SHA1 Message Date
Andreas Jaeger 56fd982f69 Retire repository
Depends-On: https://review.opendev.org/726461
Needed-By: https://review.opendev.org/726463
Change-Id: I4deefcafc286f60c1dfc64d95ce8369fe322af95
2020-05-08 21:21:16 +02:00
Monty Taylor f2a47fea64
Run an sdist before the bdist_wheel command
The hook sequencing doesn't work as well for bdist_wheel as it does for
sdist because bdist_wheel creates a build destination before setup hooks
run, but the setup hooks get run the context of the source dir, so that
the content gets generated but not in the right location.

sdist does not do a build directory, so by running an sdist first,
we cause setup hooks to get run in the correct context and before the
bdist_wheel step gets run. This means when bdist_wheel gets run, the
results of any setup hooks will be appropriately in place.

Change-Id: I5ca72b9cebcb27d7ab7b44198a98f7a8287de0b3
2018-10-12 13:46:43 -05:00
Monty Taylor f899ba2170
Add debug info about base image sha
In order to debug issues, knowing what version of a base docker image is
in use can be helpful. Grab it and print it out.

Change-Id: I741b56bf4f8f8d1edd7e40da415b26c2e3dd13d7
2018-10-12 09:27:38 -05:00
Steve Kowalik cfca55bc4e Revert "Don't store apk indexes in cache"
This causes job failures with psycopg2_binary being unable to locate
pg_config.

This reverts commit 1c04073e6c.

Change-Id: I781aa72f3fd5c1aad42d9ba740807bc34a8dcbc4
2018-09-12 15:35:09 -06:00
Paul Belanger 1c04073e6c Don't store apk indexes in cache
To help save some space in images, we can use apk --no-cache flag.

Change-Id: Ife43f43aa6493f0a85c03ec593ff040a7d06f8e7
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-08-28 15:59:57 -04:00
David Shrewsbury a1cc08f014 Implement basic image push
Pushes all images built with build-image. This requires a --prefix
option to be specified since that is the user (or organization) to
which we push and helps to identify the local images.

Change-Id: I13eee575c329deb58285f9cc913be298b43bb438
2018-08-16 17:19:29 -04:00
David Shrewsbury 221674d1b9 Clear up "tag" vs "image"
We incorrectly reference things in the code as "tags" when what we
really mean is "image". We are only using actual tagging to create
a new prefixed image name that references the original image.

This changes code references from "tag" to "image" in places it
makes sense. Also, we no longer use tagging to create the prefixed
image name, and instead only create the prefixed image and commit
over it, leaving the resulting local images looking much cleaner
(with no duplicates).

Change-Id: I6234a62d927cb9f35f8f4b731eee375f4c208870
2018-08-16 11:42:06 -04:00
Monty Taylor db532692d1
Fix configparser import for python2
Change-Id: Icdd57c970119698455d928b5f5eb42d0c8f10b40
2018-08-07 08:48:17 -05:00
Clark Boylan 7d00b4a5b1 Don't truncate sh produced logs
By default an uncaught sh exception is nicely formated and printed. This
is great except that it also truncates stdout and stderr. If you rtfs
you discover that you can override this behavior by setting the
_truncate_exc flag on commands to False.

Do this so that we can get complete process output for debugging.

Change-Id: Ibae19ac891ad7978a5bd128626adaa35a1c354e6
2018-07-20 18:30:26 -07:00
Monty Taylor a34e7f031f
Use released bindep
bindep now supports alpine, so stop installing from git.

Change-Id: I441740379fc4cad374e3e6cb85b02e706b1575cc
2018-07-17 12:40:03 -05:00
Monty Taylor 9b9c7a099d Put tmpdir chown into a try/finally
When stuff goes wrong in the images we miss chowning the tempdir back to
the original uid so we get a double exception. But it in a finally.

If only we had deterministic destructors ...

Change-Id: Ide62c5bd6eee824f40005a7628b8dba65544f428
2018-07-17 00:28:00 +00:00
Monty Taylor 19463f937d Add support for supplying alpine mirror url
In order to build images and use a local mirror, add an option which
updates the built-in alpine mirror. It puts it back at the end because
someone might otherwise use the output as a base image and it would
point to a random location.

Change-Id: I32cd19f79f1d474b0c011e39d139a78e196ce563
2018-07-17 00:27:51 +00:00
Monty Taylor ea3d7cbf2a Plumb in pypi mirror config from build host
If the build host has pypi mirror configured, we should use it inside of
the container builds. Bind-mount build-host pip config.

Change-Id: Ib1540dfe3c4172eeb8a70b29becd73a2828b3efb
2018-07-17 00:27:46 +00:00
Zuul 63ea4a33e0 Merge "Remove some left over debug logging" 2018-07-16 20:37:42 +00:00
Zuul 3eff58e407 Merge "Actually tag the actual images we make" 2018-07-16 20:37:42 +00:00
Zuul af52fe659c Merge "Fix the alpine build" 2018-07-16 20:37:40 +00:00
Zuul 199b5c1bb1 Merge "Install bindep from git source" 2018-07-13 14:21:50 +00:00
Monty Taylor 07027f1f49
Remove some left over debug logging
We want good debug logging. But we had some things from having tried to
figure out why the wheels weren't building/caching. Remove those,
they're silly.

Change-Id: Ifb661a6474b01e461303248b891e45bbee32bfc5
2018-07-12 18:35:57 -05:00
Monty Taylor bcf471e37d
Actually tag the actual images we make
Well, making an image and not tagging it is just lame, because then it's
just, well, a uuid. And nobody likes uuids.

Change-Id: If8cfd530499aa9574703ac2a95eb306bc10d9b6b
2018-07-12 18:35:57 -05:00
Monty Taylor 1f0bf4659d
Fix the alpine build
Ok. So the previous alpine patch didn't work QUITE as much as you might
want.

In fact, it didn't work even a little bit.

Update it to work.

But also, change it a little bit and allow for expressing per-image
additional dependencies in python extras. If there is an extra matching
the image name, it'll get installed into that image.

Change-Id: I9eda25829be6d2916bb131cb6bc8f0382ef44f1b
2018-07-12 18:35:53 -05:00
Monty Taylor 8fb6ffa5c6
Install bindep from git source
We'll be releasing a new bindep soon, but for now, install from source.

Change-Id: I8e4a9b4928c573f726b7e1b5d8761cb945015754
2018-07-12 16:32:31 -05:00
Zuul 94fb9c820d Merge "Switch from python:slim to python:alpine" 2018-07-12 16:36:18 +00:00
Monty Taylor f49197ffc8
Switch from python:slim to python:alpine
Alpine is smaller. Also, for our first user, Zuul, alpine already has
all the things needed from extra repos (yarn and bubblewrap) Switch to
alpine so we can keep things simple.

NOTE: This isn't going to work until we cut a new release of bindep with
the depends-on patch in it.

Depends-On: https://review.openstack.org/579056
Change-Id: I8c8a3b94b5aa562f54034825c3af871893b4bf89
2018-07-12 10:16:06 -05:00
David Shrewsbury 09f68422d3 Add test for no arguments
Add a test that no arguments to the pbrx command works.

Change-Id: If429ae03feb1a8c6bb662444c31cbbcf7ac1eece
2018-07-11 15:27:38 -04:00
Zuul 0f6b175d71 Merge "Handle no arguments" 2018-07-11 18:33:51 +00:00
David Shrewsbury ed9b3f98d2 Handle no arguments
Running 'pbrx' with no arguments is a thing folks may do. We shouldn't
throw exceptions at them in this case, but, instead, some help text.

Change-Id: Ibed0da165f062125cf298e2d9b3dce54c4b93420
2018-07-11 12:57:30 -04:00
Monty Taylor 21b5faf3e0
Add __init__.py file for pbrx/cmd
Change-Id: I1baac503234d4dc76e316222281644fd367dbd5e
2018-07-10 15:35:34 -05:00
Monty Taylor d71c79beea
Add more logging
Change-Id: Ic825dd74a797d644f2adca8091e10e5aca01da27
2018-07-10 14:41:53 -05:00
Monty Taylor d352cd7a04
Use compile profile instead of build profile
We ran in to some issues with pre-existing bindep files in OpenStack
with the 'build' profile. Change to 'compile'.

Change-Id: I02e2b350944a67cad9f6ff5e02c6367cce96b942
2018-07-09 07:59:34 -04:00
Monty Taylor 002003ee21
Rename build-containers to build-images
We're building container images, not containers.

Change-Id: Iad49f02063a0e1d884b24d9c4de9f1c94a2a74bd
2018-07-08 17:41:16 -04:00
Monty Taylor d4f6e55bd1
Add zuul jobs for gating
Turns out that without jobs defined patches don't really do much of
anything when submitted. Add some jobs.

Also, since this is a new utility that is not in use yet, and the first
use of it is on a bionic node anyway, just support python3.6.

Change-Id: I46ab534768a35329a6b9325c43ebc048ebfb368c
2018-07-08 17:41:13 -04:00
Monty Taylor 7fa0dab928
Add support for building container images from pbr source
All OpenStack pbr packages can be turned in to single-process docker
containers the same way. bindep files describe the distro-packages
needed. requirements.txt describe the requirements and setup.cfg lists
the programs that get installed.

Occasionally, like with zuul-executor from Zuul, there are depends that
don't quite fit the mold, so allow a final-stage Dockerfile override.

This uses python:slim as a base image and does not make that
configurable. That is because these are python programs, so making
containers for different base distros doesn't make any sense.
2018-04-27 16:17:33 -05:00
Monty Taylor 12d5941f35
Add install-siblings command
Extract the logic for installing sibling packages from zuul-jobs and
encapsulate it in a CLI utility.
2018-04-21 16:07:14 +02:00
Monty Taylor a380c6aa87
Add basic command line utility
It doesn't so much other than print version, but it's set up and in
place for adding commands in the next commits.
2018-04-21 16:07:10 +02:00
Monty Taylor 32b8cbaeaa
Initial Cookiecutter Commit 2018-04-04 16:58:36 -05:00