Alphie
Alphie

Reputation: 51

Artifactory: How to upload directory (contain debian packages) to local repo via curl command

This is how I upload files individually to our Artifactory:

curl -H 'X-JFrog-Art-Api:<API KEY>' -XPUT "https://<OUR SERVER>/artifactory/<REPO>/V1/<FILE>;deb.distribution=trusty;deb.component=main;deb.architecture=all" -T <FILE>

I can't seem to find how to upload a whole directory(contain debian packages), I'd assume it would something like this:

curl -H 'X-JFrog-Art-Api:<API KEY>' -XPUT "https://<OUR SERVER>/artifactory/<REPO>/<DIRECTORY>/;deb.distribution=trusty;deb.component=main;deb.architecture=all" -T <DIRECTORY>

Can someone help me out?

Upvotes: 0

Views: 1720

Answers (1)

Balaji L S
Balaji L S

Reputation: 161

We can make use of the Deploy artifacts from Archive REST API to upload a whole directory. However, we need to archive the directory and Artifactory will explode the archive when it's deployed by using the header "X-Explode-Archive: true"

Example:-

curl  -H 'X-JFrog-Art-Api:API KEY' \
-XPUT "http://OUR SERVER/artifactory/test-debianlocal/pool/deb.zip;deb.distribution=wheezy;deb.component=main;deb.architecture=i386" \
--header "X-Explode-Archive: true" \
-T deb.zip

Upvotes: 4

Related Questions