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()
11
11
builds \
12
12
start \
13
13
info \
14
+ configxml \
14
15
setbranch \
15
16
stop \
16
17
console \
@@ -28,7 +29,7 @@ _jenkins()
28
29
COMPREPLY=($( compgen -W " ${opts} " -- ${cur} ) )
29
30
return 0
30
31
;;
31
- queue|building|builds|start|info|setbranch|stop|console|changes)
32
+ queue|building|builds|start|info|configxml| setbranch|stop|console|changes)
32
33
opts=" -h --help"
33
34
COMPREPLY=($( compgen -W " ${opts} " -- ${cur} ) )
34
35
return 0
Original file line number Diff line number Diff line change @@ -192,6 +192,11 @@ def info(self, args):
192
192
scm_name ,
193
193
branch_name ))
194
194
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
+
195
200
def setbranch (self , args ):
196
201
job_name = self ._check_job (args .job_name )
197
202
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():
43
43
start_parser = subparsers .add_parser ('info' , help = 'Job info' )
44
44
start_parser .add_argument ('job_name' , help = 'Job to get info for' )
45
45
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
+
46
49
set_branch = subparsers .add_parser ('setbranch' , help = 'Set VCS branch (Mercurial or Git)' )
47
50
set_branch .add_argument ('job_name' , help = 'Job to set branch for' )
48
51
set_branch .add_argument ('branch_name' , help = 'Name of the VCS branch' )
You can’t perform that action at this time.
0 commit comments