1

我正在使用 Gradle 构建我的应用程序和工件来存储/解析二进制文件和 Jenkins-CI 来自动化构建。

到目前为止,我在 Gradle 中使用单项目结构进行构建。

对于每个构建,我都在快照库下覆盖工件中的现有 jar,并且我正在使用发布库来存储生产构建。

当我尝试使用以下 curl rest api 将工件从快照提升到发布时,我可以进行提升,但我无法更改/覆盖发布工件上的版本名称。

REST API 促进:

curl -X POST -u admin:password -H "Content-Type: application/json" -d '{
  "status": "Go Green",
  "ciUser": "jenkinsAdmin",
  "sourceRepo" : "libs-snapshot-local",
  "targetRepo":"libs-release-local",
  "copy": true
}' "http://localhost:8081/artifactory/api/build/promote/buildName/buildNumber"

上述 API 调用的输出:

../dev/abc-dev.jar[promotion happens from snapshot to release libs]../dev/abc-dev.jar

努力争取

  1. 是否可以覆盖 api/build/promotion..

    ../dev/abc-dev.jar --> ../release/abc-release.jar

  2. 对于回滚场景,我们如何在这里实现..

请提供您的意见和建议。

谢谢。

4

0 回答 0