Skip to content

Commit

Permalink
Merge pull request #268 from marcdeop/master
Browse files Browse the repository at this point in the history
Improvements on job import via cli
  • Loading branch information
R. Tyler Croy committed May 3, 2015
2 parents 1dc74e2 + 2b62c16 commit ae7fe67
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions manifests/job/present.pp
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@
$a = regsubst($config, 'version=\'1.0\' encoding=\'UTF-8\'',
'version="1.0" encoding="UTF-8"')
# Change empty tags into self-closing tags
$b = regsubst($a, '<([a-z]+)><\/\1>', '<\1/>', 'IG')
$b = regsubst($a, '<([A-z]+)><\/\1>', '<\1/>', 'IG')
# Change &quot; to " since Jenkins is weird like that
$c = regsubst($b, '&quot;', '"', 'MG')
# Change &apos; to ' since Jenkins is weird like that
$d = regsubst($c, '&apos;', '\'', 'MG')

# Temp file to use as stdin for Jenkins CLI executable
file { $tmp_config_path:
content => $c,
content => $d,
require => Exec['jenkins-cli'],
}

Expand Down

0 comments on commit ae7fe67

Please # to comment.