Puppet-lint just works fine while executing the command from build server 
console using the below command

find . -iname *.pp -exec puppet-lint --log-format 
"%{path}:%{linenumber}:%{check}:%{KIND}:%{message}" {} \;

But gives all sorts of error while executing same command through jenkins 
"execute shell" option 

+ find . -iname '*.pp' -exec puppet-lint --log-format 
'%{path}:%{linenumber}:%{check}:%{KIND}:%{message}' '{}' ';' 
/home/jenkinsadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in
 
`to_specs': Could not find puppet-lint (>= 0) amongst [bundler-1.3.5, 
bundler-unload-1.0.2, executable-hooks-1.2.6, executable-hooks-1.2.5, 
rake-10.1.0, rubygems-bundler-1.4.0, rubygems-bundler-1.3.4, rvm-1.11.3.8] 
(Gem::LoadError) from 
/home/jenkinsadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in
 
`to_spec' from 
/home/jenkinsadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in
 
`gem' from 
/home/jenkinsadmin/.rvm/gems/ruby-1.9.3-p448/bin/puppet-lint:18:in `<main>' 
from 
/home/jenkinsadmin/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in 
`eval' from 
/home/jenkinsadmin/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in 
`<main>' 
/home/jenkinsadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in
 
`to_specs': Could not find puppet-lint (>= 0) amongst [bundler-1.3.5, 
bundler-unload-1.0.2, executable-hooks-1.2.6, executable-hooks-1.2.5, 
rake-10.1.0, rubygems-bundler-1.4.0, rubygems-bundler-1.3.4, rvm-1.11.3.8] 
(Gem::LoadError) from 
/home/jenkinsadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in
 
`to_spec' from 
/home/jenkinsadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in
 
`gem' from 
/home/jenkinsadmin/.rvm/gems/ruby-1.9.3-p448/bin/puppet-lint:18:in `<main>' 
from 
/home/jenkinsadmin/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in 
`eval' from 
/home/jenkinsadmin/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in 
`<main>' 
/home/jenkinsadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in
 
`to_specs': Could not find puppet-lint (>= 0) amongst [bundler-1.3.5, 
bundler-unload-1.0.2, executable-hooks-1.2.6, executable-hooks-1.2.5, 
rake-10.1.0, rubygems-bundler-1.4.0, rubygems-bundler-1.3.4, rvm-1.11.3.8] 
(Gem::LoadError) from 
/home/jenkinsadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in
 
`to_spec' from 
/home/jenkinsadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in
 
`gem' from 
/home/jenkinsadmin/.rvm/gems/ruby-1.9.3-p448/bin/puppet-lint:18:in `<main>' 
from 
/home/jenkinsadmin/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in 
`eval' from 
/home/jenkinsadmin/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in 
`<main>' 
/home/jenkinsadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in
 
`to_specs': Could not find puppet-lint (>= 0) amongst [bundler-1.3.5, 
bundler-unload-1.0.2, executable-hooks-1.2.6, 

Why is the two different behavior? what is happening while executing 
through jenkins? can anyone help?

Thanks,
M

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to