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>
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>
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>
Trying to simplify some of the logic in validate_releases()
Change-Id: I8db1ee9311a53891d7cc98882f5181d3c83c745b
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
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>
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>
The deliverable type value is 'service', so let's use that for
consistency
Change-Id: I7118b6737800921b72ab4637fe614de29167f0fa
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Also set the encoding for the data files in more open() calls.
Change-Id: Idda3a7ab46e5478f83541fbbb629d7e086515ffd
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
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>
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>
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>
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>
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
Require the package.json version to match the tag.
Change-Id: Ice7ff376a030fee41589408a3657658a4e076a16
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>