Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jenkins present.pp does not fix single-quotes for xml 1.1 #999

Open
jnathlich opened this issue Dec 26, 2020 · 0 comments
Open

jenkins present.pp does not fix single-quotes for xml 1.1 #999

jnathlich opened this issue Dec 26, 2020 · 0 comments

Comments

@jnathlich
Copy link

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 2019.8
  • Ruby:
  • Distribution:
  • Module version: 2.0

How to reproduce (e.g Puppet code you use)

use jenkins module to create a job with a config.xml that has this first line...
<?xml version='1.1' encoding='UTF-8'?>

What are you seeing

It runs update-job on every puppet run, as the code is looking for '1.0' in the string above.
line 47 in present.pp
# Jenkins likes to change single quotes to double quotes
$a = regsubst($config, 'version=\'1.0\' encoding=\'UTF-8\'',
'version="1.0" encoding="UTF-8"')

What behaviour did you expect instead

My regex sucks, but it should look for version = x.y, where x and y are single numerals.

Output log

Any additional information you'd like to impart

Not a huge deal. Can fix input files to avoid this and make it work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant