使用不带ssl的jenkins DPL进行人工上载

使用不带ssl的jenkins DPL进行人工上载,jenkins,artifactory,jenkins-declarative-pipeline,Jenkins,Artifactory,Jenkins Declarative Pipeline,我使用下面的代码从jenkins上传工件到jfrog,它失败了,出现了cert not found错误 stage('Package Upload') { steps{ script{ def server = Artifactory.server 'jfrog' def uploadSpec = """{ "f

我使用下面的代码从jenkins上传工件到jfrog,它失败了,出现了cert not found错误

stage('Package Upload') {
        steps{
            script{
                def server = Artifactory.server 'jfrog'
                 def uploadSpec = """{
                    "files": [{
                       "pattern": "*.zip",
                       "target": "Test/binaries/"
                    }]
                 }"""

                 server.upload(uploadSpec)
            }
        }
    }
以下是错误:

[Pipeline] { (Package Upload)
[Pipeline] script
[Pipeline] {
[Pipeline] getArtifactoryServer
[Pipeline] newBuildInfo
[Pipeline] artifactoryUpload
expected to call org.jfrog.hudson.pipeline.common.types.ArtifactoryServer.upload but wound up catching artifactoryUpload; see: https://jenkins.io/redirect/pipeline-cps-method-mismatches/
[consumer_0] Deploying artifact: https://jfrog.example.com/artifactory/Test/binaries/package.zip
Error occurred for request CONNECT jfrog.example.com:443 HTTP/1.1: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target.
Error occurred for request CONNECT jfrog.example.com:443 HTTP/1.1: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target.
[consumer_0] An exception occurred during execution:
java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
解决这个问题的唯一方法是在jenkins slave上为jfrog服务器添加证书,或者可以使用verifySSL false来避免ssl握手