Reputation: 8865
I have an issue similar to this one: Jenkins stopped work on checking out revision (I think...) My problem is however not that it hangs up but instead that it just crashes. I can't seem to figure out what is wrong. I have no idea, and the console output aren't really helping me out. Any help would be appreciated!
Started by user my_repo
Building in workspace /var/lib/jenkins/jobs/Test my_repo master/workspace
Checkout:workspace / /var/lib/jenkins/jobs/Test my_repo master/workspace - hudson.remoting.LocalChannel@3301b455
Using strategy: Default
Last Built Revision: Revision 1f3c154da300f5e8b96b7c1ba6d683913e96ea31 (origin/master)
Fetching changes from 1 remote Git repository
Fetching upstream changes from [email protected]:my_repo/my_repo.git
Commencing build of Revision 1f3c154da300f5e8b96b7c1ba6d683913e96ea31 (origin/master)
Checking out Revision 1f3c154da300f5e8b96b7c1ba6d683913e96ea31 (origin/master)
[workspace] $ /bin/bash -xe /tmp/hudson5411167788999806789.sh
+ source /var/lib/jenkins/.bashrc
++ PATH=/var/lib/jenkins/.rvm/gems/ruby-1.9.3-p385/bin:/var/lib/jenkins/.rvm/gems/ruby-1.9.3-p385@global/bin:/var/lib/jenkins/.rvm/rubies/ruby-1.9.3-p385/bin:/var/lib/jenkins/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/var/lib/jenkins/.rvm/bin
++ '[' -s /var/lib/jenkins/.rvm/scripts/rvm ']'
++ source /var/lib/jenkins/.rvm/scripts/rvm
+++ __rvm_has_opt posix
+++ [[ -n '' ]]
+++ [[ -n 4.2.24(1)-release ]]
+++ [[ :braceexpand:errexit:hashall:interactive-comments:xtrace: =~ :posix: ]]
+++ return 1
+++ export HOME rvm_prefix rvm_user_install_flag rvm_path
+++ HOME=/var/lib/jenkins
+++ [[ -n '' ]]
++++ umask
+++ export rvm_stored_umask=0022
+++ rvm_stored_umask=0022
+++ (( 0 == 0 ))
+++ rvm_rvmrc_files=("/etc/rvmrc" "$HOME/.rvmrc")
+++ [[ -n /var/lib/jenkins ]]
+++ [[ /var/lib/jenkins/.rvmrc -ef /var/lib/jenkins/.rvmrc ]]
+++ for rvmrc in '"${rvm_rvmrc_files[@]}"'
+++ [[ -f /etc/rvmrc ]]
+++ for rvmrc in '"${rvm_rvmrc_files[@]}"'
+++ [[ -f /var/lib/jenkins/.rvmrc ]]
+++ GREP_OPTIONS=
+++ grep '^\s*rvm .*$' /var/lib/jenkins/.rvmrc
+++ source /var/lib/jenkins/.rvmrc
++++ export rvm_trust_rvmrcs_flag=1
++++ rvm_trust_rvmrcs_flag=1
+++ unset rvm_rvmrc_files
+++ [[ -z /var/lib/jenkins/.rvm ]]
+++ rvm_path=/var/lib/jenkins/.rvm
+++ [[ -z /var/lib/jenkins ]]
+++ [[ -z '' ]]
+++ [[ /var/lib/jenkins == \/\v\a\r\/\l\i\b\/\j\e\n\k\i\n\s ]]
+++ rvm_user_install_flag=1
+++ export rvm_loaded_flag
+++ [[ -n 4.2.24(1)-release ]]
+++ typeset -f rvm
+++ rvm_loaded_flag=0
+++ (( 0 == 0 ))
+++ [[ -n /var/lib/jenkins/.rvm ]]
+++ [[ -d /var/lib/jenkins/.rvm ]]
+++ true /var/lib/jenkins/.rvm/scripts
+++ [[ -f /var/lib/jenkins/.rvm/scripts/base ]]
+++ source /var/lib/jenkins/.rvm/scripts/base
++++ __rvm_has_opt errexit
++++ [[ -n '' ]]
++++ [[ -n 4.2.24(1)-release ]]
++++ [[ :braceexpand:errexit:hashall:interactive-comments:xtrace: =~ :errexit: ]]
++++ rvm_stored_errexit=1
++++ set +e
++++ : rvm_trace_flag:0
++++ (( rvm_trace_flag > 0 ))
++++ export __array_start rvm_path
(............ a lot more of the same output.........)
++ hooks+=("$PWD/.rvm/hooks")
++ _hooks_list=($(
find -L "${hooks[@]}" -iname "$rvm_hook*" -type f 2>/dev/null
))
+++ find -L /var/lib/jenkins/.rvm/hooks '/var/lib/jenkins/jobs/Test my_repo master/workspace/.rvm/hooks' -iname 'after_cd*' -type f
Build step 'Execute shell' marked build as failure
Finished: FAILURE
UPDATE
My build shell commands looks like this:
source ~/.bashrc
cd .
rm -rf jenkins && mkdir jenkins
export RAILS_ENV=test
bundle install
rake db:drop db:create db:structure:load
SPEC_OPTS="--format html" rspec spec > jenkins/rspec.html
SPEC_OPTS="--format html" rspec spec_without_rails > jenkins/rspec.html
Upvotes: 2
Views: 1096
Reputation: 111623
The problem is nothing to do with git. The checkout completed successfully, and the first "Execute Shell" step started executing, and subsequently failed (as given in the penultimate line of the log).
The RVM command (or whatever it is) is failing in some way. I guess because the find
execution fails to find any files.
When a script exits with a non-zero return code, it fails the Jenkins build.
Upvotes: 4