从jenkins推送到github无声地失败

时间:2013-03-23 18:37:56

标签: git github jenkins push cloudbees

我配置了一个Jenkins作业,它应该将更改推送回github git存储库。当我查看控制台时,一切看起来都很好,工作被归类为成功。唯一的问题是:github中没有任何内容。

我使用github存储库注册了cloudbees的公钥,这适用于首先触发构建。

知道发生了什么,以及我如何能够修复/调试它?

詹金斯配置:

要构建的分支:gh-pages

分支推: gh-pages或:remotes/origin/gh-pages

我也尝试完全废话而不对结果进行任何更改

目标远程名称:origin

以下是jenkins的控制台输出:

Started by user Jens Schauder
Started by user Jens Schauder
Building remotely on s-9c5ce0c6 in workspace /scratch/jenkins/workspace/degraph-publish-page
Checkout:degraph-publish-page / /scratch/jenkins/workspace/degraph-publish-page - hudson.remoting.Channel@7607cd7e:s-9c5ce0c6
Using strategy: Default
Last Built Revision: Revision 1a647b55a3afb68420e154897aa182858a83389e (origin/gh-pages)
Fetching changes from 1 remote Git repository
Commencing build of Revision 1a647b55a3afb68420e154897aa182858a83389e (origin/gh-pages)
Checking out Revision 1a647b55a3afb68420e154897aa182858a83389e (origin/gh-pages)
Copied 135 artifacts from "degraph-commit" build number 51
[Gradle] - Launching build.
[degraph-publish-page] $ /scratch/jenkins/workspace/degraph-publish-page/gradlew mvFiles gitAdd gitCommit
:mvFiles
:gitAdd
:gitCommit
[gh-pages e75cd69] "automatic updated of scaladoc"
 135 files changed, 25947 insertions(+)
 create mode 100644 nightly/docs/scaladoc/de/package.html
 create mode 100644 nightly/docs/scaladoc/de/schauderhaft/degraph/Degraph$.html
 create mode 100644 nightly/docs/scaladoc/de/schauderhaft/degraph/analysis/dependencyFinder/Analyzer$.html
 create mode 100644 nightly/docs/scaladoc/de/schauderhaft/degraph/analysis/dependencyFinder/AnalyzerLike.html

...跳过许多相似的行...

create mode 100644 nightly/docs/scaladoc/lib/valuemembersbg.gif
 create mode 100644 nightly/docs/scaladoc/package.html

BUILD SUCCESSFUL

Total time: 12.023 secs
Build step 'Invoke Gradle script' changed build result to SUCCESS
Pushing HEAD to branch remotes/origin/gh-pages at repo origin
Opening connection
Counting objects
Finding sources
Getting sizes
Compressing objects
Writing objects
Finished: SUCCESS

2 个答案:

答案 0 :(得分:4)

由于在git-client 1.0.4中使用了JGit,因此在Git插件中报告为回归 见JENKINS-17242

通过恢复更改并使用git-cli

修复了git-client插件1.0.5

答案 1 :(得分:0)

这是一个类似的issue

在后期构建操作中设置Git发布者以推送和合并结果。提供要推送的分支名称。添加post build build脚本,如URL中所述。

    git add .
    git commit -m 'Update from Jenkins'

这解决了git-client插件将更改推回原点的问题。