I solved this issue by launching the slave manually using the command ssh
[email protected] 'bash -l -c "java -jar /home/build/jenkins/slave.jar"'
On Tuesday, October 22, 2013 11:17:10 AM UTC-7, Maneesh M P wrote:
>
> If i execute using ssh also I get the same error like jenkins
>
> ssh -l build 300.ab..xy.com "find . -iname *.pp -exec puppet-lint
> --log-format "%{path}:%{linenumber}:%{check}:%{KIND}:%{message}" {} \;"
>
> /home/cdadmin/.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/cdadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in
>
> `to_spec'
> from
> /home/cdadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in
>
> `gem'
> from /home/cdadmin/.rvm/gems/ruby-1.9.3-p448/bin/puppet-lint:18:in
> `<main>'
> from
> /home/cdadmin/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in
> `eval'
> from
> /home/cdadmin/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in
> `<main>'
> /home/cdadmin/.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/cdadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in
>
> `to_spec'
> from
> /home/cdadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in
>
> `gem'
> from /home/cdadmin/.rvm/gems/ruby-1.9.3-p448/bin/puppet-lint:18:in
> `<main>'
> from
> /home/cdadmin/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in
> `eval'
> from
> /home/cdadmin/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in
> `<main>'
> /home/cdadmin/.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/cdadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in
>
> `to_spec'
> from
> /home/cdadmin/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in
>
> `gem'
> from /home/cdadmin/.rvm/gems/ruby-1.9.3-p448/bin/puppet-lint:18:in
> `<main>'
> from
> /home/cdadmin/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in
> `eval'
> from
> /home/cdadmin/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in
> `<main>'
> /home/cdadmin/.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)
>
>
> Not getting any clue to fix this issue, any help please?
>
>
> On Tuesday, October 22, 2013 11:00:44 AM UTC-7, Maneesh M P wrote:
>>
>> I did that, I tried providing all path through slave properties as well.
>> But still no luck.
>> Is there a way I can make jenkins use same shell environment?
>>
>> Thanks,
>> M
>>
>> On Tuesday, October 22, 2013 9:30:48 AM UTC-7, Daniel Beck wrote:
>>>
>>> You don't have your usual shell environment when running a command from
>>> Jenkins. Compare the output of the 'env' command.
>>>
>>> From the installation instructions at https://rvm.io/rvm/install, it
>>> looks like you just need to add the command
>>>
>>> source $HOME/.rvm/scripts/rvm
>>>
>>> before your find command.
>>>
>>> On 22.10.2013, at 17:15, Maneesh M P <[email protected]> wrote:
>>>
>>> > 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.
>>>
>>>
--
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.