Pipeline options incorrectly documented?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Pipeline options incorrectly documented?

James Green
Ref: https://jenkins.io/doc/book/pipeline/syntax/

I've just added `timestamps()` to my Jenkinsfile:

    options {
        buildDiscarder(logRotator(numToKeepStr: '20'))
        timestamps()
    }

And the build fails immedidately:

WorkflowScript: 5: Invalid option type "timestamps". Valid option types: [authorizationMatrix, buildDiscarder, catchError, disableConcurrentBuilds, dockerNode, overrideIndexTriggers, retry, script, skipDefaultCheckout, skipStagesAfterUnstable, timeout, waitUntil, withContext, withCredentials, withEnv, ws] @ line 5, column 9.
           timestamps()
           ^

The documentation's list of options and the accepted options seem to differ quite a bit and there's nothing noted in the Changelog about this.

What gives?

Thanks,

James

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAMH6%2Bax8u0XOJLOSm3%2BR%3DygGjTFv3M9%2BBATba5gwBjzf5c6QLA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Pipeline options incorrectly documented?

Daniel Beck

> On 2. Jan 2018, at 13:08, James Green <[hidden email]> wrote:
>
> What gives?

Quoting that same page,

> Pipeline provides a number of these options, such as buildDiscarder, but they may also be provided by plugins, such as timestamps.

This one requires the Timestamper plugin, which is installed by default since Jenkins 2.0.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/613DEB56-6A8B-4131-B2AA-5EFA3593D0F8%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.