jenkinsci/job-dsl-plugin — pull request #292 by steve-jansen (2014-09-25 21:47:39+00:00)
Title: Fix noActivity(seconds) wrapper for build-timeout plugin 1.14+

The build-timeout plugin recently changed the serialization format for the noActivity wrapper; the wrapper now serializes the timeout
to an element named `` with a value in whole seconds, not `` with a value of milliseconds.

For example, consider this DSL snippet:

``` groovy
wrappers {
/**
* Kill any build that has run for 10 minutes with no output
*/
timeout{
noActivity(600)
}
}
```

v1.25 of the job-dsl plugin generates this XML
``` xml

600000

```

Once you update to the build-timeout plugin v1.14, this config sets the no activity timeout for no activity to be `0` in the web-ui, which seems to behave with a timeout of 3 or maybe 5 minutes (I couldn't verify this in the build-timeout code yet).

If you update the timeout via the Jenkins web ui, this XML is created:

``` xml

600

```

This change uses the correct serialization format for the latest version of the plugin. (I'm not sure if this change breaks backwards compatibility for build-timeout v1.13 users, as I don't think `` was ever fully supported. There may be a bug in the build-timeout plugin for what is used during a build vs what is shown in the job config ui.)

See also [build-plugin v1.1.4 NoActivityTimeOutStrategy.java#L77-L88](https://github.com/jenkinsci/build-timeout-plugin/blob/build-timeout-1.14/src/main/java/hudson/plugins/build_timeout/impl/NoActivityTimeOutStrategy.java#L77-L88)