简体   繁体   English

如何使用 Curl 命令在没有插件的情况下将最新的工件从 jfrog Artifactory 存储库下载到 jenkins 声明管道?

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

How to download latest artifacts from jFrog repository.如何从 jFrog 存储库下载最新的工件。 Without using Jenkins plugins I am using curl command.在不使用 Jenkins 插件的情况下,我使用的是 curl 命令。 My jfrog artifact format: build-156.zip Jenkins Declarative pipeline syntax我的jfrog神器格式:build-156.zip Jenkins Declarative pipeline syntax

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

Regarding the artifact one should point to the repo or artifact itself, as is, in groovy:关于神器,应该指向 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()

or with authentication on the command line:或在命令行上进行身份验证:

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

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 jenkins 管道从 nexus 下载最新的工件? - How to download latest artifact from nexus using jenkins pipeline? 无法使用文件规范中带有“ build”属性的人工插件或jfrog cli下载最新工件 - Cannot download latest artifact using artifactory plugin or jfrog cli with “build” property in file spec 如何从 Jenkins pipeline artifactory plugin 下载 artifact md5 checksum - How to download the artifact md5 checksum from Jenkins pipeline artifactory plugin 如何为上传到 Jfrog Artifactory 的每个工件触发 Jenkins 管道构建 - How to trigger a Jenkins pipeline build for every artifact uploaded to Jfrog Artifactory 如何使用带有通配符的curl命令将工件部署到jfrog工件 - how to use curl command with wildcard for deploying artifact to jfrog artifactory Jenkins Artifactory Plugin AQL下载最新神器匹配模式 - Jenkins Artifactory Plugin AQL download latest artifact matching pattern 从 Jenkins 声明性管道运行 curl 命令 - Running curl command from Jenkins declarative pipeline 如何使用jenkins发布构建动作将工件从工件组部署到jfrog工件 - How to deploy an artifact from group of artifacts to jfrog artifactory using jenkins post build action 如何在Windows机器上从Jfrog Artifactory下载最新的工件 - How to download the latest Artifacts from Jfrog Artifactory on a Windows Machine 在 Jfrog Artifactory 中发布工件时如何触发多分支 Jenkins 管道 - How to trigger a multi-branch Jenkins pipeline when artifact is published in Jfrog Artifactory
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM