What is the difference between pipeline-level and stage-level `options`?
IntermediateConceptDeclarative pipeline syntax
Answer
Pipeline-level options apply to the whole run (buildDiscarder, disableConcurrentBuilds, durabilityHint are pipeline-only). Stage-level options support a subset: timeout, retry, timestamps, skipDefaultCheckout, lock. A stage-level timeout includes time spent waiting for the agent and for input, so put a timeout on approval stages to avoid builds waiting forever.
More on Declarative pipeline syntax
What is the minimum valid declarative pipeline?BeginnerWhat agent types exist in declarative pipelines?IntermediateWhen do you use `agent none` at the top level?IntermediateHow do nested sequential stages work and why are they useful?IntermediateList the `post` conditions and when each fires.IntermediateWhat are the most useful `when` conditions?Intermediate