我试图从人工制品中得到一个罐子,但没有成功。这是我的管道脚本:
pipeline {
agent none
stages {
stage('Stop all services') {
agent {label 'master'}
steps {
script{
def server = Artifactory.server 'Java_Artifactory'
def downloadSpec = readFile 'file'
def buildInfo1 = server.download spec: downloadSpec
}}}}}
这是我的文件:
{
"files": [
{
"pattern": "java-team-archiva-cache/com/rsa/jsafe/cryptoj/5.0/cryptoj-5.0.jar",
"target": "myTest/cryptoj.jar",
"props": "p1=v1;p2=v2"
}
]
}
这是我的控制台输出:
[Pipeline] stage
[Pipeline] { (Stop all services)
[Pipeline] node
Running on Jenkins in /var/lib/jenkins/workspace/test_Pipeline
[Pipeline] {
[Pipeline] script
[Pipeline] {
[Pipeline] getArtifactoryServer
[Pipeline] readFile
[Pipeline] artifactoryDownload
Downloading artifacts using pattern: java-team-archiva-cache/com/rsa/jsafe/cryptoj/5.0/cryptoj-5.0.jar
Beginning to resolve Build Info published dependencies.
Finished resolving Build Info published dependencies.
[Pipeline] }
[Pipeline] // script
[Pipeline] }
[Pipeline] // node
[Pipeline] }
[Pipeline] // stage
Finished: SUCCESS
如您所见,输出中没有错误,但我仍然可以在任何地方找到我的 jar。我也尝试将其保存在 /tmp/ 下,但结果是一样的