我需要将Jenkins管道中获得的一些jar文件推送到Jfrog;在代码下面:
stage ('Artifactory configuration') {
when { expression { params.runDelivery } }
steps {
rtServer (
id: "artifactory",
url: "https://jfroglocal/artifactory",
credentialsId: "jfrog"
)
rtMavenDeployer (
id: "MAVEN_DEPLOYER",
serverId: "artifactory",
releaseRepo: "example-repo-local",
snapshotRepo: "example-repo-local"
)
}
}
此处显示错误:
[m org.apache.maven.cli.MavenCli - Skipping deployment of remaining artifacts (if any) and build info. sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target etc
如果我直接从“jenkins从服务器”运行管道,则在将/usr/lib/jvm/java-11-openjdk-amd 64/lib/security/cacert链接到/etc/ssl/certs/java/cacerts之后,错误会消失
如果我从Docker代理运行相同的管道,错误仍然存在;低于申报代理商:
agent {
docker {
label 'Ubuntu-20.04-Slave'
image 'node:10'
args '-u root'
}
}
如何将cacert文件链接到容器中?
1条答案
按热度按时间brqmpdu11#
尝试
args '-v /usr/lib/jvm/java-11-openjdk-amd64/lib/security/cacert: /etc/ssl/certs/java/cacerts'