Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins Declarative Pipelines: How to rename "Declarative: Post Actions" step?

I have a declarative pipeline which looks like this:

pipeline {
    stages {...}
    post {
        success {...}
        failure {...}
    }
}

It leads to creation of a last step called "Declarative: Post Actions".

Q: How to rename the "Declarative: Post Actions" step?

I would like to have a meaningful name like "Send Email Notifications".

pipeline

UPDATE:

The names are hardcoded in this class. With the current version of the API (3.44) it is not possible to rename them.

like image 789
Sasha Shpota Avatar asked Nov 18 '25 12:11

Sasha Shpota


1 Answers

Move post part into a stage. Stages has post section the same way as the whole pipeline has.

like image 59
igor Avatar answered Nov 20 '25 01:11

igor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!