All Projects → ktdreyer → Jenkins Job Wrecker

ktdreyer / Jenkins Job Wrecker

Licence: mit
convert Jenkins job XML to JJB YAML

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Jenkins Job Wrecker

Cize
🔌 Continuous integration with the simplest solution
Stars: ✭ 100 (-34.21%)
Mutual labels:  job, jenkins
pipeline-as-yaml-plugin
Jenkins Pipeline As Yaml Plugin
Stars: ✭ 111 (-26.97%)
Mutual labels:  yaml, jenkins
My Bloody Jenkins
Self Configured Jenkins Docker image based on Jenkins-LTS
Stars: ✭ 205 (+34.87%)
Mutual labels:  yaml, jenkins
Jobfunnel
Scrape job websites into a single spreadsheet with no duplicates.
Stars: ✭ 1,528 (+905.26%)
Mutual labels:  job, yaml
Serverless Ide Vscode
Serverless IDE: Enhanced support for AWS SAM and CloudFormation in VS Code
Stars: ✭ 145 (-4.61%)
Mutual labels:  yaml
Cfgdiff
diff(1) all your configs
Stars: ✭ 138 (-9.21%)
Mutual labels:  yaml
Plugin Installation Manager Tool
Plugin Manager CLI tool for Jenkins
Stars: ✭ 138 (-9.21%)
Mutual labels:  jenkins
Rq
Record Query - A tool for doing record analysis and transformation
Stars: ✭ 1,808 (+1089.47%)
Mutual labels:  yaml
Swagger meqa
Auto generate and run tests using swagger/OpenAPI spec, no coding needed
Stars: ✭ 151 (-0.66%)
Mutual labels:  yaml
Springcloudfeign
基于Gitlab + Jenkins + Harbor + Sonarqube + Docker + Kubernetes 完成可持续集成与可持续交付解决方案
Stars: ✭ 149 (-1.97%)
Mutual labels:  jenkins
Demo Jenkins Config As Code
Demo of Jenkins Configuration-As-Code with Docker and Groovy Hook Scripts
Stars: ✭ 143 (-5.92%)
Mutual labels:  jenkins
Fig
A minimalist Go configuration library
Stars: ✭ 142 (-6.58%)
Mutual labels:  yaml
Jenkinsfile Runner Github Actions
Jenkins single-shot master GitHub Action POC
Stars: ✭ 146 (-3.95%)
Mutual labels:  jenkins
Ci Detector
Detect continuous integration environment and get information of current build
Stars: ✭ 138 (-9.21%)
Mutual labels:  jenkins
Configurate
A simple configuration library for Java applications providing a node structure, a variety of formats, and tools for transformation
Stars: ✭ 148 (-2.63%)
Mutual labels:  yaml
Yaml Expander
Expands internal property references in a yaml file.
Stars: ✭ 137 (-9.87%)
Mutual labels:  yaml
Aint Queue
🚀 An async-queue library built on top of swoole, flexable multi-consumer, coroutine supported. 基于 Swoole 的一个异步队列库,可弹性伸缩的工作进程池,工作进程协程支持。
Stars: ✭ 143 (-5.92%)
Mutual labels:  job
Fabric8
fabric8 is an open source microservices platform based on Docker, Kubernetes and Jenkins
Stars: ✭ 1,783 (+1073.03%)
Mutual labels:  jenkins
Funzzy
Yet another fancy watcher. (Rust)
Stars: ✭ 142 (-6.58%)
Mutual labels:  yaml
Hwamei
企业微信webhook,企业微信群机器人webhook,支持Github、Gitlab、Sentry等Webhook
Stars: ✭ 142 (-6.58%)
Mutual labels:  jenkins

Jenkins Job Wrecker

.. image:: https://travis-ci.com/ktdreyer/jenkins-job-wrecker.svg?branch=master :target: https://travis-ci.com/ktdreyer/jenkins-job-wrecker

.. image:: https://badge.fury.io/py/jenkins-job-wrecker.svg :target: https://badge.fury.io/py/jenkins-job-wrecker

time to get wrecked

Translate Jenkins XML jobs to YAML. The YAML can then be fed into Jenkins Job Builder.

Have a lot of Jenkins jobs that were crafted by hand over the years? This tool allows you to convert your Jenkins jobs to JJB quickly and accurately.

Installing

You can install a released version from PyPI::

 pip install jenkins-job-wrecker

Or, if you want to hack on it, install it directly from GitHub::

 virtualenv venv
 . venv/bin/activate
 git clone https://github.com/ktdreyer/jenkins-job-wrecker.git
 python setup.py develop

You will now have a jjwrecker utility in your $PATH.

Usage

Let's say you have an XML definition file for "my-job". You'll typically find these .xml files on your Jenkins master, maybe in /var/lib/jenkins/jobs/. Here's how you convert that job file to YAML::

 jjwrecker -f path/to/my-job/config.xml -n 'my-job'

This will write my-job.yml in a directory named "output" in your current working directory. You can then commit my-job.yml into your source control and use JJB to manage the Jenkins job onward.

In addition to operating on static XML files, jjwrecker also supports querying a live Jenkins server dynamically for a given job::

 jjwrecker -s http://jenkins.example.com/ -n 'my-job'

It will write output/my-job.yml as above.

To make jjwrecker translate every job on the server, don't specify any job name::

 jjwrecker -s http://jenkins.example.com/

jjwrecker will iterate through all the jobs and create .yml files in output/.

If your Jenkins instance requires a username and password to connect to the remote Jenkins server, you can set these as environment variables, exported before hand or right before running the CLI tool::

 JJW_USERNAME=alfredo JJW_PASSWORD=go-tamaulipas jjwrecker -s
 http://jenkins.ceph.com

If you receive the error Don't know how to handle a non-empty <actions> element., you have actions in your xml for that job (probably from plugins). If you know that you don't need this information in your JJB yml job config, try the -a flag.

If your Jenkins instance is using HTTPS and protected by a custom CA, add the CA's public cert to your system certificate store:

  • Fedora: /etc/pki/tls/certs directory,
  • Ubuntu: /usr/local/share/ca-certificates/

After you've placed the PEM-formatted file there, run c_reshash in that directory to create the CA certificate hash symlink. jjwrecker uses python-jenkins, which in turn uses six's urllib, and that library will validate HTTPS connections based on this openssl-hashed directory of certificates.

License

MIT (see LICENSE)

  • Copyright (c) 2015-2020 Red Hat, Inc.
  • Copyright (c) 2020 Liberty Global B.V.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].