configuration of jobs maintained in SVN

26 views
Skip to first unread message

Matthias Apitz

unread,
Feb 28, 2019, 1:33:08 PM2/28/19
to jenkins...@googlegroups.com

Hello,

I've setup a Jenkins server on SuSE Linux SLES12 and have the jobs in:

$ ls -l /var/lib/jenkins/jobs/
total 12
drwxr-xr-x 3 jenkins jenkins 4096 Feb 23 00:00 Jerome_Head
drwxr-xr-x 3 jenkins jenkins 4096 Feb 28 01:00 Statistic-Installation-Job-V7.0
drwxr-xr-x 3 jenkins jenkins 4096 Feb 28 01:00 TPv70-nightly-build
...
$ ls -l /var/lib/jenkins/jobs/TPv70-nightly-build/config.xml
-rw-r--r-- 1 jenkins jenkins 3162 Feb 27 11:40 /var/lib/jenkins/jobs/TPv70-nightly-build/config.xml

I'd like to edit the jobs with the normal editor in Linux, esp. the
sometimes complex build step script written in shell or perl, and have all
this, at least the config.xml file of each of my 50 jobs, under SVN version control.

After modifying any jobs config.xml, the Jenkins server process must be
restarted to get the changes in effect (and visible in the browser
interface). Is there any other way to inform Jenkings about the change
and let it reload the modified job config?

Thanks

matthias


--
Matthias Apitz, ✉ gu...@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub

Eric Pyle

unread,
Feb 28, 2019, 1:54:35 PM2/28/19
to jenkins...@googlegroups.com
You could look at using the reload-job command in Jenkins CLI
(documentation: https://jenkins.io/doc/book/managing/cli/). Or
similarly, use the update-job command to read the updated job
configuration from standard input and use it to update the job, which
automatically includes refreshing the job.

On 2/28/2019 1:18 PM, Matthias Apitz wrote:
> Hello,
>
> I've setup a Jenkins server on SuSE Linux SLES12 and have the jobs in:
>
> $ ls -l /var/lib/jenkins/jobs/
> total 12
> drwxr-xr-x 3 jenkins jenkins 4096 Feb 23 00:00 Jerome_Head
> drwxr-xr-x 3 jenkins jenkins 4096 Feb 28 01:00 Statistic-Installation-Job-V7.0
> drwxr-xr-x 3 jenkins jenkins 4096 Feb 28 01:00 TPv70-nightly-build
> ...
> $ ls -l /var/lib/jenkins/jobs/TPv70-nightly-build/config.xml
> -rw-r--r-- 1 jenkins jenkins 3162 Feb 27 11:40 /var/lib/jenkins/jobs/TPv70-nightly-build/config.xml
>
> I'd like to edit the jobs with the normal editor in Linux, esp. the
> sometimes complex build step script written in shell or perl, and have all
> this, at least the config.xml file of each of my 50 jobs, under SVN version control.
>
> After modifying any jobs config.xml, the Jenkins server process must be
> restarted to get the changes in effect (and visible in the browser
> interface). Is there any other way to inform Jenkings about the change
> and let it reload the modified job config?
>
> Thanks
>
> matthias
>
>

--
Eric Pyle
Siemens PLM Software
Lebanon, NH
+1 603-277-3060
eric...@siemens.com
http://www.siemens.com/plm

Mark Waite

unread,
Feb 28, 2019, 2:03:39 PM2/28/19
to Jenkins Users
Restart the Jenkins server is the safest and most reliable way to reload modified job configurations.

There is a "Reload Configuration from Disc" in the "Manage Jenkins" page, but it is not as safe or as reliable as restarting Jenkins (based on bug reports to the Jenkins project).

Mark Waite

On Thu, Feb 28, 2019 at 10:48 AM Matthias Apitz <gu...@unixarea.de> wrote:

Hello,

I've setup a Jenkins server on SuSE Linux SLES12 and have the jobs in:

$ ls -l /var/lib/jenkins/jobs/
total 12
drwxr-xr-x 3 jenkins jenkins 4096 Feb 23 00:00 Jerome_Head
drwxr-xr-x 3 jenkins jenkins 4096 Feb 28 01:00 Statistic-Installation-Job-V7.0
drwxr-xr-x 3 jenkins jenkins 4096 Feb 28 01:00 TPv70-nightly-build
...
$ ls -l /var/lib/jenkins/jobs/TPv70-nightly-build/config.xml
-rw-r--r-- 1 jenkins jenkins 3162 Feb 27 11:40 /var/lib/jenkins/jobs/TPv70-nightly-build/config.xml

I'd like to edit the jobs with the normal editor in Linux, esp. the
sometimes complex build step script written in shell or perl, and have all
this, at least the config.xml file of each of my 50 jobs, under SVN version control.

After modifying any jobs config.xml, the Jenkins server process must be
restarted to get the changes in effect (and visible in the browser
interface). Is there any other way to inform Jenkings about the change
and let it reload the modified job config?

Thanks

        matthias


--
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/20190228055907.GA2945%40c720-r342378.
For more options, visit https://groups.google.com/d/optout.


--
Thanks!
Mark Waite

DmitryB

unread,
Feb 28, 2019, 3:55:33 PM2/28/19
to Jenkins Users
Try to look at https://docs.openstack.org/infra/jenkins-job-builder/
It allows to define jobs with yaml files, support job templating, allow to use builder scripts as separate files (e.g. for codestyle checking)

четверг, 28 февраля 2019 г., 22:33:08 UTC+4 пользователь Matthias Apitz написал:
Reply all
Reply to author
Forward
0 new messages