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

download and upload attachments are not working on slaves but just on master node

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • jira-steps-plugin
    • None

      The below code works on master node, but not on the slave, unfortunately I couldn't catch this as I am running a local jenkins without any slaves but just a master with multiple agents.

      node {
          writeFile file: 'abc/test.txt', text: 'Test Attachment - Hello'
          def attachment = jiraUploadAttachment idOrKey: 'TEST-123', file: 'abc/test.txt', site: 'JIRA'
          def attachmentId = attachment.data[0].id.toString()
          attachment = jiraGetAttachmentInfo id: attachmentId, site: 'JIRA'
          echo attachment.data.toString()
          jiraDownloadAttachment id: attachmentId, file: "abc/test.txt", override: true, site: 'JIRA'
          def file = readFile 'abc/test.txt'
          echo file.toString()
          jiraDeleteAttachment id: attachmentId, site: 'JIRA'
      }
      

            nrayapati Naresh Rayapati
            nrayapati Naresh Rayapati
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: