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

Jenkins pipeline - sh - git push fails randomly - ERROR: script returned exit code 128

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • pipeline
    • None
    • Jenkins Operator
      Jenkins 2.249.1

      FAILURE 
       
      [master cc6be50] New customer test60
      1 file changed, 32 insertions
      create mode 100644 deployment/test60.yaml
      + git push origin

      [Pipeline] }

      [Pipeline] // stage[Pipeline] }

      [Pipeline] // withEnv[Pipeline] }

      [Pipeline] // withCredentials[Pipeline] }

      [Pipeline] // node[Pipeline] }

      [Pipeline] // podTemplate

      [Pipeline] End of Pipeline

      ERROR: script returned exit code 128
      Finished: FAILURE
      SAME CODE SUCCESSFUL RUN:

      + git commit -m New customer test49
      [master 9c0b093] New customer test49
      1 file changed, 32 insertions
      create mode 100644 deployment/helm/workflow/test49.yaml
      + git push origin
      To https://github.com/****/xxxxxxxxx.git 770e517..9c0b093 master -> master

       

      PLEASE HELP THIS HAS BEEN GOING ON FOR SOMETIME NOW, I AM NOT ABLE TO FIGURE OUT WHAT IS THE ISSUE.

      1. I am storing credentials from Jenkins to checkout code.
      2. Using sh ''' multi commands 
           '''
      3. This used to work in  older version of Jenkins and git version 2.20.2
      Recently jenkins operator got restarted and pulled recent version of Jenkins 2.249.1 & git version 2.11.0

      4. I am mostly seeing the issue with "git push" or in "git" related cmds

      FAILURE ON "git ls-remote". 

      + git ls-remote --heads origin test47
      [Pipeline] }[Pipeline] // stage

      [Pipeline] }

      [Pipeline] // withEnv[Pipeline] }

      [Pipeline] // withCredentials[Pipeline] }

      [Pipeline] // node[Pipeline] }

      [Pipeline] // podTemplate

      [Pipeline] End of Pipeline

      ERROR: script returned exit code 128
      Finished: FAILURE
      My earlier working code was based on create new branch and pushing to repo which has random failures so changed the logic to directly push to master.

      PLEASE HELP.
      THANK YOU

            Unassigned Unassigned
            prabhukasisekar Prabhu Kasisekar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: