Skip to content

yp-engineering/jenkins-xml-to-jobdsl

This branch is 2 commits behind visualphoenix/jenkins-xml-to-jobdsl:develop.

Folders and files

NameName
Last commit message
Last commit date
Oct 13, 2016
Oct 21, 2016
Oct 13, 2016
Nov 9, 2016
Oct 21, 2016
Oct 14, 2016
Dec 9, 2016
Oct 13, 2016
Feb 1, 2017
Oct 21, 2016

Repository files navigation

jenkins-xml-to-jobdsl

Translates jenkins xml jobs into jobdsl groovy

Building

docker build -t jdsl .

Manual invocation

Enter the container:

docker run -it --rm -v $PWD:$PWD -w $PWD --name jdsl jdsl bash

Inside the container, run:

ruby jenkins-xml-to-jobdsl.rb tests/pipeline-example/config.xml

Translation as a service

Start the container:

docker run -d --name jdsl -p 3000:3000 jdsl

Upload a job for translation:

curl \
  -F file=@"$PWD/tests/pipeline-example/config.xml" \
  -F name='pipeline-example' \
  http://localhost:3000

Or as a function:

function jenkins-translate () {
  job=$(basename $(dirname $1))
  dir=$(cd $(dirname $1) && pwd)
  file=$(basename $1)
  curl \
    -F file=@"${dir}/${file}" \
    -F name="${job}" \
    http://localhost:3000
}

About

Translates jenkins xml jobs into jobdsl groovy using ruby and nokogiri

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 99.6%
  • HTML 0.4%