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

how to upload big file via base64file in pipeline

XMLWordPrintable

      hello everyone,
      I'm new to jenkins, and I encountered a problem when using jenkins to upload files to the working directory, which has troubled me for several days. So I had to come here to ask everyone.

      I want to upload some pictures or files to the working directory through the pipeline, and then upload them to git. The following is my pipeline

      ```bash

      pipeline {
          agent

      {         label 'master'     }

              base64File(name: 'pdfile', description: 'pdf')
        }
          stages {
                      stage('rename file') {
                              steps {
                                   withFileParameter(name:'pdfile', allowNoFile: false) {
                                       sh """ mv $pdfile ${workspace}/example.pdf """
                                   }
                              }
                      }
          }
      }

      ```

      I followed the code samples in the jenkins docs and it looks like it didn't work out. Afterwards, I found out that base64 is only effective for small files, so how to upload files of MB or larger in the pipeline now?

            Unassigned Unassigned
            xianfei seth
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: