Pipeline options incorrectly documented?

31 views
Skip to first unread message

James Green

unread,
Jan 2, 2018, 7:08:15 AM1/2/18
to jenkins...@googlegroups.com
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

Daniel Beck

unread,
Jan 2, 2018, 9:39:15 AM1/2/18
to jenkins...@googlegroups.com

> On 2. Jan 2018, at 13:08, James Green <james.m...@gmail.com> 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.

Reply all
Reply to author
Forward
0 new messages