Skip to content

Review new "options" and audit project scripts #26

@phillipjohnston

Description

@phillipjohnston

https://jenkins.io/blog/2018/04/09/whats-in-declarative/

New options

The options directive in Declarative can contain a number of different kinds of configuration: traditional Jenkins job properties, like buildDiscarder, wrapper steps to execute the entire Pipeline within, like timeout, and Declarative-specific options that can switch from some default behaviors of Declarative execution. We’ve added two new Declarative-specific options in the last few releases.

  • checkoutToSubdirectory - Allows you to override the location that the automatic SCM checkout will use. Using checkoutToSubdirectory("foo"), your Pipeline will checkout your repository to "$WORKSPACE/foo", rather than the default of "$WORKSPACE".
  • newContainerPerStage - If you’re using a top-level docker or dockerfile agent, and want to ensure that each of your stages run in a fresh container of the same image, you can use this option. Any stage without its own agent specified will run in a new container using the image you’ve specified or built, on the same computer and with access to the same workspace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions