Error during fetching git repository on Jenkins (not each time) -
i've got jenkins job run unit tests. every 10 minutes checks if there new changes in git repository. if find changes, runs tests.
this error occurs every 2-3 builds. other builds ok.
logs error:
> git rev-parse --is-inside-work-tree # timeout=10 fetching changes remote git repository > git config remote.origin.url gitlab@gitlab:group/project.git # timeout=10 pruning obsolete local branches fetching upstream changes gitlab@gitlab:group/project.git > git --version # timeout=10 > git fetch --tags --progress gitlab@gitlab:group/project.git +refs/heads/*:refs/remotes/origin/* --prune error: error fetching remote repo 'origin' hudson.plugins.git.gitexception: failed fetch gitlab@gitlab:group/project.git @ hudson.plugins.git.gitscm.fetchfrom(gitscm.java:797) @ hudson.plugins.git.gitscm.retrievechanges(gitscm.java:1051) @ hudson.plugins.git.gitscm.checkout(gitscm.java:1082) @ hudson.scm.scm.checkout(scm.java:485) @ hudson.model.abstractproject.checkout(abstractproject.java:1269) @ hudson.model.abstractbuild$abstractbuildexecution.defaultcheckout(abstractbuild.java:604) @ jenkins.scm.scmcheckoutstrategy.checkout(scmcheckoutstrategy.java:86) @ hudson.model.abstractbuild$abstractbuildexecution.run(abstractbuild.java:529) @ hudson.model.run.execute(run.java:1741) @ hudson.model.freestylebuild.run(freestylebuild.java:43) @ hudson.model.resourcecontroller.execute(resourcecontroller.java:98) @ hudson.model.executor.run(executor.java:410) caused by: hudson.plugins.git.gitexception: command "git fetch --tags --progress gitlab@gitlab:group/project.git +refs/heads/*:refs/remotes/origin/* --prune" returned status code 1: stdout: stderr: remote: counting objects: 14, done. remote: compressing objects: 7% (1/14) remote: compressing objects: 14% (2/14) remote: compressing objects: 21% (3/14) remote: compressing objects: 28% (4/14) remote: compressing objects: 35% (5/14) remote: compressing objects: 42% (6/14) remote: compressing objects: 50% (7/14) remote: compressing objects: 57% (8/14) remote: compressing objects: 64% (9/14) remote: compressing objects: 71% (10/14) remote: compressing objects: 78% (11/14) remote: compressing objects: 85% (12/14) remote: compressing objects: 92% (13/14) remote: compressing objects: 100% (14/14) remote: compressing objects: 100% (14/14), done. remote: total 14 (delta 11), reused 0 (delta 0) gitlab:group/project + 9d4232f...2eb8fcb head -> origin/head (forced update) error: ref refs/remotes/origin/develop @ 2eb8fcb4a998bab10ee5851a56b61b5fc3b7bec5 expected 9d4232f08532456b4c69a0307cdc96bd267f12b2 ! 9d4232f..bcdc945 develop -> origin/develop (unable update local ref) eb750cb..b4d4ce2 master -> origin/master @ org.jenkinsci.plugins.gitclient.cligitapiimpl.launchcommandin(cligitapiimpl.java:1752) @ org.jenkinsci.plugins.gitclient.cligitapiimpl.launchcommandwithcredentials(cligitapiimpl.java:1495) @ org.jenkinsci.plugins.gitclient.cligitapiimpl.access$300(cligitapiimpl.java:64) @ org.jenkinsci.plugins.gitclient.cligitapiimpl$1.execute(cligitapiimpl.java:315) @ hudson.plugins.git.gitscm.fetchfrom(gitscm.java:795) ... 11 more error: null
here logs build without error:
> git rev-parse --is-inside-work-tree # timeout=10 fetching changes remote git repository > git config remote.origin.url gitlab@gitlab:group/project.git # timeout=10 pruning obsolete local branches fetching upstream changes gitlab@gitlab:group/project.git > git --version # timeout=10 > git fetch --tags --progress gitlab@gitlab:group/project.git +refs/heads/*:refs/remotes/origin/* --prune > git rev-parse origin/develop^{commit} # timeout=10 checking out revision 2eb8fcb4a998bab10ee5851a56b61b5fc3b7bec5 (origin/develop) > git config core.sparsecheckout # timeout=10 > git checkout -f 2eb8fcb4a998bab10ee5851a56b61b5fc3b7bec5 > git rev-list 9d4232f08532456b4c69a0307cdc96bd267f12b2 # timeout=10 set build name. new build name '#16007-origin/develop-2eb8fcb' [workspace] $ /bin/sh -xe /tmp/hudson5005409752690042196.sh + echo '' + echo '' + /usr/local/bin/prove -j 3 --lib --timer --nocount --formatter=tap::formatter::junit /var/lib/jenkins/jobs/project/workspace/t build step 'execute shell' marked build failure set build name. new build name '#16007-origin/develop-2eb8fcb' variable name 'build_display_name' exists, current value: '#16007-origin/develop-2eb8fcb', new value: '#16007-origin/develop-2eb8fcb'
i don't understand why error occurs. want eliminate it. jenkins job shows me fake errors (not being result of test status).
edit. noticed when execute last git fetch command in workspace directory myself returns me 2 different results in turns (i'm not sure if connected above error):
bash-4.1$ git fetch --tags --progress gitlab@gitlab:group/project.git +refs/heads/*:refs/remotes/origin/* --prune gitlab:group/project + c3a0c12...2eb8fcb head -> origin/head (forced update) bash-4.1$ git fetch --tags --progress gitlab@gitlab:group/project.git +refs/heads/*:refs/remotes/origin/* --prune gitlab:group/project 2eb8fcb..c3a0c12 develop -> origin/develop bash-4.1$ git fetch --tags --progress gitlab@gitlab:group/project.git +refs/heads/*:refs/remotes/origin/* --prune gitlab:group/project + c3a0c12...2eb8fcb head -> origin/head (forced update) bash-4.1$ git fetch --tags --progress gitlab@gitlab:group/project.git +refs/heads/*:refs/remotes/origin/* --prune gitlab:group/project 2eb8fcb..c3a0c12 develop -> origin/develop
Comments
Post a Comment