Commit graph

716 commits

Author SHA1 Message Date
Alex Wood
d73ab2d661 Replace old Perl script for munging RPM release number. 2015-06-10 18:31:36 -04:00
Alex Wood
c8371dc368 Run MEAD builds via Maven chains. 2015-06-10 12:06:42 -04:00
Alex Wood
edcfaf8649 PEP8 fix. 2015-06-09 11:26:38 -04:00
Alex Wood
01c5170c29 Add python-blessings to Dockerfiles. 2015-06-09 10:52:07 -04:00
Alex Wood
c2cf9c6263 Use Python APIs for clean-up. 2015-06-08 11:00:06 -04:00
Alex Wood
9b1d1c6988 Silence spurious test output. 2015-06-04 17:50:33 -04:00
Alex Wood
53144dc63e Add colors to output and make output consistent.
- Run all error and warning messages through one standard function
- Use one standard function to abort Tito
- Consistently print errors to stderr
2015-06-04 16:58:54 -04:00
Alex Wood
d489dd9c3f Give Tito some color! 2015-06-04 15:51:09 -04:00
Alex Wood
4541f2960d Default to user ID for MEAD_SCM_USERNAME if none is defined. 2015-06-04 15:50:13 -04:00
Alex Wood
d7546fc3d9 Set the MEAD starting point to the actual subproject.
This patch fixes an issue where all builds for any given subproject were
appearing in MEAD as builds for the top-level POM.  Consequently, trying
to build and tag different subprojects did not work because Brew/Koji
saw the build as redundant since the version was populated from the
parent POM.
2015-06-03 14:10:00 -04:00
Alex Wood
a5bbde240e Merge branch 'dgoodwin-mead-scm-username' 2015-06-03 14:08:40 -04:00
Alex Wood
9ae09c6327 Avoid hardlink issues by not using --local on git clone.
The --local flag on a git clone creates hardlinks to the files under
.git/objects.  In theory this is nice, but in practice it creates the
potential for errors in environments where hardlinking isn't a
possibility (e.g. across filesystems).
2015-06-03 10:13:23 -04:00
Devan Goodwin
d7f17a7f49 Fix cheetah usage with Python 3. 2015-06-02 15:10:54 -03:00
Devan Goodwin
cae7eea46b Change mead_target to generic target.
This is a generic argument to rhpkg build commands. Eventually
should probably move to parent class.
2015-06-02 09:19:11 -03:00
Devan Goodwin
0ace2c7863 Add support for mead_target override. 2015-06-02 09:16:31 -03:00
Devan Goodwin
6878b60b3b Add support for string replacing MEAD_SCM_USERNAME in push URL. 2015-05-26 12:51:08 -03:00
Devan Goodwin
0588b096ec Remove support for very old spacewalk user config file. 2015-05-21 13:03:55 -03:00
Devan Goodwin
9bae3fb9a8 Don't use --local when cloning repo for mead builds.
This fails if /tmp is on another filesystem.
2015-05-20 15:59:22 -03:00
Alex Wood
48d0b1c489 Enable scratch builds for dist-git. 2015-05-19 14:01:55 -04:00
Alex Wood
c85f060489 Mark tito-mead-url file as protected build file. 2015-05-19 14:00:32 -04:00
Alex Wood
a7d7938fb4 Handle issue with file mode for gzip file objects. 2015-05-19 13:21:13 -04:00
Alex Wood
8427184cba Do not push to remote Mead repo on a dry run. 2015-05-19 11:33:39 -04:00
Alex Wood
2895bcf27c Set a default for the Mead push URL. 2015-05-19 11:29:35 -04:00
Alex Wood
a5b43b6b96 Fix Python 3 issues with binary versus string types.
Python 3 is very picky about not mixing binary and string data.  This
patch gets TarFixer running on both Python 2.6+ and Python 3.x.
2015-05-18 14:01:43 -04:00
Alex Wood
07d62cf24e Tell the developer which PEP8 failures were detected. 2015-05-18 14:01:43 -04:00
Alex Wood
a8514c4dda Correct Python version incompatibilities. 2015-05-18 14:01:43 -04:00
Alex Wood
06d82db0e4 Use common function to print warnings. 2015-05-18 14:01:43 -04:00
Alex Wood
6898d1157b Fix issue with TarFixer reading one too many chunks. 2015-05-18 14:01:43 -04:00
Alex Wood
3892359fa4 Allow builder arguments to be given multiple times. 2015-05-18 14:01:43 -04:00
Alex Wood
3c396c501b Correct arguments and git URL sent to rhpkg. 2015-05-18 14:01:43 -04:00
Alex Wood
9bfd856134 Mead does not have access to Brew's lookaside cache.
This means that adding a non-Maven generated tarball is of no use to
the release process.  Set Tito to fail if Maven isn't configured to
yield a tarball via the assembly plugin.
2015-05-18 14:01:43 -04:00
Alex Wood
bd9d0e698a Run Maven build in a special checkout pinned to the git ref.
Maven doesn't have any ability that I can find to run a build against a
specific git ref.  Instead, we create a temporary checkout based on the
working directory, switch that checkout to the required ref, and then
build.
2015-05-18 14:01:43 -04:00
Alex Wood
6fedf5850e Fix failing unit tests.
These tests began failing after a correction to another test.  The
other test had been patching the error_out function without unpatching
it and thus polluted the test environment.

Also reset to a known directory at the beginning of the common tests so
that we don't start in a directory that has since been unlinked.
2015-05-18 14:01:43 -04:00
Alex Wood
f98e12e866 Correct issues in Maven build process.
- Fix Maven generated tarballs.
- Correct some ordering issues with steps in the build.
2015-05-18 14:01:43 -04:00
Alex Wood
4882412610 Alter tar module to correct headers on a Maven-generated tar.
The Maven-generated tar file deviates from the spec in several places.
Fields are padded out with spaces instead of NUL bytes and the user and
group ID are left empty.

This patch alters the tar module to correct these issues and ensures a
consistent unchanging fingerprint for the archive by setting the mtime
on the files to the modified time of the commit.
2015-05-18 14:01:43 -04:00
Alex Wood
d1f0397371 Use maven deploy to generate assembly artifacts.
The Maven assembly plugin doesn't offer a way to control the
destination of the artifact from the CLI.  Boo.
2015-05-18 14:01:43 -04:00
Alex Wood
019cfd5ac7 Get Tito to manage the project version in POM files. 2015-05-18 14:01:42 -04:00
Alex Wood
4929d64567 Suppress showing a long deprecated option for tito tag. 2015-05-18 14:01:42 -04:00
Alex Wood
73c26b8c9b Handle Maven options more abstractly.
Treat Maven options as key-value pairs and add on the necessary '-D' in
code.  The maven-build command in rhpkg wants key-value format so for
that we don't have to do anything at all.
2015-05-18 14:01:42 -04:00
Alex Wood
b00cb06937 Place the pickle file used for Cheetah in the build directory. 2015-05-18 14:01:36 -04:00
Alex Wood
b0e85268c9 Add flake8 configuration. Fix style issues.
- Remove assignments to unused variables
- Rename variables shadowing builtins
- Fix all flake8 errors in tests
2015-05-18 14:00:19 -04:00
Alex Wood
ea0ea51552 Unit test new common functions and fix revealed bugs. 2015-05-18 14:00:19 -04:00
Alex Wood
53fadc2ae2 Rename tests so they have valid Python module names.
Hyphens are not allowed in module names.
2015-05-18 14:00:19 -04:00
Alex Wood
0c4238f8a4 Remove compatibility test for Python 2.4.
The Python 2.4 style of getting an exception object is forbidden by the
test_exceptions_3 test.  Something has to give, and Tito is not being
built for RHEL 5 anymore.
2015-05-15 13:07:35 -04:00
Alex Wood
f86eba599d Use a context manager for editing the meta-data file. 2015-05-15 13:07:35 -04:00
Alex Wood
fff6823de1 Sync working repository with the repository Mead will use. 2015-05-15 13:07:35 -04:00
Alex Wood
f5aef02d81 Allow for both arguments and properties to be supplied to Maven.
- Supply specfile argument to rhpkg
- Rename Mead releaser
2015-05-15 13:07:35 -04:00
Alex Wood
d8e81191e6 Build rhpkg maven-build command correctly. 2015-05-15 13:07:35 -04:00
Alex Wood
16581a2327 Correct Mead Builder issues. 2015-05-15 13:07:35 -04:00
Alex Wood
8cdb558692 Remove unused variable assignments.
Also prevent shadowing of the "file" builtin.
2015-05-15 13:07:35 -04:00