Artifactory – Upload artifact through command line

Jenkins works well with Artifactory and the built artifact will be upload to the Artifactory repository automatically.

One day, i found that the artifact is built but it is not uploaded. The Linux server doesn’t have the desktop interface so i couldn’t upload the artifact through browser. An alternative way is to use the curl command to post the artifact to the repository.

curl -X POST <target url> --data <artifact>

 

Example:

curl -X POST http://localhost:8081/artifactory/dev-snapshot-local/eureka-v0.0.1.tar.gz --data eureka-v0.0.1.tar.gz

 

Done =)

Reference: StackOverflow – How do I deploy a file to Artifactory using the command line

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.