Commit graph

565 commits

Author SHA1 Message Date
Devan Goodwin
f7b6311d8c Automatic commit of package [tito] release [0.5.2-1]. 2014-05-09 13:55:36 -03:00
Devan Goodwin
373f8bcf61 Fix releaser getcwd error. 2014-05-09 13:54:21 -03:00
Devan Goodwin
cc75aa3d63 Update releasers. 2014-05-09 13:45:16 -03:00
Devan Goodwin
ed9bb820c0 Automatic commit of package [tito] release [0.5.1-1]. 2014-05-09 12:38:07 -03:00
Devan Goodwin
2a54ad3ce4 Raise error on failed run_command.
Lost this somehow in refactoring, but right now failed commands are silent.
Raise an exception and print the error details.

Restore behaviour where we can print command output on success if desired.

Fix a couple tests that were actually failing due to missing rsync dest.
2014-05-09 11:54:30 -03:00
Devan Goodwin
e3c4b269e8 Merge branch 'test-without-tag' of https://github.com/domcleal/tito into domcleal-test-without-tag
Conflicts:
	test/functional/builder_tests.py
2014-05-09 11:39:50 -03:00
Devan Goodwin
59b6b9c855 Merge pull request #122 from domcleal/scl-builder-arg
Add 'scl' builder option for software collection name
2014-05-09 11:11:37 -03:00
Devan Goodwin
dd46720860 Merge branch 'xsuchy-run_command_print' 2014-05-09 11:07:04 -03:00
Devan Goodwin
071278cfc9 Fix pep8 issues. 2014-05-09 11:06:53 -03:00
Devan Goodwin
6b9787e230 Fix print without newline for EL5. 2014-05-09 09:36:38 -03:00
Devan Goodwin
79387a4038 Merge branch 'run_command_print' of https://github.com/xsuchy/tito into xsuchy-run_command_print 2014-05-09 09:18:28 -03:00
Dominic Cleal
e3b24b15ed Allow builder to run in test mode on untagged project
Particularly useful when creating new projects and wanting to avoid
creating an initial tag, this allows `tito build --test --srpm` etc
to run without any tag.
2014-05-05 09:02:53 +01:00
Dominic Cleal
9ca849b7d9 Add 'scl' builder option for software collection name
With a general 'scl' builder option, a software collection name can be
specified irrespective of the releaser used.  RsyncReleaser's own 'scl'
option has been deprecated in favour of using 'builder.scl' in
releasers.conf.
2014-05-04 21:33:54 +01:00
Devan Goodwin
4032c3d300 Merge pull request #121 from jumanjiman/hacking
propagate docs to docker public registry
2014-04-24 15:44:25 -03:00
Devan Goodwin
7e816fef50 Merge pull request #120 from jumanjiman/wercker
use wercker instead of travis-ci to enable full test harness
2014-04-24 15:44:04 -03:00
Devan Goodwin
f554119588 Merge pull request #116 from domcleal/cleanup
Cleanup releasers + builders when interrupted
2014-04-24 15:43:01 -03:00
Devan Goodwin
3304712d00 Merge pull request #118 from venth/rpmbuild-errors
added rpmbuild output to an error raised by tito to easier the error's cause analysis
2014-04-24 15:42:27 -03:00
alfen
66baaa4bd2 added rpmbuild output to an error raised by tito to easier the error's cause analysis 2014-04-20 18:55:26 +02:00
alfen
3b8cad219b ignored virtualenv and intellij related directories 2014-04-20 18:52:34 +02:00
Paul Morgan
20c4f1b7c0 propagate docs to docker public registry
Add URL of upstream tito repo to HACKING, then
symlink HACKING as README.md in each Dockerfile dir.

Why?

If a README.md exists in same dir as Dockerfile (incl. symlink),
and it's set up as a
[trusted build](https://index.docker.io/help/docs/#trustedbuilds),
then index.docker.io automatically shows the readme on the info
page of the trusted build.
2014-04-19 21:05:15 +00:00
Paul Morgan
8aedb221bb use wercker instead of travis-ci to enable full test harness
Before this commit: We use travis-ci (ubuntu vm) to run
just the unit tests. We cannot run functional tests on
travis-ci due to lack of platform support.

After this commit: Run the full dockerized test harness on
http://wercker.com to run `hacking/runtests.sh`, which runs
all the unit and functional tests on el5, el6, and f20 to
assert supportability on all the pythons 2.4 through 3.x.

Sample test runs are at:
https://app.wercker.com/#buildstep/5346d0054daac943370042c7
https://app.wercker.com/#buildstep/5346d9914daac94337005096

At the above link...

1. Click **run the docker test suite** in browser to show log
2. Scroll all the way through to see the verbose output and
   summary at bottom.

Note: `hacking/runtests.sh` exits non-zero if any test fails
on any of the platforms.

Wercker docs are online at http://devcenter.wercker.com/#
2014-04-10 17:59:56 +00:00
Devan Goodwin
50047b5952 Merge pull request #119 from jumanjiman/oops
spec: remove dependency on GitPython
2014-04-10 14:59:04 -03:00
Paul Morgan
3da937d27b spec: remove dependency on GitPython
3ae1596923 removed GitPython
from the source, but forgot to remove the dependency from
the rpm spec file.
2014-04-10 17:55:53 +00:00
Devan Goodwin
8b964ac5e8 Merge pull request #117 from slagle/builder-arg
Update tito.8.asciidoc
2014-04-08 10:12:07 -03:00
James Slagle
f1af6f6dcf Update tito.8.asciidoc
--builder-arg is now just called --arg.
2014-04-08 09:08:44 -04:00
Dominic Cleal
0c7684ae8a Cleanup releasers + builders when interrupted
When receiving a keyboard interrupt (SIGINT) the releaser cleanup
is now called, and the builder is in turn cleaned up.
2014-04-08 08:59:22 +01:00
Miroslav Suchý
38446dca5b make run_command_print() compatible with python3 2014-04-03 15:54:47 +02:00
Miroslav Suchý
04c696111c remove unused import "commands" 2014-04-03 15:49:49 +02:00
Miroslav Suchý
4a649e7883 Revert "avoid TB for encoding in python3"
This reverts commit 886df517fa.
2014-04-03 15:48:41 +02:00
Devan Goodwin
2a39e31dad Merge pull request #113 from domcleal/quiet-package-config-warning
Change package-specific config message to debug
2014-03-24 13:30:55 -03:00
Dominic Cleal
2f11bf2f14 Change package-specific config message to debug
When this feature isn't used, the output of tito seems unnecessarily verbose.
2014-03-24 16:27:06 +00:00
Devan Goodwin
4149b01828 Automatic commit of package [tito] release [0.5.0-1]. 2014-03-24 09:23:56 -03:00
Devan Goodwin
145cdb27b8 Fix mistake in warning message for default_tagger. 2014-03-24 09:00:33 -03:00
Devan Goodwin
0ef8225dc5 Merge pull request #112 from jumanjiman/test_harness
add containerized test harness
2014-03-13 15:07:14 -03:00
Paul Morgan
361eca6195 add test harness based on docker/lxc 2014-03-13 17:56:32 +00:00
Paul Morgan
bc0abf1beb avoid TB in gitannex builder test on python3
Avoids...

Traceback (most recent call last):
  File "/home/sandbox/test/functional/build_gitannex_tests.py", line 87, in test_simple_build
    self.assertEquals(1, len(builder.sources))
nose.proxy.TypeError: TypeError: object of type 'map' has no len()
2014-03-12 19:37:39 +00:00
Paul Morgan
886df517fa avoid TB for encoding in python3
527e60ba added method `run_command_print' to provide
buffered output during long-running commands.

This causes TB in python3 due to IO encoding issues, so for now...

* use getoutput instead of run_command_print
* add TODO in run_command_print to make it compatible asap
2014-03-12 19:20:39 +00:00
Paul Morgan
ff5fd1faf7 skip git-annex tests if distro or git-annex is too old 2014-03-12 19:17:38 +00:00
Devan Goodwin
164d9dee06 Remove some dead code. 2014-03-11 12:28:21 -03:00
Devan Goodwin
78a0d98e70 Merge pull request #111 from jumanjiman/python3_alpha
alpha support for python3
2014-03-11 11:50:24 -03:00
Paul Morgan
00f2dfc84f avoid TB on python3 due to strict dict type
On python3, we need to perform a union (not addition) on
dictionary sets to avoid...

Traceback (most recent call last):
  File "/home/sandbox/test/functional/fetch_tests.py", line 95, in test_with_releaser
    self.source_filename)
  File "/home/sandbox/test/functional/fixture.py", line 103, in tito
    return CLI().main(argstring.split(' '))
  File "/home/sandbox/src/tito/cli.py", line 222, in main
    return module.main(argv)
  File "/home/sandbox/src/tito/cli.py", line 599, in main
    **kwargs)
  File "/home/sandbox/src/tito/release/main.py", line 359, in __init__
    prefix="yumrepo-", **kwargs)
  File "/home/sandbox/src/tito/release/main.py", line 238, in __init__
    auto_accept, **kwargs)
  File "/home/sandbox/src/tito/release/main.py", line 73, in __init__
    _args = config_builder_args.items() + kwargs['builder_args'].items()
nose.proxy.TypeError: TypeError: unsupported operand type(s) for +: 'dict_items' and 'dict_items'
2014-03-11 14:39:32 +00:00
Paul Morgan
bcf29ea34b avoid TB on python3 due to encoding within subprocess pipeline
subprocess.getstatusoutput can fail with utf8 UnicodeDecodeError
http://bugs.python.org/issue9922

Resolves this TB on python3, which was
caused by outputting binary data to the 'tee' command...

Traceback (most recent call last):
  File "/home/sandbox/test/functional/multiproject_tests.py", line 133, in test_build_tgz
    artifacts = tito('build --tgz')
  File "/home/sandbox/test/functional/fixture.py", line 103, in tito
    return CLI().main(argstring.split(' '))
  File "/home/sandbox/src/tito/cli.py", line 222, in main
    return module.main(argv)
  File "/home/sandbox/src/tito/cli.py", line 390, in main
    return builder.run(self.options)
  File "/home/sandbox/src/tito/builder/main.py", line 130, in run
    self.tgz()
  File "/home/sandbox/src/tito/builder/main.py", line 401, in tgz
    self._setup_sources()
  File "/home/sandbox/src/tito/builder/main.py", line 436, in _setup_sources
    os.path.join(self.rpmbuild_sourcedir, self.tgz_filename))
  File "/home/sandbox/src/tito/common.py", line 518, in create_tgz
    run_command(archive_cmd)
  File "/home/sandbox/src/tito/common.py", line 221, in run_command
    (status, output) = getstatusoutput(command)
  File "/home/sandbox/src/tito/compat.py", line 45, in getstatusoutput
    raise(err)
  File "/home/sandbox/src/tito/compat.py", line 41, in getstatusoutput
    (status, output) = subprocess.getstatusoutput(cmd)
  File "/usr/lib64/python3.3/subprocess.py", line 683, in getstatusoutput
    text = pipe.read()
  File "/usr/lib64/python3.3/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
nose.proxy.UnicodeDecodeError: UnicodeDecodeError: ascii
2014-03-11 14:38:03 +00:00
Paul Morgan
a398833e72 avoid TB on python3 due to git format string
Use RawConfigParser instead of ConfigParser to avoid...

Traceback (most recent call last):
  File "/home/sandbox/test/functional/multiproject_tests.py", line 68, in setUp
    self.create_project(TEST_PKG_1, os.path.join(self.repo_dir, 'pkg1'))
  File "/home/sandbox/test/functional/fixture.py", line 198, in create_project
    tito('tag --keep-version --debug --accept-auto-changelog')
  File "/home/sandbox/test/functional/fixture.py", line 103, in tito
    return CLI().main(argstring.split(' '))
  File "/home/sandbox/src/tito/cli.py", line 222, in main
    return module.main(argv)
  File "/home/sandbox/src/tito/cli.py", line 671, in main
    offline=self.options.offline)
  File "/home/sandbox/src/tito/tagger/main.py", line 51, in __init__
    ConfigObject.__init__(self, config=config)
  File "/home/sandbox/src/tito/config_object.py", line 38, in __init__
    config.get(section, options))
  File "/usr/lib64/python3.3/configparser.py", line 1184, in set
    super().set(section, option, value)
  File "/usr/lib64/python3.3/configparser.py", line 889, in set
    value)
  File "/usr/lib64/python3.3/configparser.py", line 399, in before_set
    "position %d" % (value, tmp_value.find('%')))
nose.proxy.ValueError: ValueError: invalid interpolation syntax in '%s (%ae)' at position 0
2014-03-11 14:38:03 +00:00
Paul Morgan
172d67794e StringIO is part of io in python3
> The StringIO and cStringIO modules are gone. Instead, import
> the io module and use io.StringIO or io.BytesIO for text and
> data respectively.

- http://docs.python.org/3.0/whatsnew/3.0.html

Avoid TB in python3 when performing buffered IO.
Buffered IO must use bytes, not string, to avoid...

Traceback (most recent call last):
  File "/home/sandbox/test/functional/multiproject_tests.py", line 68, in setUp
    self.create_project(TEST_PKG_1, os.path.join(self.repo_dir, 'pkg1'))
  File "/home/sandbox/test/functional/fixture.py", line 198, in create_project
    tito('tag --keep-version --debug --accept-auto-changelog')
  File "/home/sandbox/test/functional/fixture.py", line 103, in tito
    return CLI().main(argstring.split(' '))
  File "/home/sandbox/src/tito/cli.py", line 222, in main
    return module.main(argv)
  File "/home/sandbox/src/tito/cli.py", line 674, in main
        found_changelog = False
    return tagger.run(self.options)
  File "/home/sandbox/src/tito/tagger/main.py", line 103, in run
    self._tag_release()
  File "/home/sandbox/src/tito/tagger/main.py", line 123, in _tag_release
    self._make_changelog()
  File "/home/sandbox/src/tito/tagger/main.py", line 229, in _make_changelog
    os.write(fd, "# Create your changelog entry below:\n")
nose.proxy.TypeError: TypeError: 'str' does not support the buffer interface
2014-03-11 14:38:03 +00:00
Devan Goodwin
ce7393ecaa Add test for GitAnnexBuilder. 2014-03-11 11:27:19 -03:00
Devan Goodwin
5a1ed49959 Fix some git annex merge issues. 2014-03-11 10:08:05 -03:00
Devan Goodwin
8d5361861b Merge branch 'git-annex' of https://github.com/domcleal/tito into domcleal-git-annex
Conflicts:
	src/tito/builder/__init__.py
	src/tito/builder/main.py
2014-03-11 10:02:41 -03:00
Devan Goodwin
a80fc5b6b0 Use test util to write files. 2014-03-11 09:25:45 -03:00
Devan Goodwin
527e60bab4 Print output live for longer running rpmbuild commands. 2014-03-11 09:17:52 -03:00
Devan Goodwin
9091afd684 Functional test for the CoprReleaser. 2014-03-11 09:17:52 -03:00