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

VCS data not getting uploaded with Artifacts.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • artifactory-plugin
    • None
    • Jenkins: 2.150.1
      Jenkins Artifactory plugin: 2.16.2
      Artifactory: 6.6.1

      Using a Jenkins scripted pipeline (in a multi branch project; with GIT as the SCM), and a generic uploader, when artifacts get uploaded to Artifactory, the VCS data is not uploaded with the artifacts but the other build environment variables are.

      Here is the example pipeline we use for testing this bug:

      node('remote-node') {
          stage ('checkout') {
              checkout scm
          }
      
          stage ('build') {
              sh 'make -j12'
          }
          
          stage('artifactory') {
              def upload_spec = """{
                "files":
                [
                  {
                    "pattern": "*.tar.gz",
                    "target": "embedded-build/project/branch/version/"
                  }
                ]
              }
              """
              def server = Artifactory.server 'artifactory.company.com'
              def build_info = Artifactory.newBuildInfo()
      
              build_info.env.capture = true
              build_info.retention maxDays: 90,
                                   deleteBuildArtifacts: true
      
              server.upload spec: upload_spec, buildInfo: build_info
              server.publishBuildInfo build_info
          }
      }
      

            eyalbe Eyal Ben Moshe
            mdelaney Mike Delaney
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: