簡體   English   中英

如何使用 Curl 命令在沒有插件的情況下將最新的工件從 jfrog Artifactory 存儲庫下載到 jenkins 聲明管道?

[英]How to download the LATEST artifact from jfrog Artifactory repository to jenkins declarative pipeline without plugin using Curl command?

如何從 jFrog 存儲庫下載最新的工件。 在不使用 Jenkins 插件的情況下,我使用的是 curl 命令。 我的jfrog神器格式:build-156.zip Jenkins Declarative pipeline syntax

        script {                                                                            
            
            sh "curl -u admin:password@123 'https://<ARTIFACTORY_URL>/path/to/repository/$LATEST_ARTIFACT'"                             
        } 

關於神器,應該指向 repo 或神器本身,就像在 groovy 中一樣:

def _artifact = sh(script: "curl -X GET http://${URL}:8082/artifactory/${REPOSITORY}/${PLATFORM}/${ENV}/stage/${PROJECT}/${VERSION}/${ARTIFACT} -o ${ARTIFACT}", returnStdout: true).trim()

或在命令行上進行身份驗證:

curl -u admin:xxxx -XGET http://192.168.50.67:8082/artifactory/jfrog-support-bundle/ --output download.zip

參考: https ://www.jfrog.com/confluence/display/JFROG/Artifactory+REST+API#ArtifactoryRESTAPI-RetrieveArtifact

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM