Jenkins global config.xml remote access

1,255 views
Skip to first unread message

mpapo - Michaël Pailloncy

unread,
Jul 23, 2012, 4:29:26 AM7/23/12
to jenkin...@googlegroups.com
Hi,

Is it possible to access to a remote config.xml file from another Jenkins with the remote API ?
I would like to get it like I can get a job config.xml file.

Thanks in advance !

Michaël Pailloncy

unread,
Jul 25, 2012, 5:19:00 AM7/25/12
to jenkin...@googlegroups.com
Nobody has never had this problematic?

2012/7/23 mpapo - Michaël Pailloncy <mpap...@gmail.com>

Stephen Connolly

unread,
Jul 25, 2012, 6:00:08 AM7/25/12
to jenkin...@googlegroups.com
a user with the extended read permission can get a job's config.xml from an URL like

$jenkins_scheme://$jenkins_host:$jenkins:port/$jenkins_context/jobs/$job_name/config.xml 

e.g.

Michaël Pailloncy

unread,
Jul 25, 2012, 6:04:52 AM7/25/12
to jenkin...@googlegroups.com
Thanks for your reply.
Excuse me, I have not phrased my question correctly.
But I wanna get the global config.xml of Jenkins, not the specific config file of a job.

2012/7/25 Stephen Connolly <stephen.al...@gmail.com>

Stephen Connolly

unread,
Jul 25, 2012, 6:09:49 AM7/25/12
to jenkin...@googlegroups.com
sounds like a security issue.

you should be able to access it via the jenkins cli interface and a suitable groovy script ;-)

Stephen Connolly

unread,
Jul 25, 2012, 6:11:03 AM7/25/12
to jenkin...@googlegroups.com
On 25 July 2012 11:09, Stephen Connolly <stephen.al...@gmail.com> wrote:
sounds like a security issue.


By that ^^^ I mean I would not be happy if somebody could easily do that to my instance as there can often be secrets embedded in the global config (because of lack of adoption by plugins of the credentials store that I convinced by employers to OSS earlier this year)

Michaël Pailloncy

unread,
Jul 25, 2012, 7:48:47 AM7/25/12
to jenkin...@googlegroups.com
Yes, I would not be happy too :-)
But I have supposed that someone with administration privileges could get the global configuration of Jenkins like it's possible with job configuration.

My goal is to compare my local global config with a remote one.
I'm creating a plugin to compare job configuration and have the ability to merge some parts of the remote configuration file (using Remote API). 
I wish to do the same thing with global configuration of both local and remote Jenkins.

2012/7/25 Stephen Connolly <stephen.al...@gmail.com>

kayvi

unread,
Sep 6, 2012, 3:38:29 AM9/6/12
to jenkin...@googlegroups.com
Did you find a solution on merging configuration files?

Michaël Pailloncy

unread,
Sep 6, 2012, 3:58:04 AM9/6/12
to jenkin...@googlegroups.com
Merging is not really the problem. I've created a plugin to compare and merge config.xml files of job. 
But since we can't access to remote global config.xml file, we can't merge it.

Michaël

2012/9/6 kayvi <valev...@googlemail.com>

kayvi

unread,
Sep 6, 2012, 4:00:35 AM9/6/12
to jenkin...@googlegroups.com
Did you push your plugin to github? I need to manipulate the global config.xml and I'm looking for inspiration.

Cheers

Michaël Pailloncy

unread,
Sep 6, 2012, 4:19:06 AM9/6/12
to jenkin...@googlegroups.com
I'm sorry I can't push it to github for the moment. I'm currently seeing with my company if I can.
If I could, I'll let you know.

Stephen Connolly

unread,
Sep 6, 2012, 6:09:44 AM9/6/12
to jenkin...@googlegroups.com
Why not have your plugin expose the config.xml itself... IOW fix your own problem. Also prevents requiring the latest version of jenkins

Michaël Pailloncy

unread,
Sep 6, 2012, 6:15:06 AM9/6/12
to jenkin...@googlegroups.com
Good idea, you're totally right. 
Thank you.

2012/9/6 Stephen Connolly <stephen.al...@gmail.com>
Reply all
Reply to author
Forward
0 new messages