then I take the tar file generated, run my sanity check and if everything is fine, I then issue
./gradlew -Prelease=true publish
At this stage publish does NOT build anything. It simply publishes the artifacts that are built during the release phase (and which were tested). In the "default" setting it publishes to jcenter but that is also changeable in the repositories.gradle file.
Note that you can run any of those commands from any level (ex: under agent only) but then you need to properly reference gradlew (ex: ../gradlew).
Again this is how I am doing it on the main branch. I do not remember how it was under 4.7.2 but probably very similar (except that I think publish was publishing into a local publish maven folder).
I'm not trying to release 4.7.2 of the agent. When I get to the agent, I'll make sure I've got all the latest changes, so I'll be releasing 5.5.1-patch.
At this point I'm trying to deploy some changes of https://github.com/pongasoft/utils-zookeeper that I've made. I'm just looking to upload a SNAPSHOT build initially to nexus so the changes can be incorporated into other builds. Shortly after I'll release (but for now I'm just focused on the SNAPSHOT publishing to nexus).
Once we've tested internally I'll send a pull request your way. The projects I'll need to publish are utils-zookeeper, utils-misc and glu
Do the builds support publishing a SNAPSHOT to nexus? Is that also the release task?
release - Releases in a releaseRepo [snapshotRelease]
So on utils-zookeeper I've run
gradlew clean test release
This works fine.
Then I run
Could not load previous build info
groovy.json.JsonException: Expected a value on line: 101, column: 2.
But got an unterminated object.
.... (stack trace) ....
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':org.linkedin.zookeeper-cli:uploadPublishMaster'.
> Cannot locate previously built artifact [C:\Dev\workspace\utils-zookeeper\out\build\org.linkedin.zookeeper-cli\distributions\org.linkedin.zookeeper-cli-2.0.3-SNAPSHOT.tgz]
The stack trace doesn't show what file has the invalid json. I can't find any json files in the project.
Anyway the same command on linux works, so I'll start using that for my builds. Now the build on linux is publishing to "to repository remote at file://localhost" so I just need to configure that and I should be sorted.