Interview Prep/Jenkins/Declarative pipeline syntax

Name the `options` you use in almost every production pipeline.

IntermediateConceptDeclarative pipeline syntax
Answer
options {
  timeout(time: 45, unit: 'MINUTES')
  buildDiscarder(logRotator(numToKeepStr: '30', artifactNumToKeepStr: '5'))
  disableConcurrentBuilds(abortPrevious: true)
  timestamps()                 // timestamper plugin; or ansiColor('xterm')
  skipDefaultCheckout()        // when you checkout explicitly
  durabilityHint('PERFORMANCE_OPTIMIZED')
  retry(1)                     // at stage level, for flaky infra
}

disableConcurrentBuilds(abortPrevious: true) is very useful for PR builds: a new push cancels the outdated build.

All Jenkins questions Roadmap: Jenkins

More on Declarative pipeline syntax