exit if errors are found in a nexus repo 13/16513/12
authorAric Gardner <agardner@linuxfoundation.org>
Fri, 9 Aug 2019 21:04:45 +0000 (17:04 -0400)
committerAric Gardner <agardner@linuxfoundation.org>
Tue, 13 Aug 2019 19:54:01 +0000 (15:54 -0400)
commit2f20518985752a71fe27cec340b7a6a41b9a9dcf
tree0f4c89f67d57ec0f2a35a1c4b3acf5f432f3d00f
parentbfc3096e4d6664739dc47faa7d7a62a8fcf8c0c2
exit if errors are found in a nexus repo

nexus release now checks "{}/staging/repository/{}/activity"

Ensures that Repository is in closed state
Checks if Repository is already released (exit 0)
Check for failures, if found (exit 1)

Added
click.option('-v', '--verify-only', is_flag=True, required=False)
if -v is passed, only checks for errors, skips release.

This could be better, but I have officially spent too much time
fiddling with it.
Its a bit of a brute force, but as

curl -v -u <lfid:pass>
'https://nexus.opendaylight.org/\
service/local/staging/repository/honeycomb-vbd-1629/activity'

Actually returns two xml pages.
not being too familliar with soup I used
soup.find_all("value")
and then used a re.search
to check for needed values

Removing the pytests, they don't make sense imo.

ISSUE: RELENG-2291
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: I7ae6c487b2aaf0e1df01effa7da15a1b28b624ad
.coafile
lftools/cli/nexus.py
lftools/nexus/cmd.py
releasenotes/notes/nexus-release-2b0ca5f0051c703c.yaml [new file with mode: 0644]
requirements.txt
tests/test_nexus.py