Commit graph

1154 commits

Author SHA1 Message Date
Steve Kuznetsov
44b18596ec
Document tito tag --use-release in the manpage
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2017-01-25 10:10:08 -05:00
Steve Kuznetsov
b537fe0607
Added an option to not escalate privileges on tito build --install
When using `tito build --install` on a system without `sudo`, such as
inside of a Linux container build, the current implementation fails.
Furthermore, if the user is running `tito build --install` with the
correct level of privilege, it is not necessary to escalate privileges
further for the installation step.

This patch adds the `--dont-escalate-privileges` flag to `tito build`
and defaults it to `True`, which keeps the behavior backwards compat-
ible. Users will want to use this flag when building RPMs inside of a
container or when running `tito build` with the requisite permissions
for installing in the first place.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2017-01-25 10:10:08 -05:00
Steve Kuznetsov
ed2c0a8ce9
Factor out the version->tag mapping in the Builder
When a custom implementation of a tito Tagger is used, the mapping
function that is used to generate a tag from a version in the custom
Tagger must also be used in whichever tito Builder is used on that
repository. This commit factors out the mapping of version to tag so
that custom implementations of a Builder can inject custom logic here
with minimal effort, as is possible on the tito.VersionTagger by
overriding the _get_new_tag() function.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2017-01-24 17:53:50 -05:00
Devan Goodwin
bd21c5f551 Merge pull request #259 from stevekuznetsov/skuznets/tagger-cli
Collapse tagger class selection logic
2017-01-24 09:56:49 -04:00
Steve Kuznetsov
6b57b0bcbc
Collapse tagger class selection logic
In 26b02a7, the utility of the `ForceVersionTagger` was merged with the
base `VersionTagger`, so it is no longer necessary to ever explicitly
invoke the `ForceVersionTagger` class. Furthermore, the `elif` and
`else` branches of the decision tree for the tagger class were identical
in the previous implementation, so they were collapsed as well. The
remaining tagger class assignment is a simple query of the `tito.props`
file.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2017-01-23 14:44:23 -05:00
Devan Goodwin
97cb32862c Merge pull request #257 from stevekuznetsov/skuznets/readme
Rename `globalconfig` section to `buildconfig` in README
2017-01-23 08:43:58 -04:00
Steve Kuznetsov
1376b69495
Rename globalconfig section to buildconfig in README
From the looks of it, the `globalconfig` section is deprecated and
adding anything to that section of `tito.props` results in an error:

WARNING: Please rename [globalconfig] to [buildconfig] in tito.props

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2017-01-20 17:10:18 -05:00
Devan Goodwin
4d75af103f Merge pull request #255 from dgoodwin/issue253
253 - print cmd info when --debug is supplied
2017-01-17 08:40:19 -04:00
Devan Goodwin
5cf2999a74 Merge pull request #256 from dgoodwin/issue29
fixes #29 - remove --list-tags and --only-tags
2017-01-17 08:39:01 -04:00
jesus m. rodriguez
cd3ef6af29 fixes #29 - remove --list-tags and --only-tags 2017-01-16 21:47:47 -05:00
jesus m. rodriguez
8fd25ae5bb 253 - print cmd info when --debug is supplied 2017-01-16 21:12:50 -05:00
Devan Goodwin
de14541103 Automatic commit of package [tito] release [0.6.9-1].
Created by command:

/usr/bin/tito tag
2017-01-09 12:13:08 -04:00
Devan Goodwin
46dfdefffd Merge pull request #240 from stevekuznetsov/skuznets/use-release
Added `--use-release` flag for `tito tag`
2017-01-09 12:08:36 -04:00
Steve Kuznetsov
4f36972414
Clean up artifacts before test runs, not after
When tests fail, artifacts from that tests are necessary to properly
debug the failure and determine how to fix the test. This is impossible
when artifacts are immediately removed after the test is finished.
Instead, the tests should remove old artifacts before the test run
begins.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2017-01-09 10:00:31 -05:00
Steve Kuznetsov
25c3aeed71
Simplified version and release update logic
The logic that previously existed for updating the version and/or the
release in the specfile contained a lot of repetition and enough boolean
logic that it was becoming hard to read. By simplifying that stanza, the
hope is that the resulting code is easier to understand.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2017-01-09 10:00:31 -05:00
Steve Kuznetsov
a19a366213
Added --use-release flag for tito tag
When multiple tags exist for one version of a project, or when a version
is passed to `tito tag --use-version` that does not exactly correspond
with a tag in the repository's git history, the auto-generated release
is not guaranteed to monotonically increase. In order for users to
overcome this issue without building complicated logic into `tito`, it
is simpler to allow users to provide a literal release string to use.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2017-01-09 10:00:31 -05:00
Devan Goodwin
bb7881dfc6 Merge pull request #251 from stevekuznetsov/skuznets/pep8-fix
Use `def` instead of a lambda for function assignment
2017-01-06 12:23:09 -04:00
Steve Kuznetsov
35268dcf89
Use def instead of a lambda for function assignment
Using `def` instead of `x = lambda...` satisfies the PEP8 E731 warning.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2017-01-06 11:16:03 -05:00
Steve Kuznetsov
3cdceca9bd
Work around dnf issues and install builddep for Rawhide
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2017-01-06 11:01:17 -05:00
Devan Goodwin
77c7ff9a91 Merge pull request #249 from stevekuznetsov/skuznets/reconfigure-test-os
Add CentOS 7 and Fedora 25 tests, remove Fedora 21 tests
2017-01-06 09:08:12 -04:00
Devan Goodwin
db179f0f27 Merge pull request #248 from stevekuznetsov/skuznets/update-fedora-tests
Use `dnf` instead of `yum` in Fedora Rawhide tests
2017-01-06 09:07:45 -04:00
Steve Kuznetsov
bc9b769c19
Add CentOS 7 and Fedora 25 tests, remove Fedora 21 tests
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2017-01-05 16:39:06 -05:00
Steve Kuznetsov
9a7fb69e9e
Use dnf instead of yum in Fedora Rawhide tests
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2017-01-05 16:33:59 -05:00
Devan Goodwin
98e27fcdae Merge pull request #245 from stevekuznetsov/skuznets/docker-test-selinx-fix
Relabel test container volume contents for SELinux
2017-01-05 16:09:47 -04:00
Steve Kuznetsov
784a76c036
Relabel test container volume contents for SELinux
To allow the tests to run from a host with SELinux enabled, the data
needs to be relabeled to the correct SELinux contexts. Adding the `Z`
label to the volume mount allows for this to occur.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2017-01-05 15:08:00 -05:00
jesus m. rodriguez
db9717d9a4 Merge pull request #244 from lubomir/typos
Fix typos in man pages
2017-01-03 10:26:30 -05:00
Lubomír Sedlář
d774afec78 Fix typos in man pages 2017-01-02 13:11:36 +01:00
Devan Goodwin
94b0a93088 Merge pull request #238 from msehnout/cargo
Cargo
2016-12-15 10:21:32 -04:00
Martin Sehnoutka
074b129ad7 Fix unit tests. 2016-12-15 15:05:25 +01:00
Devan Goodwin
8ac3f98557 Merge pull request #242 from xsuchy/explain
explain how automatic tagging was done
2016-12-15 09:13:51 -04:00
Martin Sehnoutka
f80debc740 Comments for test class. 2016-12-15 11:19:38 +01:00
Martin Sehnoutka
4d373ee201 Functional test case for CargoBump class. 2016-12-15 11:14:06 +01:00
Miroslav Suchý
856a4968f8 explain how automatic tagging was done 2016-12-13 11:46:07 +01:00
Martin Sehnoutka
bd20ecf186 Run Cargo bump without any section in tito.props 2016-11-30 16:37:13 +01:00
Martin Sehnoutka
f7014b7527 Rename CargoTagger as CargoBump 2016-11-30 16:19:48 +01:00
Devan Goodwin
9ec23a6286 Merge pull request #239 from lubomir/typo
Fix errors in documentation
2016-11-28 10:40:55 -04:00
Lubomír Sedlář
f6bbbac4f9 Fix errors in documentation
The documentation for taggers should not mention builders.
2016-11-28 15:35:47 +01:00
Sehny
9bc7a0f76f fix few pep8 errors 2016-11-21 18:51:34 +01:00
Sehny
3185b559a5 Read tito.props and look for pkg managers section.
* section name: remote_pkg_manager
 * available options: type, config_file
 * available types: cargo
 * config_file is path relative to project root
2016-11-21 18:43:55 +01:00
Sehny
4990b9e049 Implement cargo tagger using regular expressions (without toml library) 2016-11-21 18:22:48 +01:00
Sehny
5da7997995 2 unit tests for cargo tagger. 2016-11-21 18:16:05 +01:00
Sehny
c97b3a7947 Add entry point for Cargo tagger and tagger class. 2016-11-21 13:58:53 +01:00
Sehny
0efa60a77b Add unit test class 2016-11-21 13:31:31 +01:00
Devan Goodwin
21720cc9d2 Automatic commit of package [tito] release [0.6.8-1]. 2016-11-01 15:38:30 -03:00
Devan Goodwin
06c1d3dadc Merge pull request #236 from stevekuznetsov/skuznets/force-tagger
Don't use a special tagger for the `--use-version` case
2016-11-01 12:45:21 -03:00
Steve Kuznetsov
26b02a7ff4
Don't use a special tagger for the --use-version case
Instead of special-casing the case where a user has supplied
the specific version to use, we can instead use the same version
tagger for both cases and detect inside of that tagger whether
or not the user has supplied the tag.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2016-11-01 11:32:50 -04:00
Devan Goodwin
fb9e31631e Releasers update. 2016-10-28 14:47:13 -03:00
Devan Goodwin
efe5b98498 Automatic commit of package [tito] release [0.6.7-1]. 2016-10-05 16:11:33 -03:00
Devan Goodwin
f3bcf9720f Hookup tito's --no-cleanup with rpmbuild's --noclean. 2016-10-05 14:35:16 -03:00
Devan Goodwin
de3e7b62a2 Merge pull request #234 from FrostyX/requires-fix
Use Dnf or Yum over Rpm when it is possible
2016-07-18 12:03:03 -03:00