On Friday, September 6, 2013 at 11:49 AM, Michael Hayes wrote:
I thought maybe it's an issue with the `'hostname` which doesn't resolve, but I tried changing it to the ip address and it still doesn't work.On Sep 6, 2013, at 12:15 PM, Michael Hayes < "> > wrote:Not sure why I can't call this jenkins_cli command (it's literally from the sample code on github. Could it be authentication related?In my cookbook: recipes/jenkins.rbinclude_recipe "jenkins"%w{ git github }.each do |plugin|jenkins_cli "install-plugin #{plugin}"jenkins_cli "safe-restart"endChef Solo output:* jenkins_execute[java -jar /home/jenkins/jenkins-cli.jar -s http://syncopated-soaring:8080 install-plugin git] action run================================================================================Error executing action `run` on resource 'jenkins_execute[java -jar /home/jenkins/jenkins-cli.jar -s http://syncopated-soaring:8080 install-plugin git]'================================================================================Chef::Exceptions::Exec----------------------java -jar /home/jenkins/jenkins-cli.jar -s http://syncopated-soaring:8080 install-plugin git returned 1, expected 0Cookbook Trace:---------------/root/chef-solo/cookbooks-1/jenkins/providers/execute.rb:46:in `action_run'Resource Declaration:---------------------# In /root/chef-solo/cookbooks-1/jenkins/providers/cli.rb49: jenkins_execute command do50: cwd home51: block { |stdout| new_resource.block.call(stdout) } if new_resource.block52: end53: endCompiled Resource:------------------# Declared in /root/chef-solo/cookbooks-1/jenkins/providers/cli.rb:49:in `action_run'jenkins_execute("java -jar /home/jenkins/jenkins-cli.jar -s http://syncopated-soaring:8080 install-plugin git") doaction :runretries 0retry_delay 2command "java -jar /home/jenkins/jenkins-cli.jar -s http://syncopated-soaring:8080 install-plugin git"cookbook_name :rackboxcwd "/home/jenkins"end[2013-09-06T16:12:03+00:00] ERROR: Running exception handlers[2013-09-06T16:12:03+00:00] ERROR: Exception handlers complete[2013-09-06T16:12:03+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.outChef Client failed. 5 resources updated[2013-09-06T16:12:03+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Archive powered by MHonArc 2.6.16.