Commit graph

397 commits

Author SHA1 Message Date
Mike McLean
bf57dfca5b avoid waiting on empty task list in newRepo tasks 2015-12-04 16:04:34 -05:00
Mike McLean
2853c9b4f4 ensure fixed_params variable is defined 2015-12-04 16:04:34 -05:00
Mike McLean
c1e1f34f64 remove mutable default args in _do_target_image 2015-11-17 15:13:57 -05:00
Ian McLeod
66fdccd1b3 add mechanism for general purpose parameter passing to Image Factory
We originally added semi-generic parameter passing for OVA support and
then overloaded it for Vagrant support, before breaking that back out
as specific image types.

This change adds a fairly generic mechanism for parameter passthrough
to plugins and the base builder that does not require patching the
builder and CLI each time a new class of parameter is added to Factory.

The immediate reason for doing this is to expose the Docker plugin's
ability to set custom labels, environments and commands, but it is
likely to be useful for other things in the future.
2015-11-17 14:47:30 -05:00
Ian McLeod
ae71801f29 add support for Image Factory generation of VMWare Fusion Vagrant boxes 2015-09-11 15:47:22 -04:00
Mike McLean
a0285163b5 honor tag['extra']['mock.package_manager'] 2015-06-24 09:46:15 -04:00
Mike McLean
dee860ae44 capture mock output even if it exits immediately 2015-06-24 09:40:54 -04:00
Zbigniew Jędrzejewski-Szmek
10a75fc22f Add systemd unit file for kojid
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2015-06-07 08:14:53 -05:00
Brian Stinson
d3eee76ce7 inject the url of the install tree into the kickstart used for generating images 2015-06-06 18:02:31 -04:00
Mike McLean
1929eb320f handle symlinks in BuildMavenTask._zip_dir() 2015-06-06 17:38:45 -04:00
Pavol Babincak
9e89ebb9a4 Ran reindent.py from cpython tools on all python scripts
Citing from reindent docs:

    Change Python (.py) files to use 4-space indents and no hard tab
    characters. Also trim excess spaces and tabs from ends of lines, and
    remove empty lines at the end of files.  Also ensure the last line
    ends with a newline.

Citing from PEP 8:

    Use 4 spaces per indentation level.

    Python 2 code indented with a mixture of tabs and spaces should be
    converted to using spaces exclusively.

    Don't write string literals that rely on significant trailing
    whitespace. Such trailing whitespace is visually indistinguishable
    and some editors (or more recently, reindent.py) will trim them.

Also PyLint recommends not to have trailing whitespace on any line.
2015-05-13 16:39:53 -04:00
Jay Greguske
865f93c1e2 add vhd/vpc support 2015-05-06 15:22:02 -04:00
Mike Bonnet
6e480eed1c use the same name for repository and pluginRepository entries in settings.xml
This is required because of http://jira.codehaus.org/browse/MNG-5475
2015-05-04 12:44:09 -04:00
Ian McLeod
52a01883d6 Add "real" Vagrant format options to image building.
We originally added Vagrant support by tweaking options sent
to the existing RHEV-M and vSphere OVA generation code.  This was
a bit of a hack and resulted in confusing filenames.

This adds "vagrant-libvirt" and "vagrant-virtualbox" image types,
passes in the correct options to Image Factory and produces output
files with the conventional ".box" extension and more descriptive
and less confusing vagrant name suffixes.
2015-04-23 21:35:46 -05:00
Dennis Gilmore
b489f282be we xz compress the docker base image, make sure it is named correctly
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2015-03-27 17:20:51 -04:00
Dennis Gilmore
50c8dd5697 image tasks: only bind mount /selinux if it exists
current fedora does not have /selinux on the host if you try to bind mount
a non existant directory the mount fails.
2015-01-23 13:45:52 -06:00
Josh Boyer
82a405c794 Compress docker images with xz
Imagefactory supports gzip, bzip2, and xz compression formats.  Upstream
Docker prefers xz, so switch to using that.
2015-01-16 11:51:19 -06:00
Mike Bonnet
ab53d2deb0 update copyright 2014-10-28 23:54:21 -04:00
Mike Bonnet
26129248eb declare dependencies as pluginRepositories also, because dependencies and plugins are resolved separately (for some reason) 2014-10-28 23:54:20 -04:00
Mike Bonnet
2167fbb825 remove the resolve-plugins goal from Maven builds
The resolve-plugins goal is not often used during upstream development, and it
causes unnecessary dependencies to be downloaded and builds to take longer.
The data collected during that step hasn't been used for anything, so it is
safe to remove.  All dependencies downloaded during the build will still be
recorded after the deploy goal is completed.
2014-10-28 23:54:20 -04:00
Mike Bonnet
004a1ba450 preserve the format of parameters with no value when calling maven-build and maven-chain
-Dfoo and -Dfoo= mean different things to the JVM, so make sure the format of the parameter on the command-line is carried through to the mvn invocation.
2014-10-28 23:54:20 -04:00
Mike Bonnet
cc72bebfae include status information in the output of the chainmaven task
If a status line includes "previously built" it means an identical build already existed in the destination tag, and the build was not repeated.
2014-10-28 23:54:20 -04:00
Mike Bonnet
688f43a1c1 check for duplicates during scratch builds also 2014-10-28 23:53:48 -04:00
Mike McLean
50d5ade308 do not require rpm source layout 2014-10-28 12:30:05 -04:00
Thomas Oulevey
029177bcb0 do not assume sourcedir=chrootdir 2014-10-24 11:16:24 -04:00
Jay Greguske
483fd10509 compress rhevm ova 2014-10-23 16:10:24 -04:00
Mike McLean
8825cdaff7 older python does not understand try..except..finally 2014-10-09 16:40:11 -04:00
Ian McLeod
9c9a61a2c1 opts is not optional in the indirection handler 2014-10-09 16:40:11 -04:00
Ian McLeod
7a9bb7b5fc small fix regarding location of final image 2014-10-09 16:40:11 -04:00
Ian McLeod
ffabf5eeb1 missing var in action function arguments 2014-10-09 16:40:11 -04:00
Ian McLeod
987fb03cee Initial attempt at a koji task based on the Indirection plugin
This creates a new koji task type and CLI option called
image-build-indirection

This task builds an output image using the Image Factory "Indirection"
plugin

It takes as its input two already built images, either as explicit
task numbers of NVR and arch.  It also requires a modified TDL
file as described in the Image Factory source.

The two input images are referred to as the base_image, which contains
content to be turned into another output image, and the utility_image,
which is a full system that will be booted to do the transformation.

The TDL, or "indirection_template" describes the tasks to be performed
inside of the running base image to generate the output.

This feature has the potential to build all of the following types of
images:

Disk Image Builder disk images, built with DIB elements using DIB itself
Live ISO images created using Live Media Creator
Docker layered images built using an arbitrary Docker version and a
Docker base image already built inside of koji
2014-10-09 16:40:07 -04:00
Mike McLean
3461af8475 sanity check requested arches for image builds 2014-09-24 12:09:57 -04:00
Mike McLean
c9620cf088 don't assume newRepo tag arg is a string 2014-09-19 11:43:36 -04:00
Mathieu Bridon
689397e375 builder: Improve allowed_scms documentation in the config file
The config file tries to explain to the admin how to specify
allowed_scms, but one option (source_cmd) was missing.

This just reuses the wording of the docstring from the function parsing
this option, providing a complete documentation to admins when they read
the config file.
2014-08-15 13:55:43 -04:00
Mike McLean
be5dd7f457 Support rpm source layout (SPECS and SOURCES dirs) when building srpms from
source control.

Also adds a new support_rpm_source_layout option to kojid to control this
behavior.
2014-08-15 13:45:19 -04:00
Dennis Gilmore
049ab0dd94 correctly call pykickstarts makeVersion 2014-08-04 05:02:08 -05:00
Jay Greguske
c1b42e0c67 add raw-xz option 2014-07-31 17:00:09 -04:00
Jay Greguske
ef2e41a672 refactor do_images 2014-07-31 17:00:09 -04:00
Jay Greguske
440ec22696 refactor image-build handlers in kojid 2014-07-31 17:00:09 -04:00
Mike McLean
bac5601bf8 Revert "image: support xz compressed raw files"
This reverts commit 1cbc534d89.
2014-07-31 17:00:09 -04:00
Dennis Gilmore
1cbc534d89 image: support xz compressed raw files
as we publish the raw files on the mirrors we want to be able to request
xz compressed versions of theraw image.

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2014-06-13 12:57:24 -05:00
Mike Bonnet
fb325c7936 ChainMavenTask: compare the task deps when checking for duplicate builds 2014-06-13 12:51:09 -04:00
Mike Bonnet
5f2cf2b8df provide the list of active subtasks to wait on in ChainMavenTask.handler(), to avoid unnecessary updates in taskSetwait() 2014-06-13 11:23:38 -04:00
Mike Bonnet
af29196d0f support wrapper-rpm builds in maven-chain 2014-06-13 11:23:38 -04:00
Mike Bonnet
34f4a42050 don't include dependencies when looking for duplicate builds 2014-06-13 11:23:38 -04:00
Mike Bonnet
a4d67a5cd5 support -SNAPSHOT versions in scratch builds, explicitly reject them in non-scratch builds 2014-06-13 11:23:38 -04:00
Mike Bonnet
e626fca4d9 support running a sequence of Maven builds in dependency order
The new "koji chainmaven" command allows Maven builds to be run in depdencency order,
without needing to wait for repo regens.  A config file specifies the parameters and
dependencies for each build in the sequence.  Each build is launched as soon as all
dependent builds are complete, and is able to reference the output of all of its
dependencies.  If the build source URL and parameters match the latest build of the
same package in the destination tag, the build will not be re-run.
2014-06-13 11:23:37 -04:00
Mike Bonnet
cdbd8dc63f upload all Maven output to the hub 2014-06-13 11:23:37 -04:00
Dennis Gilmore
d3d17baea0 move workdir from /tmp/koji/ to /var/tmp/koji/
moving the workdir is needed as /tmp can be quite small with /tmp on tmpfs

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2014-06-11 15:23:54 -04:00
Mike McLean
28386ee4d3 tell mock target=noarch when building srpms 2014-05-15 09:51:34 -04:00