Artifactory:如何通过 curl 命令将目录(包含 debian 软件包)上传到本地仓库
Artifactory: How to upload directory (contain debian packages) to local repo via curl command
这是我将文件单独上传到我们的 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>
我似乎找不到如何上传整个目录(包含 debian 包),我想它会是这样的:
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>
有人可以帮帮我吗?谢谢!
我们可以利用Deploy artifacts from Archive REST API上传整个目录。但是,我们需要存档目录,Artifactory 会在部署时使用 header "X-Explode-Archive: true"
展开存档
示例:-
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
这是我将文件单独上传到我们的 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>
我似乎找不到如何上传整个目录(包含 debian 包),我想它会是这样的:
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>
有人可以帮帮我吗?谢谢!
我们可以利用Deploy artifacts from Archive REST API上传整个目录。但是,我们需要存档目录,Artifactory 会在部署时使用 header "X-Explode-Archive: true"
展开存档示例:-
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