-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Blocker
-
Component/s: artifactory-plugin
-
Environment:Jenkins - 2.46.1
Artifactory Plugin - 2.12.2
artifactoryPublish would not deploy pom file along with jars when using pipeline code.Â
It works fine when running the tasks from command line and Jenkins gradle plugin from Freestyle project.
Â
stage("Build") {
env.JAVA_HOME="${tool 'Java8'}"
env.PATH="${env.JAVA_HOME}/bin:${env.PATH}"
withEnv(["GRADLE_USER_HOME=$\{env.WORKSPACE}"]){
def server = Artifactory.server SERVER_ID
def rtGradle = Artifactory.newGradleBuild()
rtGradle.deployer.deployMavenDescriptors = true
rtGradle.deployer.mavenCompatible = true
rtGradle.deployer.deployIvyDescriptors = true
rtGradle.tool = "gradle-4.0"
rtGradle.deployer repo: "jncs-snapshot-local", server: server
def buildInfo = Artifactory.newBuildInfo()
buildInfo.env.capture = true
buildInfo.env.filter.addInclude("*")
rtGradle.usesPlugin = true
rtGradle.run rootDir: "jncs-core", buildFile: "build.gradle", tasks: "clean build artifactoryPublish" , buildInfo: buildInfo
server.publishBuildInfo buildInfo
}
}