Jens Schauder
Jens Schauder

Reputation: 81862

Push from jenkins to github fails silently

I have a Jenkins job configured which should push changes back into a github git repository. When I look into the console, everything looks fine, the job gets classified as success. The only problem is: nothing shows up in github.

I registered the public key of cloudbees with the github repository, and this works properly for triggering the build in the first place.

Any idea what is going on, and how I might be able to fix/debug this?

Jenkins Configuration:

Branches to build: gh-pages

Branch to push: gh-pages or: remotes/origin/gh-pages

I also tried complete nonsense without any change to the result

Target remote name: origin

The following is the console output of 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

... skipped many similar lines ...

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

Upvotes: 0

Views: 2047

Answers (2)

Swetha
Swetha

Reputation: 33

This is a similar issue.

Set the Git publisher in post build actions to push and merge results. Provide the branch name you want to push to. Add post build shell script as mentioned in the URL.

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

This fixes the problem with git-client plugin to push changes back to origin.

Upvotes: 0

nicolas de loof
nicolas de loof

Reputation: 2633

This has been reported as a regression in Git plugin, due to JGit use in git-client 1.0.4 see JENKINS-17242

this has been fixed in git-client plugin 1.0.5 by reverting change and use git-cli

Upvotes: 4

Related Questions