I've spent far more time on this than I care to admit. I am trying to just deploy one file into my Artifactory server from the command line. I'm doing this using gradle because that is how we manage our java builds. However, this artifact is an NDK/JNI build artifact, and does not use gradle.
So I just need the simplest gradle script to do the deploy. Something equivalent to:
scp <file> <remote>
I am currently trying to use the artifactory
plugin, and am having little luck in locating a reference for the plugin.
Upload to the Artifactory repository manually The easiest way, and the least DevOps-friendly way, to upload a JAR to an Artifactory repository is to simply log in to the administrative console, select a target folder and drag and drop the JAR onto the deployment screen.
Manage Artifactory using the following commands. Access Artifactory from your browser at: http://SERVER_ HOSTNAME:8082/ui/ . For example, on your local machine: http://localhost:8082/ui/ . Check Artifactory Log.
curl POST did not work for me . PUT worked correctly . The usage is
curl -X PUT $SERVER/$PATH/$FILE --data-binary @localfile
example :
$ curl -v --user username:password --data-binary @local-file -X PUT "http://<artifactory server >/artifactory/abc-snapshot-local/remotepath/remotefile"
Instead of using the curl
command, I recommend using the jrog
CLI.
Download from here - https://www.jfrog.com/getcli/ and use the following command (make sure the file is executable) -
./jfrog rt u <file-name> <upload-path>
Here is a simple example:
./jfrog rt u sample-service-1.0.0.jar libs-release-local/com/sample-service/1.0.0/
You will be prompted for credentials and the repo URL the first time.
You can do lots of other stuff with this CLI tool. Check out the detailed instructions here - https://www.jfrog.com/confluence/display/RTF/JFrog+CLI.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With