我在这里列出了相同的问题:https ://issues.jenkins.io/browse/JENKINS-58643
我们正在使用 Jenkins 2.190.3.2
stage('upload artefactory') {
steps {
sh "touch /tmp/blabla"
sh "gzip /tmp/blabla"
script {
server = Artifactory.server('myid')
server.credentialsId = 'my-cred'
def uploadSpec = """{
"files": [
{
"pattern": "/tmp/blabla.gz",
"target": "pkg/com/myentreprise/mystuff/scm/dumps/solr/"
}
]
}"""
server.upload spec: uploadSpec, failNoOp: true
}
}
}
[管道] artifactoryUpload 预计会调用 org.jfrog.hudson.pipeline.common.types.ArtifactoryServer.upload 但最终捕获了 artifactoryUpload;见:https ://jenkins.io/redirect/pipeline-cps-method-mismatches/