chef - Knife does not detect winrm when called from Jenkins -


my knife winrm command works when called command prompt

knife winrm 'blrvm5' 'chef-client -c c:/chef/client.rb' -m -x domain\user -p mypassword 

if fire knife command in command prompt responce shows knife options including winrm.

but same thing when called jenkins (jenkins slave on same machine) not working. getting below responce :

fatal: cannot find sub command for: 'winrm blrvm5 chef-client -c c:/chef/client.rb -m -x domain\user -p mypassword 

if call knife jenkins slave - options shows commands till vault commands winrm command not detected. full error log below :


c:\opscode\chefdk\bin>knife winrm 'blrvm5' 'chef-client -c c:/chef/client.rb' -m -x domain\user -p mypassword' fatal: cannot find sub command for: 'winrm blrvm5 chef-client -c c:/chef/client.rb -m -x domain\user -p mypassword' available subcommands: (for details, knife sub-command --help)  ** bootstrap commands ** knife bootstrap fqdn (options)  ** client commands ** knife client bulk delete regex (options) knife client create client (options) knife client delete client (options) knife client edit client (options) knife client list (options) knife client reregister client (options) knife client show client (options)  ** configure commands ** knife configure (options) knife configure client directory  ** cookbook commands ** knife cookbook bulk delete regex (options) knife cookbook create cookbook (options) knife cookbook delete cookbook version (options) knife cookbook download cookbook [version] (options) knife cookbook list (options) knife cookbook metadata cookbook (options) knife cookbook metadata file (options) knife cookbook show cookbook [version] [part] [filename] (options) knife cookbook test [cookbooks...] (options) knife cookbook upload [cookbooks...] (options)  ** cookbook site commands ** knife cookbook site download cookbook [version] (options) knife cookbook site install cookbook [version] (options) knife cookbook site list (options) knife cookbook site search query (options) knife cookbook site share cookbook [category] (options) knife cookbook site show cookbook [version] (options) knife cookbook site unshare cookbook  ** data bag commands ** knife data bag create bag [item] (options) knife data bag delete bag [item] (options) knife data bag edit bag item (options) knife data bag file bag file|folder [file|folder..] (options) knife data bag list (options) knife data bag show bag [item] (options)  ** decrypt commands ** knife decrypt vault item [values] (options)  ** encrypt commands ** knife encrypt create vault item values (options) knife encrypt delete vault item (options) knife encrypt remove vault item values (options) knife encrypt rotate keys vault item (options) knife encrypt update vault item values (options)  ** environment commands ** knife environment compare [environment..] (options) knife environment create environment (options) knife environment delete environment (options) knife environment edit environment (options) knife environment file file [file..] (options) knife environment list (options) knife environment show environment (options)  ** exec commands ** knife exec [script] (options)  ** commands ** knife [list|topic]  ** index commands ** knife index rebuild (options)  ** knife commands ** usage: c:/opscode/chefdk/bin/knife (options)  ** node commands ** knife node bulk delete regex (options) knife node create node (options) knife node delete node (options) knife node edit node (options) knife node environment set node environment knife node file file (options) knife node list (options) knife node run_list add [node] [entry[,entry]] (options) knife node run_list remove [node] [entries] (options) knife node run_list set node entries (options) knife node show node (options)  ** path-based commands ** knife delete [pattern1 ... patternn] knife deps pattern1 [patternn] knife diff patterns knife download patterns knife edit [pattern1 ... patternn] knife list [-dfr1p] [pattern1 ... patternn] knife show [pattern1 ... patternn] knife upload patterns knife xargs [command]  ** raw commands ** knife raw request_path  ** recipe commands ** knife recipe list [pattern]  ** role commands ** knife role bulk delete regex (options) knife role create role (options) knife role delete role (options) knife role edit role (options) knife role file file [file..] (options) knife role list (options) knife role show role (options)  ** search commands ** knife search index query (options)  ** serve commands ** usage: c:/opscode/chefdk/bin/knife (options)  ** spork commands ** knife spork bump cookbook [major|minor|patch|manual] knife spork check cookbook (options) knife spork data bag create bag [item] (options) knife spork data bag delete bag [item] (options) knife spork data bag edit bag item (options) knife spork data bag file bag file|folder [file|folder..] (options) knife spork environment check environment (options) knife spork environment create environment (options) knife spork environment delete environment (options) knife spork environment edit environment (options) knife spork environment file filename (options) knife spork info knife spork node create node (options) knife spork node delete node (options) knife spork node edit node (options) knife spork node file file (options) knife spork node run_list add [node] [entry[,entry]] (options) knife spork node run_list add [node] [entry[,entry]] (options) knife spork node run_list set node entries (options) knife spork omni cookbook (options) knife spork promote environment cookbook (options) knife spork role create role (options) knife spork role delete rolename (options) knife spork role edit rolename (options) knife spork role file filename (options) knife spork upload [cookbooks...] (options)  ** ssh commands ** knife ssh query command (options)  ** ssl commands ** knife ssl check [url] (options) knife ssl fetch [url] (options)  ** status commands ** knife status query (options)  ** tag commands ** knife tag create node tag ... knife tag delete node tag ... knife tag list node  ** user commands ** knife user create user (options) knife user delete user (options) knife user edit user (options) knife user list (options) knife user reregister user (options) knife user show user (options)  ** vault commands ** knife vault create vault item values (options) knife vault decrypt vault item [values] (options) knife vault delete vault item (options) knife vault download vault item path (options) knife vault edit vault item (options) knife vault refresh vault item knife vault remove vault item values (options) knife vault rotate keys knife vault rotate keys vault item (options) knife vault show vault item [values] (options) knife vault update vault item values (options)  build step 'execute windows batch command' marked build failure finished: failure 

is jenkins slave entering in same environment setup ? in other words, slave process running user? guessing slave process running different user , not finding right environment.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -