gpt4 book ai didi

git - 测试成功如何使用Jenkins推送到Github?

转载 作者:太空狗 更新时间:2023-10-29 14:18:46 24 4
gpt4 key购买 nike

我目前在 Git 上有一个 Python 项目。该仓库有 2 个不同的 Remote ;一个叫做 origin,另一个叫做 github。有一个 Jenkins 作业在提交到 origin/master 时触发,它使用命令 nosetests-3.2 -v 运行单元测试。当测试成功完成后,我希望将 Jenkins 作业推送到 github/master。我尝试使用 GitPublisher 构建后操作,但出现以下错误:

ERROR: Publisher hudson.plugins.git.GitPublisher aborted due to exception
hudson.AbortException: No repository found for target repo name github
at hudson.plugins.git.GitPublisher.perform(GitPublisher.java:330)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670)
at hudson.model.Run.execute(Run.java:1766)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:374)

我做错了什么?这是我的 GitPublisher 配置的样子:

GitPublisher Config

最佳答案

将评论复制/粘贴到答案中以便接受:

Remotes are not synced when you do a git push. Are you sure that the git repo that Jenkins is using has the github remote?

关于git - 测试成功如何使用Jenkins推送到Github?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29737464/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com