Commit Graph

70 Commits

Author SHA1 Message Date
Zuul
4495c82e3c Merge "Upgrade hacking 1.x" 2018-02-21 05:41:08 +00:00
Dirk Mueller
aa3d3bbc66 Upgrade hacking 1.x
Change-Id: Id54894246f3db134a3868609dbbaa60062a92c5e
2018-02-11 18:01:01 +01:00
Doug Hellmann
4fc9741ad3 update get_release_type to take a repo name
Instead of passing a full project dict, pass just the value we
need. This will let us reuse this function in places where we don't
have a project dict.

Change-Id: Id25e98c7b6dbf3cfb711447394f2d9ade5fc5674
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-02-08 17:07:15 -05:00
Doug Hellmann
91f5f51f48 try to validate the starting points for branches
Apply rules about where we expect branches to be created, when we
know. Also try to report errors in a way that makes it clear that
updating the branch settings after a branch has been created is
invalid.

Change-Id: I04befc1f3b0196ee2693bab5c61c399096c301a9
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-02-08 05:14:52 -06:00
Doug Hellmann
1305c6a975 treat extra repos as errors
Require all repositories in a release to be listed in the
repository-settings section of the deliverable file.

Change-Id: I80c3763d62dd776af0912f92d20353d94d0e6d91
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-02-08 05:14:41 -06:00
Doug Hellmann
aa8ee5a83a split validation of tarball-base into its own function
Trying to simplify some of the logic in validate_releases()

Change-Id: I8db1ee9311a53891d7cc98882f5181d3c83c745b
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-02-08 05:14:01 -06:00
Doug Hellmann
b898e9ace9 add a warning for repo used in release but not in repository-settings
Change-Id: I5f2acb23977ed3523bc7d098823a7cc5c45e4175
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-02-07 18:21:32 -05:00
Doug Hellmann
6c3be826ad implicitly set type to tempest-plugin based on the name
When the name looks like the repo contains a tempest plugin, set the
type accordingly.

Change-Id: I2e40f85a2c0047825ef07080cb491bacb86e8409
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-02-06 14:22:21 -05:00
Doug Hellmann
84dce327eb don't allow branching for tempest plugins
Change-Id: Ic709f3ab06466e8614756fbfaee19ef1c1409b32
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-02-06 14:20:36 -05:00
Doug Hellmann
6ac14737b7 report warnings when the supported versions of dependencies change
Compute the dependency set for the python code being released and
report when the old minimum version no longer falls within the
specified range. For releases from master treat the message as an
error. For other branches treat the message as a warning.

Update clone_repo() to return the location where the clone was written
as a convenience to the caller.

Extract the logic for determining if a version is using
pre-versioning (alpha, beta, etc.) so it can be reused.

Change-Id: I22a2f6df7f3502e4fcbf2d61ef5fee849ab15529
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-11-29 16:30:24 -05:00
Doug Hellmann
1016065aa6 rename python-server to python-service
The deliverable type value is 'service', so let's use that for
consistency

Change-Id: I7118b6737800921b72ab4637fe614de29167f0fa
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-10-26 17:09:49 -04:00
Doug Hellmann
76b89d0466 use deliverable type service to derive python-server release type
Avoid having to set the release type for things that are python
service but that have npm-based components.

Change-Id: Ia600753b4090939ab07745847d39200bd3fad6c3
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-10-26 17:09:49 -04:00
Doug Hellmann
f253e9b810 let include-pypi-link imply release-type python-pypi
If the deliverable file says to include the PyPI link in release
emails, it's likely that it means the deliverable is published to PyPI
and should use those jobs.

Change-Id: I06b471c8992e75d315788463e75bd932503a928a
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-10-26 11:53:13 -04:00
Doug Hellmann
9dbb30dce1 provide separate release types for server and non-server deliverables
Change the 'std' release type to 'python-server' and add a
'python-pypi' release type for deliverables that are published to
PyPI.

Separate the release job validation from the validation of release
version numbers and other settings to make the logic clearer.

Add a new function to determine the release type for a project, either
by checking the explicit value or guessing.

Update the unit tests that relied on 'std'.

Remove a unit test that tested a code path that has been removed.

Change-Id: I704ec75fec61ecb6ee379239a5fa8612cb01b426
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-10-26 11:53:13 -04:00
Doug Hellmann
bf99d19dd5 update tests to replace use of automaton repo with release-test
Change-Id: I97a980b1de97fd81400a9e2e5556bc0590dc95ac
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-10-25 09:43:07 -04:00
Doug Hellmann
dbb7a4bcc6 do not assume that modules with setup.py are packaged with python jobs
Back in a5e6f88e1 we made the assumption that repos containing puppet
and node.js modules that also have a setup.py were packaged as python
projects. That is not a valid assumption, so remove it. Projects can now
explicitly select between the packaging type.

Change-Id: Ie98b7677d07acdfaebf3fa725a481491101922eb
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-10-24 10:59:17 -04:00
Doug Hellmann
9a49ded73f make release job validation based on project type
Require puppet repositories to have the puppet jobs and node
repositories to have the node jobs.

Update the allowed values for release-type to include "puppet" and
"nodejs" for folks who want to be explicit, but also use the module
type-detection code to default properly.

Report any jobs that are valid release jobs but for the wrong release
type as errors instead of warnings.

Change-Id: I9330cc62834f42ae0cd4d1cc48ed963846d72944
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-10-23 09:57:38 -04:00
Doug Hellmann
f066967e8d update release job validation for zuulv3
The release jobs are attached using a different configuration file
that has a different format. Update the validation logic to read the
new file and process its contents correctly.

Change-Id: Ib5ae569572b88524607bd320db6d746437d8636f
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-10-19 10:43:17 -04:00
Doug Hellmann
e611c797fc fix some flakey tests
The check for stable branches needs to be more flexible about where
"stable/" appears in the names.

The version number computation needs to take into account trailing
zeros so we don't end up with invalid version numbers.

Change-Id: I3c9c82f85810f84ebeac20a4ae26eb31aa8c6f5d
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-10-17 15:24:30 -04:00
shangxiaobj
1bb86a0791 [Trivialfix]Fix typos in releases
Fix all the typos that found in releases.

Change-Id: I83c142824a43ecf661f3e84177c9d8b206f78e24
2017-08-08 04:22:20 -07:00
Doug Hellmann
0fdefb4c5b add tests for the logic that finds previous releases
Pull the code that finds the previous release out of the main function
in new-release and write tests for it.

Change-Id: I20c6a5283a779258498027a8a5875ddd3c80bf79
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-08-07 15:35:01 -04:00
Doug Hellmann
6d7e2557dd add tests for version incrementing in new-release
Change-Id: Ia758c459fc47591f49c9c22b8520e727386bd429
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-08-07 11:30:05 -04:00
Doug Hellmann
d99e5737b3 update exists check to look for a commit to be on a named branch
All patches pushed to gerrit are mirrored and then visible through cgit,
so using that web service to check for a "valid" patch does not do what
we thought. This patch changes the logic to look for any named branch to
contain the patch, meaning it has been merged into a branch already
somewhere.

In the course of working on the tests, I also discovered that the one
verifying ancestry of patches being tagged as part of a series was using
the stable/mitaka branch in automaton, which is no EOL. I rewrote the
test to try to be more future-proof.

Change-Id: I2a1c797de4d61649dd047aca28a241c8901e18f3
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-08-02 14:34:34 -04:00
Doug Hellmann
ee1fc3d892 use yamlutils.loads() everywhere instead of yaml.safe_load()
Also set the encoding for the data files in more open() calls.

Change-Id: Idda3a7ab46e5478f83541fbbb629d7e086515ffd
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-08-01 17:50:37 -04:00
Doug Hellmann
57639f8b8f add untagged release model for devstack and grenade
Change-Id: I9fad5ca61c07ec6f985fa479bb1c5f1427b9217b
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-06-12 11:18:57 -04:00
Jenkins
962e043185 Merge "protect branch name validation from improperly formatted names" 2017-05-30 12:20:06 +00:00
Jenkins
93faf23494 Merge "add stable-branch-type option" 2017-05-30 12:19:48 +00:00
Doug Hellmann
d8c990841c add stable-branch-type option
The rules for stable branches vary based on whether a project is tagged
or not. The default rule set still relies on using tags, but projects
like devstack and grenade will want to be able to create branches
without having to tag. This patch adds a new stable-branch-type option
to let us control the behavior for each deliverable file.

Change-Id: I13c22d9da303cd3a6df329bf310a2292cfec9ae0
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-05-25 13:27:59 -04:00
Doug Hellmann
ce7e5e85c5 protect branch name validation from improperly formatted names
If we can't parse the name, indicate that as an error. The result for a
name like '0.6.x' ends up being 4 separate errors, but we avoid crashing
the validator.

Change-Id: Idbdcfd544cdc1c599907898e733fbf6039a5c6fc
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-05-24 14:44:50 -04:00
Doug Hellmann
a5e6f88e12 handle mixed-language repos packaged as python
The horizon repo and repos for plugins all have package.json but are
packaged using the python tools not npm tools. Assuming we might have
similar cases for puppet modules, this patch updates both cases to
ignore the other language packaging files when setup.py is present.

Change-Id: I61740a01a2289fed6ad5324c53b225d27fd3d6db
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-05-24 13:10:01 -04:00
Doug Hellmann
d287e47cfc fix stable branch membership detection
The rules for stable branch releases need to be relaxed a bit to account
for projects that are late to create their branches and only do so after
the default branch has been updated. This change makes the rules more
flexible so that it is possible to release for a stable branch on master
as long as that stable branch does not exist. The primary use for this
is to release and then create the stable branch in the same patch.

Change-Id: I2d8f9abcf8ffa34e29eb7021830fd635e6e0f85f
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-05-22 13:36:28 -04:00
Jenkins
9e3e7f8d23 Merge "add tests for beta versions as first new releases" 2017-05-01 19:27:02 +00:00
Andreas Jaeger
511086a92f Use https for docs.openstack.org (1/7)
We switched to https for docs.openstack.org, adjust most URLs.

This change updates documentation etc files, but not any deliverable files.

Change-Id: Ia8b0524025ab1c685ec6f57246f8b34231f52632
2017-04-30 18:01:36 +02:00
Doug Hellmann
b9e5af6371 improve npm version validation
Require the package.json version to match the tag.

Change-Id: Ice7ff376a030fee41589408a3657658a4e076a16
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-04-20 15:40:40 -04:00
Doug Hellmann
6649113be1 add tests for beta versions as first new releases
Change-Id: I4bb8c62aa50683f7fa17f339d9dad586ea4c8a79
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-04-10 14:03:50 -04:00
Doug Hellmann
d5840915a6 add support for storyboard bug and task trackers
Some projects use storyboard instead of launchpad, so look for one or
the other and try to do some basic validation of the storyboard project
ID.

Change-Id: I94a9507969bcc8bbe2358132761c0935d94cadaa
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-03-16 11:34:24 -04:00
Doug Hellmann
7f9cfba013 require new releases in a series to include a minor version bump
ceilometermiddleware 1.0.1 was released from master as part of the pike
series. It should have either been 1.1.0 or on the stable/ocata
branch. This extra validation should avoid a similar mistake in the
future.

Change-Id: I044bf288a659ce144ed3d7896e9057cc361a2cf3
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-03-15 15:10:03 -04:00
Jenkins
f7667c14c2 Merge "check stable branch name against current series" 2017-02-25 18:32:38 +00:00
Doug Hellmann
581ec64658 change error on missing branch to warning
We have some deliverables with new (or at least unbranched) repositories
for ocata. This is likely to be the case in the future, too, so make the
error a warning for now until we can improve the logic.

Change-Id: Id2d6dc96501ecfb65945b406f17bd4dcfdaea1c2
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-02-15 22:47:23 -05:00
Doug Hellmann
e9147d907b check stable branch name against current series
For cycle-based projects, require the stable branch name to match the
current series. For independent projects, require the stable branch name
to match *a* series.

Change-Id: I25f7b5b0472e5349863ebea94b635daa3ec6d5dc
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-02-13 17:30:15 -05:00
Jenkins
f4f0f9f4fc Merge "prevent releases in a new series until the previous series has a stable branch" 2017-02-06 15:16:02 +00:00
Jenkins
a83bdbb4cc Merge "add mocks to fix validation tests" 2017-02-06 15:12:33 +00:00
Jenkins
51152a92aa Merge "always check the branch membership" 2017-02-06 14:57:09 +00:00
Doug Hellmann
765a6ef162 prevent releases in a new series until the previous series has a stable branch
We don't want to release off of master for a new series until the
previous series has a stable branch created, because otherwise we run
the risk of releasing from series B something that should have been
considered part of series A.

Change-Id: I1249a81340fe72df2cd3b174fc640fa918b0258b
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-02-02 13:47:40 -05:00
Doug Hellmann
0ac09a58da add mocks to fix validation tests
Something changed in one of the git repos used by the unit tests, so
mock out the call that is now failing to restore the original behavior.

Change-Id: I0bb7ab969f077640fab4443fa4b4db0b5fd91ae3
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-02-02 13:47:26 -05:00
Julien Danjou
97c8427760 Allow to blacklist some projects to declare branch independence
Change-Id: Ib48246721f56bc928c1d9b40ebc03fd0d3a24c37
2017-02-02 17:59:20 +01:00
Doug Hellmann
7abdc2bc3d add validation rule to ensure puppet module metadata matches the tag
We can't automate generating the metadata file, so instead just require
that the contents of the metadata match the tag being applied.

Change-Id: I0a8bd7ba1475f6409705f1cdcacf9219c5083b94
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-01-30 16:09:34 -05:00
Doug Hellmann
99d3acba6c always check the branch membership
Always look at the branches containing the commit and require the
expected stable or master branch, regardless of whether this is the
first release in a series or not.

Change-Id: I75c4c767c564f8ba7f0d1084e59ac8b8c4a5966e
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-01-30 13:18:47 -05:00
Doug Hellmann
893343361c add a command to produce a list of liaisons
This code is basically copied from the release-tools repository version
in ptl.py, with some enhancements to support the tests being added here.

Change-Id: Iabccb6fa6b20eb3c226fd0a16a736d993b78d330
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-01-20 09:01:28 -05:00
Doug Hellmann
ef416c92e6 only check the tarball-base when building tarballs
Only require projects that build tarball artifacts to have the
tarball-base value set properly.

Change-Id: I9d42329f4080cc0f766b71fae4c45cd87aea3e3a
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2016-12-19 15:38:29 -05:00