Closed esjee closed 8 years ago
Fixes #3
Example usage:
$ ruby jenkins-xml-to-jobdsl.rb tests/pipeline-example/config.xml -h Usage: ruby jenkins-xml-to-jobdsl.rb [OPTIONS] path/to/config.xml -i, --indent=indentation_level Indentation level (default 4)
$ ruby jenkins-xml-to-jobdsl.rb tests/pipeline-example/config.xml -i 1 tests/pipeline-example/config.xml pipelineJob('pipeline-example') { keepDependencies(false) properties { } definition { cpsScm { scm { git { remote { url('https://github.com/kitconcept/jenkins-pipeline-examples.git') } branches(['*/master']) extensions { } } } scriptPath(scriptpath = 'Jenkinsfile') } } triggers { } }
$ ruby jenkins-xml-to-jobdsl.rb tests/pipeline-example/config.xml -i 4 tests/pipeline-example/config.xml pipelineJob('pipeline-example') { keepDependencies(false) properties { } definition { cpsScm { scm { git { remote { url('https://github.com/kitconcept/jenkins-pipeline-examples.git') } branches(['*/master']) extensions { } } } scriptPath(scriptpath = 'Jenkinsfile') } } triggers { } }
$ ruby jenkins-xml-to-jobdsl.rb tests/pipeline-example/config.xml -i 8 tests/pipeline-example/config.xml pipelineJob('pipeline-example') { keepDependencies(false) properties { } definition { cpsScm { scm { git { remote { url('https://github.com/kitconcept/jenkins-pipeline-examples.git') } branches(['*/master']) extensions { } } } scriptPath(scriptpath = 'Jenkinsfile') } } triggers { } }
Closes #3
Fixes #3
Example usage: