jenkins-git-notes-plugin's People
jenkins-git-notes-plugin's Issues
does not work on slave nodes
The git-notes plugin does not work on slave nodes and fails with errors like:
ERROR: /data/jenkins/workspace/foo-master (Grit::NoSuchPathError)
/var/lib/jenkins/plugins/git-notes/WEB-INF/classes/vendor/gems/gems/grit-2.4.1/lib/grit/repo.rb:53:in `initialize'
/var/lib/jenkins/plugins/git-notes/WEB-INF/classes/models/git_notes_publisher.rb:27:in `perform'
/var/lib/jenkins/plugins/git-notes/WEB-INF/classes/vendor/gems/gems/jenkins-plugin-runtime-0.1.27/lib/jenkins/plugin/proxies/build_step.rb:14:in `perform'
/var/lib/jenkins/plugins/git-notes/WEB-INF/classes/vendor/gems/gems/jenkins-plugin-runtime-0.1.27/lib/jenkins/plugin/proxies/build_step.rb:22:in `boolean_result'
/var/lib/jenkins/plugins/git-notes/WEB-INF/classes/vendor/gems/gems/jenkins-plugin-runtime-0.1.27/lib/jenkins/plugin/proxies/build_step.rb:13:in `perform'
Build step 'Publish build result as git-notes' marked build as failure
This looks like a common beginner mistake: the code is actually running on the master (the /var/lib/jenkins/plugins paths) so we either need to use FilePath or Launcher Jenkins abstractions to get at the git information on the slave. This may mean that we can't make use of Grit.
Does not honor path
When I have git installed in custom folder and PATH variable is defined in jenkins, this plugin is failing with "command not found" error.
Ignores global .gitconfig when Jenkins runs as war file inside tomcat
Jenkins is setup as a .war file inside tomcat and is running as the user 'tomcat'. There is an appropriate .gitconfig in the user's home directory and the permissions on the file and the directory are correct.
However when git-notes is executed at the end of the build it results in:
Pushing tag v22 to repo origin
git-notes plugin: building new notes hash
git-notes plugin: updating git notes
git-notes plugin: fetching notes
git-notes plugin: running command "git fetch -f origin refs/notes/*:refs/notes/*" with opts {:raise=>true}
[workspace] $ git fetch -f origin refs/notes/*:refs/notes/*
git-notes plugin: returning results of run: {:out=>"", :err=>"***************************************************************************\n NOTICE TO USERS\n\n\nThis computer system is the private property of its owner, whether\nindividual, corporate or government. It is for authorized use only.\nUsers (authorized or unauthorized) have no explicit or implicit\nexpectation of privacy.\n\nAny or all uses of this system and all files on this system may be\nintercepted, monitored, recorded, copied, audited, inspected, and\ndisclosed to your employer, to authorized site, government, and law\nenforcement personnel, as well as authorized officials of government\nagencies, both domestic and foreign.\n\nBy using this system, the user consents to such interception, monitoring,\nrecording, copying, auditing, inspection, and disclosure at the\ndiscretion of such personnel or officials. Unauthorized or improper use\nof this system may result in civil and criminal penalties and\nadministrative or disciplinary action, as appropriate. By continuing to\nuse this system you indicate your awareness of and consent to these terms\nand conditions of use. LOG OFF IMMEDIATELY if you do not agree to the\nconditions stated in this warning.\n\n****************************************************************************\n", :val=>0}
git-notes plugin: showing notes
git-notes plugin: running command "git notes --ref jenkins show" with opts {}
[workspace] $ git notes --ref jenkins show
git-notes plugin: returning results of run: {:out=>"", :err=>"error: No note found for object 8a3d23d81068ce89490ec572b153487e974adb53.\n", :val=>1}
git-notes plugin: no existing note
git-notes plugin: running command "git notes --ref jenkins add -f -F -" with opts {:stdin_str=>"{\n \"built_on\": \"master\",\n \"duration\": 383.393000065,\n \"full_display_name\": \"exampleWebService-maven #22\",\n \"id\": \"2013-11-24_09-49-20\",\n \"number\": 22,\n \"result\": \"SUCCESS\",\n \"status_message\": \"?\",\n \"time\": \"2013-11-24 09:49:20 +0000\",\n \"url\": \"job/exampleWebService-maven/22/\"\n}", :raise=>true}
[workspace] $ git notes --ref jenkins add -f -F -
ERROR: Unexpected exit code (128): command: "git notes --ref jenkins add -f -F -": result: {:out=>"", :err=>"\n*** Please tell me who you are.\n\nRun\n\n git config --global user.email \"[email protected]\"\n git config --global user.name \"Your Name\"\n\nto set your account's default identity.\nOmit --global to set the identity only in this repository.\n\nfatal: empty ident name (for <[email protected]>) not allowed\n", :val=>128} (RuntimeError)
/srv/jenkins/plugins/git-notes/WEB-INF/classes/lib/build_participant.rb:56:in `run'
/srv/jenkins/plugins/git-notes/WEB-INF/classes/lib/git_updater.rb:36:in `push_notes'
/srv/jenkins/plugins/git-notes/WEB-INF/classes/lib/git_updater.rb:14:in `update!'
/srv/jenkins/plugins/git-notes/WEB-INF/classes/models/git_notes_publisher.rb:36:in `perform'
org/jruby/RubyProc.java:249:in `call'
/srv/jenkins/plugins/git-notes/WEB-INF/classes/lib/build_context.rb:14:in `set'
/srv/jenkins/plugins/git-notes/WEB-INF/classes/models/git_notes_publisher.rb:30:in `perform'
/srv/jenkins/plugins/git-notes/WEB-INF/classes/vendor/gems/gems/jenkins-plugin-runtime-0.1.27/lib/jenkins/plugin/proxies/build_step.rb:14:in `perform'
/srv/jenkins/plugins/git-notes/WEB-INF/classes/vendor/gems/gems/jenkins-plugin-runtime-0.1.27/lib/jenkins/plugin/proxies/build_step.rb:22:in `boolean_result'
/srv/jenkins/plugins/git-notes/WEB-INF/classes/vendor/gems/gems/jenkins-plugin-runtime-0.1.27/lib/jenkins/plugin/proxies/build_step.rb:13:in `perform'
Build step 'Publish build result as git-notes' marked build as failure
For your reference:
root@tools:/srv/tomcat# getent passwd tomcat
tomcat:x:111:114::/srv/tomcat:/usr/sbin/nologin
root@tools:/srv/tomcat# cat .gitconfig
[user]
name = Jenkins CI
email = [email protected]
[core]
whitespace = input
root@tools:/srv/tomcat# ls -la
drwxr-x--- 14 tomcat tomcat 4096 Nov 24 09:40 .
drwxr-xr-x 13 root root 4096 Oct 22 21:15 ..
-rw-r--r-- 1 tomcat tomcat 96 Nov 24 09:40 .gitconfig
Multi-configuration projects
When building a multiconfiguration request, the plugin overwrites the notes from the previous subjobs. This makes it less useful, because you won't see if a build succeeded with the not-most-recently build code.
Eg. I'm using a multiconfigurationjob for building code for Android, iOS, Linux and Windows. The last build was for Windows, but I can't see (in the notes) if the Android and iOS builds succeeded.
Fails when credentials are not in the GIT URL
Login Credentials have to be set in the GIT URL to make this work.
Bettwe would be to use the provided credentials in Jenkins.
Git 'detached head' causing "fatal: Needed a single revision"
- Git Plugin: 1.1.21
- git-notes Plugin: 0.0.4
- Jenkins: 1.474
First off, thanks for writing this plugin!
- NB: There doesn't seem to be any documentation on how this plugin integrates with the Git Plugin, so it's possible the problem I'm seeing is due to an error in my setup.
When I add the git-notes 'Post-build Action' to my job I'm seeing the following output:
git-notes plugin: building new notes hash
git-notes plugin: updating git notes
git-notes plugin: fetching notes
git-notes plugin: running command "git fetch -f origin refs/notes/*:refs/notes/*" with opts {:raise=>true}
[workspace] $ git fetch -f origin refs/notes/*:refs/notes/*
git-notes plugin: returning results of run: {:out=>"", :err=>"", :val=>0}
git-notes plugin: showing notes
git-notes plugin: running command "git notes --ref jenkins show" with opts {}
[workspace] $ git notes --ref jenkins show
git-notes plugin: returning results of run: {:out=>"", :err=>"fatal: Needed a single revision\nInvalid commit: jenkins show\n", :val=>1}
git-notes plugin: no existing note
git-notes plugin: running command "git notes --ref jenkins add -f -F -" with opts {:stdin_str=>"{\n \"built_on\": \"master\",\n \"duration\": 57.61,\n \"full_display_name\": \"boundary-annotations-python #23\",\n \"id\": \"2012-07-25_13-03-07\",\n \"number\": 23,\n \"result\": \"FAILURE\",\n \"status_message\": \"?\",\n \"time\": \"2012-07-25 13:03:07 +0000\",\n \"url\": \"job/boundary-annotations-python/23/\"\n}", :raise=>true}
[workspace] $ git notes --ref jenkins add -f -F -
ERROR: Unexpected exit code (1): command: "git notes --ref jenkins add -f -F -": result: {:out=>"", :err=>"fatal: Needed a single revision\nInvalid commit: jenkins add -f -F -\n", :val=>1} (RuntimeError)
/var/lib/jenkins/plugins/git-notes/WEB-INF/classes/lib/build_participant.rb:56:in `run'
/var/lib/jenkins/plugins/git-notes/WEB-INF/classes/lib/git_updater.rb:36:in `push_notes'
/var/lib/jenkins/plugins/git-notes/WEB-INF/classes/lib/git_updater.rb:14:in `update!'
/var/lib/jenkins/plugins/git-notes/WEB-INF/classes/models/git_notes_publisher.rb:36:in `perform'
org/jruby/RubyProc.java:258:in `call'
/var/lib/jenkins/plugins/git-notes/WEB-INF/classes/lib/build_context.rb:14:in `set'
/var/lib/jenkins/plugins/git-notes/WEB-INF/classes/models/git_notes_publisher.rb:30:in `perform'
/var/lib/jenkins/plugins/git-notes/WEB-INF/classes/vendor/gems/gems/jenkins-plugin-runtime-0.1.27/lib/jenkins/plugin/proxies/build_step.rb:14:in `perform'
/var/lib/jenkins/plugins/git-notes/WEB-INF/classes/vendor/gems/gems/jenkins-plugin-runtime-0.1.27/lib/jenkins/plugin/proxies/build_step.rb:22:in `boolean_result'
/var/lib/jenkins/plugins/git-notes/WEB-INF/classes/vendor/gems/gems/jenkins-plugin-runtime-0.1.27/lib/jenkins/plugin/proxies/build_step.rb:13:in `perform'
Build step 'Publish build result as git-notes' marked build as failure
I'm guessing this is due to the fact that the job workspace has no branch checked out (detached head?):
/var/lib/jenkins/workspace/boundary-annotations-python [(no branch)]$ git status
# Not currently on any branch.
Which is weird, because I've specified a branch for my Git Plugin:
A possible work-around would be for the git-notes plugin to checkout the GIT_COMMIT environmental variable provided by the Git Plugin?
e.g. git checkout $GIT_COMMIT
I'm totally willing to accept that this is a problem in the Git Plugin though...
Does not Work when repo is checked out in subdirectory
When the Repo is checked out in a sub directory the plugin fails because it's not possible to select a directory where the plugin should run in.
Failure to push notes due to strange ConcurrentUpdater exception
Hello,
I have the following failures on my build using git-notes plugin:
git-notes plugin: building new notes hash
git-notes plugin: updating git notes
git-notes plugin: fetching notes
git-notes plugin: running command "git fetch -f origin refs/notes/*:refs/notes/*" with opts {:raise=>true}
[workspace] $ git fetch -f origin refs/notes/*:refs/notes/*
git-notes plugin: returning results of run: {:out=>"", :err=>"", :val=>0}
git-notes plugin: showing notes
git-notes plugin: running command "git notes --ref jenkins show" with opts {}
[workspace] $ git notes --ref jenkins show
git-notes plugin: returning results of run: {:out=>"", :err=>"error: No note found for object 96db46575aa003dd8b5addb0674f959fc06ad7e5.\n", :val=>1}
git-notes plugin: no existing note
git-notes plugin: running command "git notes --ref jenkins add -f -F -" with opts {:stdin_str=>"{\n \"built_on\": \"master\",\n \"duration\": 462.541000099,\n \"full_display_name\": \"mx-console #578\",\n \"id\": \"2014-02-14_22-40-52\",\n \"number\": 578,\n \"result\": \"SUCCESS\",\n \"status_message\": \"?\",\n \"time\": \"2014-02-14 22:40:52 +0800\",\n \"url\": \"job/mx-console/578/\"\n}", :raise=>true}
[workspace] $ git notes --ref jenkins add -f -F -
git-notes plugin: returning results of run: {:out=>"", :err=>"", :val=>0}
git-notes plugin: running command "git push origin refs/notes/jenkins" with opts {}
[workspace] $ git push origin refs/notes/jenkins
git-notes plugin: returning results of run: {:out=>"", :err=>"remote: Resolving deltas: 25% (1/4) \e[K\rremote: Resolving deltas: 50% (2/4) \e[K\rremote: Resolving deltas: 75% (3/4) \e[K\rremote: Resolving deltas: 100% (4/4) \e[K\rremote: Resolving deltas: 100% (4/4)\e[K\nremote: \rremote: Processing changes: refs: 1\e[K\rremote: Processing changes: refs: 1, done \e[K\nTo ssh://[email protected]:29418/mx-console\n ! [remote rejected] refs/notes/jenkins -> refs/notes/jenkins (prohibited by Gerrit)\nerror: failed to push some refs to 'ssh://[email protected]:29418/mx-console'\n", :val=>1}
ERROR: git-notes plugin: caught ConcurrentUpdateError while updating git notes, retrying (2x left)
git-notes plugin: updating git notes
git-notes plugin: fetching notes
git-notes plugin: running command "git fetch -f origin refs/notes/*:refs/notes/*" with opts {:raise=>true}
[workspace] $ git fetch -f origin refs/notes/*:refs/notes/*
git-notes plugin: returning results of run: {:out=>"", :err=>"", :val=>0}
git-notes plugin: showing notes
git-notes plugin: running command "git notes --ref jenkins show" with opts {}
[workspace] $ git notes --ref jenkins show
git-notes plugin: returning results of run: {:out=>"{\n \"built_on\": \"master\",\n \"duration\": 462.541000099,\n \"full_display_name\": \"mx-console #578\",\n \"id\": \"2014-02-14_22-40-52\",\n \"number\": 578,\n \"result\": \"SUCCESS\",\n \"status_message\": \"?\",\n \"time\": \"2014-02-14 22:40:52 +0800\",\n \"url\": \"job/mx-console/578/\"\n}\n", :err=>"", :val=>0}
git-notes plugin: existing note: {
"built_on": "master",
"duration": 462.541000099,
"full_display_name": "mx-console #578",
"id": "2014-02-14_22-40-52",
"number": 578,
"result": "SUCCESS",
"status_message": "?",
"time": "2014-02-14 22:40:52 +0800",
"url": "job/mx-console/578/"
}
git-notes plugin: running command "git notes --ref jenkins add -f -F -" with opts {:stdin_str=>"{\n \"built_on\": \"master\",\n \"duration\": 462.541000099,\n \"full_display_name\": \"mx-console #578\",\n \"id\": \"2014-02-14_22-40-52\",\n \"number\": 578,\n \"result\": \"SUCCESS\",\n \"status_message\": \"?\",\n \"time\": \"2014-02-14 22:40:52 +0800\",\n \"url\": \"job/mx-console/578/\"\n}", :raise=>true}
[workspace] $ git notes --ref jenkins add -f -F -
git-notes plugin: returning results of run: {:out=>"", :err=>"Overwriting existing notes for object 96db46575aa003dd8b5addb0674f959fc06ad7e5\n", :val=>0}
git-notes plugin: running command "git push origin refs/notes/jenkins" with opts {}
[workspace] $ git push origin refs/notes/jenkins
git-notes plugin: returning results of run: {:out=>"", :err=>"remote: Resolving deltas: 20% (1/5) \e[K\rremote: Resolving deltas: 40% (2/5) \e[K\rremote: Resolving deltas: 60% (3/5) \e[K\rremote: Resolving deltas: 80% (4/5) \e[K\rremote: Resolving deltas: 100% (5/5) \e[K\rremote: Resolving deltas: 100% (5/5)\e[K\nremote: \rremote: Processing changes: refs: 1\e[K\rremote: Processing changes: refs: 1, done \e[K\nTo ssh://[email protected]:29418/mx-console\n ! [remote rejected] refs/notes/jenkins -> refs/notes/jenkins (prohibited by Gerrit)\nerror: failed to push some refs to 'ssh://[email protected]:29418/mx-console'\n", :val=>1}
ERROR: git-notes plugin: caught ConcurrentUpdateError while updating git notes, retrying (1x left)
git-notes plugin: updating git notes
git-notes plugin: fetching notes
git-notes plugin: running command "git fetch -f origin refs/notes/*:refs/notes/*" with opts {:raise=>true}
[workspace] $ git fetch -f origin refs/notes/*:refs/notes/*
git-notes plugin: returning results of run: {:out=>"", :err=>"", :val=>0}
git-notes plugin: showing notes
git-notes plugin: running command "git notes --ref jenkins show" with opts {}
[workspace] $ git notes --ref jenkins show
git-notes plugin: returning results of run: {:out=>"{\n \"built_on\": \"master\",\n \"duration\": 462.541000099,\n \"full_display_name\": \"mx-console #578\",\n \"id\": \"2014-02-14_22-40-52\",\n \"number\": 578,\n \"result\": \"SUCCESS\",\n \"status_message\": \"?\",\n \"time\": \"2014-02-14 22:40:52 +0800\",\n \"url\": \"job/mx-console/578/\"\n}\n", :err=>"", :val=>0}
git-notes plugin: existing note: {
"built_on": "master",
"duration": 462.541000099,
"full_display_name": "mx-console #578",
"id": "2014-02-14_22-40-52",
"number": 578,
"result": "SUCCESS",
"status_message": "?",
"time": "2014-02-14 22:40:52 +0800",
"url": "job/mx-console/578/"
}
git-notes plugin: running command "git notes --ref jenkins add -f -F -" with opts {:stdin_str=>"{\n \"built_on\": \"master\",\n \"duration\": 462.541000099,\n \"full_display_name\": \"mx-console #578\",\n \"id\": \"2014-02-14_22-40-52\",\n \"number\": 578,\n \"result\": \"SUCCESS\",\n \"status_message\": \"?\",\n \"time\": \"2014-02-14 22:40:52 +0800\",\n \"url\": \"job/mx-console/578/\"\n}", :raise=>true}
[workspace] $ git notes --ref jenkins add -f -F -
git-notes plugin: returning results of run: {:out=>"", :err=>"Overwriting existing notes for object 96db46575aa003dd8b5addb0674f959fc06ad7e5\n", :val=>0}
git-notes plugin: running command "git push origin refs/notes/jenkins" with opts {}
[workspace] $ git push origin refs/notes/jenkins
git-notes plugin: returning results of run: {:out=>"", :err=>"remote: Resolving deltas: 16% (1/6) \e[K\rremote: Resolving deltas: 33% (2/6) \e[K\rremote: Resolving deltas: 50% (3/6) \e[K\rremote: Resolving deltas: 66% (4/6) \e[K\rremote: Resolving deltas: 83% (5/6) \e[K\rremote: Resolving deltas: 100% (6/6) \e[K\rremote: Resolving deltas: 100% (6/6)\e[K\nremote: \rremote: Processing changes: refs: 1\e[K\rremote: Processing changes: refs: 1, done \e[K\nTo ssh://[email protected]:29418/mx-console\n ! [remote rejected] refs/notes/jenkins -> refs/notes/jenkins (prohibited by Gerrit)\nerror: failed to push some refs to 'ssh://[email protected]:29418/mx-console'\n", :val=>1}
ERROR: trouble pushing notes (GitUpdater::ConcurrentUpdateError)
/home/ciadmin/jenkins/plugins/git-notes/WEB-INF/classes/lib/git_updater.rb:38:in `push_notes'
/home/ciadmin/jenkins/plugins/git-notes/WEB-INF/classes/lib/git_updater.rb:14:in `update!'
/home/ciadmin/jenkins/plugins/git-notes/WEB-INF/classes/models/git_notes_publisher.rb:36:in `perform'
org/jruby/RubyProc.java:249:in `call'
/home/ciadmin/jenkins/plugins/git-notes/WEB-INF/classes/lib/build_context.rb:14:in `set'
/home/ciadmin/jenkins/plugins/git-notes/WEB-INF/classes/models/git_notes_publisher.rb:30:in `perform'
/home/ciadmin/jenkins/plugins/git-notes/WEB-INF/classes/vendor/gems/gems/jenkins-plugin-runtime-0.1.27/lib/jenkins/plugin/proxies/build_step.rb:14:in `perform'
/home/ciadmin/jenkins/plugins/git-notes/WEB-INF/classes/vendor/gems/gems/jenkins-plugin-runtime-0.1.27/lib/jenkins/plugin/proxies/build_step.rb:22:in `boolean_result'
/home/ciadmin/jenkins/plugins/git-notes/WEB-INF/classes/vendor/gems/gems/jenkins-plugin-runtime-0.1.27/lib/jenkins/plugin/proxies/build_step.rb:13:in `perform'
Any idea?
Thanks,
Arnaud
Error when origin is absent
git-notes plugin: building new notes hash
git-notes plugin: updating git notes
git-notes plugin: fetching notes
git-notes plugin: running command "git fetch -f origin refs/notes/:refs/notes/" with opts {:raise=>true}
[workspace] $ git fetch -f origin refs/notes/:refs/notes/
ERROR: Unexpected exit code (128): command: "git fetch -f origin refs/notes/:refs/notes/": result: {:out=>"", :err=>"fatal: 'origin' does not appear to be a git repository\nfatal: The remote end hung up unexpectedly\n", :val=>128} (RuntimeError)
/var/lib/jenkins/plugins/git-notes/WEB-INF/classes/lib/build_participant.rb:56:in run' /var/lib/jenkins/plugins/git-notes/WEB-INF/classes/lib/git_updater.rb:20:in
fetch_notes'
/var/lib/jenkins/plugins/git-notes/WEB-INF/classes/lib/git_updater.rb:12:in update!' /var/lib/jenkins/plugins/git-notes/WEB-INF/classes/models/git_notes_publisher.rb:36:in
perform'
org/jruby/RubyProc.java:258:in call' /var/lib/jenkins/plugins/git-notes/WEB-INF/classes/lib/build_context.rb:14:in
set'
/var/lib/jenkins/plugins/git-notes/WEB-INF/classes/models/git_notes_publisher.rb:30:in perform' /var/lib/jenkins/plugins/git-notes/WEB-INF/classes/vendor/gems/gems/jenkins-plugin-runtime-0.1.27/lib/jenkins/plugin/proxies/build_step.rb:14:in
perform'
/var/lib/jenkins/plugins/git-notes/WEB-INF/classes/vendor/gems/gems/jenkins-plugin-runtime-0.1.27/lib/jenkins/plugin/proxies/build_step.rb:22:in boolean_result' /var/lib/jenkins/plugins/git-notes/WEB-INF/classes/vendor/gems/gems/jenkins-plugin-runtime-0.1.27/lib/jenkins/plugin/proxies/build_step.rb:13:in
perform'
Build step 'Publish build result as git-notes' marked build as failure
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.