jwmach1 / parameterized-scheduler

A Jenkins Plugin to support setting parameters in the build schedule
MIT License
15 stars 52 forks source link

cannot use "=" in parameter values #10

Open qwrrty opened 6 years ago

qwrrty commented 6 years ago

The plugin will not accept a parameter that has a value containing an = character. For example, if you attempt to pass the SETTINGS parameter with a value of foobar=true, like so:

H 8 * * * % SETTINGS=foobar=true

then Jenkins will raise an exception when trying to save the job configuration:

java.lang.IllegalArgumentException: Chunk [SETTINGS=foobar=true] is not a valid entry
    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:115)
    at com.google.common.base.Splitter$MapSplitter.split(Splitter.java:456)
    at org.jenkinsci.plugins.parameterizedscheduler.ParameterParser.parse(ParameterParser.java:37)

There is one potential workaround using the limit method, described at the google/guava#1900 issue. I found another suggestion, using regexes, at https://stackoverflow.com/a/44685466/1843465. I don't know the Splitter code well enough to suggest one or the other.