Jenkins管道-sh-git推送随机失败-错误:脚本返回退出代码128



环境:
ENVu2028Jenkins操作员
Jenkins 2.249.1
管道

故障


[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

u2028相同代码成功运行:

+ git commit -m New customer test49

[master 9c0b093] New customer test49

1 file changed, 32 insertions

create mode 100644 deployment/test49.yaml
    
+ git push origin

To https://github.com/****/xxxxxxxxx.git 770e517..9c0b093 master -> master

请帮忙,这已经持续了一段时间了,我不知道是什么问题。

  1. 我正在将Jenkins的凭据存储到签出代码中
  2. 在stage"多命令中使用sh"u20283.这曾经在旧版本的Jenkins中工作,最近Jenkins操作员重新启动并删除了最新版本的Jenkins2.249.1
  3. 我主要看到的问题是";git-push";或在";git";相关cmd

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

u2028我早期的工作代码是基于创建新分支和推送到repo,这有随机故障,所以将逻辑更改为直接推送到master。

Another failure while deleting the remote branch
Branch name test58 already exists, deleting it
+ git push -d origin test58
[Pipeline] }[Pipeline] // stage[Pipeline] }
[Pipeline] // withEnv[Pipeline] }
[Pipeline] // withCredentials[Pipeline] }
[Pipeline] // withEnv[Pipeline] }
[Pipeline] // node[Pipeline] }
[Pipeline] // podTemplate[Pipeline]
End of Pipeline
ERROR: script returned exit code 128
Finished: FAILURE

CMD失败

+ git ls-remote --heads origin test81
[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

相同CMD成功

wc=$(git ls-remote --heads origin $BR |wc |awk '{print$1}')
+ git ls-remote --heads origin test81 
75dfaff2153dec5730066e716c37ad67a46d733a refs/heads/test81 
+ git ls-remote --heads origin test81 
+ wc + awk {print$1} 
+ wc=1 
+ echo Value of wc is $wc Value of wc is $wc 
+ [ 1 -ne 0 ] 
+ echo Branch name test81 already exists, deleting it Branch name test81 already exists, deleting it 
+ git config push.default simple 
+ git push -d origin test81 
To https://github.com/****/svc_workflowexecutor.git 
- [deleted] test81

随机故障。

这些问题在不同的地方随机发生(我推送了大约10个不同的回购(,我们也看到API利率限制超过了问题。

问题仍未解决,将随时向您更新。

我也注意到了这种行为,并切换到ssh repo-urls。当我不需要更改时,我使用https

相关内容

  • 没有找到相关文章

最新更新