Is it possible to rename default "Declarative: Checkout SCM" step?

Basil picture Basil · Jul 5, 2017 · Viewed 9.8k times · Source

When you use Jenkins multibranch pipeline, the first stage is named by default Declarative: Checkout SCM.

Is it possible to rename it? I know that it is possible to skip default checkout, but I do not want this - I just want to rename this default step.

Answer

Basil picture Basil · Jul 7, 2017

Since noone posted a better solution, I just did it this way:

...
options {
    skipDefaultCheckout(true)
}
stages {
    stage('However I want to name a stage') {
        steps {
            checkout scm
...