File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed
Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ _jenkins()
1111 builds \
1212 start \
1313 info \
14+ configxml \
1415 setbranch \
1516 stop \
1617 console \
@@ -28,7 +29,7 @@ _jenkins()
2829 COMPREPLY=($( compgen -W " ${opts} " -- ${cur} ) )
2930 return 0
3031 ;;
31- queue|building|builds|start|info|setbranch|stop|console|changes)
32+ queue|building|builds|start|info|configxml| setbranch|stop|console|changes)
3233 opts=" -h --help"
3334 COMPREPLY=($( compgen -W " ${opts} " -- ${cur} ) )
3435 return 0
Original file line number Diff line number Diff line change @@ -192,6 +192,11 @@ def info(self, args):
192192 scm_name ,
193193 branch_name ))
194194
195+ def configxml (self , args ):
196+ job_name = self ._check_job (args .job_name )
197+ job_config = self .jenkins .get_job_config (job_name )
198+ print (job_config )
199+
195200 def setbranch (self , args ):
196201 job_name = self ._check_job (args .job_name )
197202 xml = self .jenkins .get_job_config (job_name )
Original file line number Diff line number Diff line change @@ -43,6 +43,9 @@ def load_parser():
4343 start_parser = subparsers .add_parser ('info' , help = 'Job info' )
4444 start_parser .add_argument ('job_name' , help = 'Job to get info for' )
4545
46+ start_parser = subparsers .add_parser ('configxml' , help = 'Job config in xml format' )
47+ start_parser .add_argument ('job_name' , help = 'Job to get config for' )
48+
4649 set_branch = subparsers .add_parser ('setbranch' , help = 'Set VCS branch (Mercurial or Git)' )
4750 set_branch .add_argument ('job_name' , help = 'Job to set branch for' )
4851 set_branch .add_argument ('branch_name' , help = 'Name of the VCS branch' )
You can’t perform that action at this time.
0 commit comments