Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-45867

artifactoryPublish does not deploy .pom file from jenkinsfile pipeline code

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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

      }
      }

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            Assignee:
            eyalbe Eyal Ben Moshe
            Reporter:
            sandeep15390 Sandeep Reddy Gurram
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: