0
我已經Jenkinsfile
寫在groovy
如下:詹金斯管道的JFrog Artifactory的發佈失敗BuildInfo
env.MVN_Goals = MVN_Goals
node {
// Get Artifactory server instance, defined in the Artifactory Plugin administration page.
def server = Artifactory.newServer url: 'http://localhost:8085/artifactory', username: 'admin', password: 'password'
// Create an Artifactory Maven instance.
def rtMaven = Artifactory.newMavenBuild()
stage ('Clone sources'){
git url: 'D:/Sample GIT_Maven Repo'
}
stage 'Artifactory configuration'
rtMaven.deployer releaseRepo:'libs-release-local', snapshotRepo:'libs-snapshot-local', server: server
rtMaven.resolver releaseRepo:'libs-release', snapshotRepo:'libs-snapshot', server: server
def buildInfo = Artifactory.newBuildInfo()
stage('Maven_Build'){
if (isUnix()) {
sh "D:/apache-maven-3.3.9/bin/mvn -B -Dmaven ${MVN_Goals}"
}
else{
bat "D:/apache-maven-3.3.9/bin/mvn -B -Dmaven ${MVN_Goals}"
}
step([$class: 'ArtifactArchiver', artifacts: '**/target/*.jar', fingerprint: true])
}
stage ('Publish build info'){
server.publishBuildInfo buildInfo
}
}
我試圖通過增加對詹金斯的Artifactory的插件配置在詹金斯的Artifactory的。當我嘗試測試連接時,出現錯誤There is either an incompatible or no instance of Artifactory at the provided URL
。當我試圖在詹金斯建立我的工作時,也出現了同樣的錯誤。有沒有辦法解決它?
Artifactory的插件版本 - 2.9.1
Artifactory的版本 - 4.15.0
這解決了錯誤.. !!! –