feat: Publish artifacts to maven#946
Conversation
de7c995 to
6141a26
Compare
|
@andygrove This is ready to be tried out. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #946 +/- ##
============================================
+ Coverage 34.16% 34.19% +0.02%
- Complexity 880 894 +14
============================================
Files 112 112
Lines 43286 43344 +58
Branches 9572 9576 +4
============================================
+ Hits 14789 14820 +31
- Misses 25478 25511 +33
+ Partials 3019 3013 -6 ☔ View full report in Codecov by Sentry. |
| exit 1 | ||
| fi | ||
|
|
||
| STAGED_REPO_ID=$(echo $REPO_REQUEST_RESPONSE | xmllint -xpath "//stagedRepositoryId/text()" ) |
There was a problem hiding this comment.
This is failing for me with:
Usage : xmllint [options] XMLfiles ...
I am using this version:
% xmllint --version
xmllint: using libxml version 20913
compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 FTP HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude ICU ISO8859X Unicode Regexps Automata Schemas Schematron Modules Debug Zlib
| exit 1 | ||
| fi | ||
|
|
||
| STAGED_REPO_ID=$(echo $REPO_REQUEST_RESPONSE | xmllint -xpath "//stagedRepositoryId/text()" ) |
There was a problem hiding this comment.
This fixes it for me.
The - at the end indicates stdin input
| STAGED_REPO_ID=$(echo $REPO_REQUEST_RESPONSE | xmllint -xpath "//stagedRepositoryId/text()" ) | |
| STAGED_REPO_ID=$(echo $REPO_REQUEST_RESPONSE | xmllint --xpath "//stagedRepositoryId/text()" -) |
There was a problem hiding this comment.
Thanks for catching this. I tested parts of this script independently and once I put it all together I was not able to test everything since it would fail before this stage!
| # check permission | ||
| PERMITTED_REQUEST="-u $ASF_USERNAME:$ASF_PASSWORD \ | ||
| -H "Content-Type:application/xml" \ | ||
| $NEXUS_ROOT/profiles/$NEXUS_PROFILE/start" | ||
| PERMITTED=$(curl -s -o /dev/null -w "%{http_code}" $PERMITTED_REQUEST) | ||
|
|
||
| if [ "$PERMITTED" != "200" ] | ||
| then | ||
| echo "Nexus replied with a status code: $PERMITTED" | ||
| echo "You may not be authorized to perform this action" | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
This permission check does not work for me. I get a 405 response. I just commented this section out and the rest of the script worked fine, other than one small edit I had to make (see separate comment for this).
There was a problem hiding this comment.
This check is probably incorrect. It worked for me because I did not have the permission and this correctly caught that. But when you do have permission, it reports an error that basically says you can't do this.
Removing it.
andygrove
left a comment
There was a problem hiding this comment.
LGTM! This is working for me now. Thanks @parthchandra
* feat: publish artifacts to staging repository * address review comments
Which issue does this PR close?
Part of #721