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

With very large job parameters (GitHub payload) the gitscm checkout dose not work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • None
    • Jenkins 2.263.4
      Build Node Centos 7
      git Plugin version 4.3.0
      git Plugin update to Version 4.7.2 with no success version 2.263.4 will be an issue to the benfit of doubt and it will be done through the
    • Blue Ocean 1.5 - beta 3
    • it is related to the jenkins and jira

      Related Issue JENKINS-38576

      When GitHub is triggering Jenkins Job with large payload. The git checkout on an linux Jenkins node dose not work as expected.

      The following pipeline test script works fine when started with the default payload.

       

      properties([
              parameters([
                  string(name: 'payload', defaultValue: '{"deleted/text":"deleted/text"}', description: 'JSON String deliverd with GitHub webhook'),
              ])
      ])
      // remove leading and trailing whitespace from input
      GITHUB_JSON_PAYLOAD = payload.trim()
      env.payload="deleted payload 0"
      echo "Parameter: GITHUB_JSON_PAYLOAD='$GITHUB_JSON_PAYLOAD'"
      payload="payload deleted 1"
      node('master') {
          withEnv(['payload="payload deleted 2"',
                  ]) {
              stage('Test with shell') {
                  sh "env|sort"
              }
              stage('Test with github') {
                  checkout([$class: 'GitSCM', branches: [[name: "master"]], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: "https://github.com/isomorphic-git/test.empty.git"]]])
              }
          }
      }
      
      

      But when you run it with a large payload parameter it is not working. The checkout command on an Centos 7 Linux node fails.

      Caused by: java.io.IOException: error=7, Argument list too long

      Even the workaround "delete payload environment variable is not working"

      With this information the error should be easily reproducible.

      For an example of a problematic payload see the Attached file ProblematicPayload.txt.

      One problematic payload is a 176223 bytes long json string.

        

            aaronjwhiteside Aaron Whiteside
            brosmar bros mar
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: