Skip to main content

Declarative Jenkins Jobs Configuration

Project description

Update Jenkins jobs configuration declaratively from a Git repository.

Example

$ export JENKINS_HOST=http://localhost:8080
$ tree jobs
jobs
└── HelloWorldJobFolder
   ├── config.xml
   └── HelloWorldJob
      └── config.xml
$ jenkinscfg update jobs
Creating HelloWorldJobFolder
Creating HelloWorldJobFolder/HelloWorldJob
$ mv jobs/HelloWorldJobFolder jobs/NewJobFolder
$ jenkinscfg diff jobs
Removed   HelloWorldJobFolder
Removed   HelloWorldJobFolder/HelloWorldJob
Added     NewJobFolder
Added     NewJobFolder/HelloWorldJob
$ jenkinscfg update jobs
Deleting HelloWorldJobFolder/HelloWorldJob
Deleting HelloWorldJobFolder
Creating NewJobFolder
Creating NewJobFolder/HelloWorldJob
$ sed -i 's/false/true/' jobs/NewJobFolder/HelloWorldJob/config.xml
$ jenkinscfg diff jobs
Changed   NewJobFolder/HelloWorldJob
---
+++
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?><project>
-  <keepDependencies>false</keepDependencies>
+  <keepDependencies>true</keepDependencies>
   <properties/>
   <scm class="jenkins.scm.NullSCM"/>
   <canRoam>true</canRoam>
-  <disabled>false</disabled>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
+  <disabled>true</disabled>
+  <blockBuildWhenUpstreamBuilding>true</blockBuildWhenUpstreamBuilding>
   <triggers class="vector"/>
-  <concurrentBuild>false</concurrentBuild>
+  <concurrentBuild>true</concurrentBuild>
   <builders/>
   <publishers/>
   <buildWrappers/>

Unchanged NewJobFolder
$ jenkinscfg update jobs
Updating NewJobFolder/HelloWorldJob

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jenkinscfg-0.1.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

jenkinscfg-0.1.0-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file jenkinscfg-0.1.0.tar.gz.

File metadata

  • Download URL: jenkinscfg-0.1.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.3

File hashes

Hashes for jenkinscfg-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3a16dea8d05c5e91fe9a8009c87f4af3696a1d05540b3e75427fbf580fc5927b
MD5 9a95f868f2f74130326620c87944d096
BLAKE2b-256 dcf72bce8f076a979ecf4959a0a7c8c9226467757d77ec0f69cbde377d8d924a

See more details on using hashes here.

File details

Details for the file jenkinscfg-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: jenkinscfg-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.3

File hashes

Hashes for jenkinscfg-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b44217ae92c0448d0c9255ecb2d3b7758f0a306bf5c71c996eae8415fe719337
MD5 08e9e7365f496c2ff72b7602f0b72375
BLAKE2b-256 b9c1f8a283fe4c37ff1947764abba5bb96fe3ee3598ad17ac8c5b60dae8c7cbe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page