The post.always action should be the last action run in a stage or pipeline. At present it will run BEFORE the post.success, aborted, and failure actions which doesn't make much sense.

      Example:

      I want to clean the workspace at the end of a stage regardless of status, and I want to archive some files on success. The logical way to achieve this is to clean the workspace in the post.always and archive the files on post.success. This is not possible in the current plugin.

       

      I know there are ways to get round this 'feature' but they are not exactly intuitive.

      Attached a simple pipeline to demonstrate the issue.

       

          [JENKINS-46378] Pipeline Model Definition Post Action Order

          Ray Alexander created issue -
          Ray Alexander made changes -
          Description Original: The post.always action should be the last action run in a stage or pipeline. At present it will run BEFORE the post.success, aborted, and failure actions which doesn't make much sense.

          *Example:*

          I want to clean the workspace at the end of a stage and I want to archive some files on success. The logical way to achieve this is to clean the workspace in the post.always and archived the files on post.success. This is not possible in the current plugin.

           

          I know there are ways to get round this 'feature' but they are not exactly intuitive.

          Attached a simple pipeline to demonstrate the issue.

           
          New: The post.always action should be the last action run in a stage or pipeline. At present it will run BEFORE the post.success, aborted, and failure actions which doesn't make much sense.

          *Example:*

          I want to clean the workspace at the end of a stage regardless of status, and I want to archive some files on success. The logical way to achieve this is to clean the workspace in the post.always and archive the files on post.success. This is not possible in the current plugin.

           

          I know there are ways to get round this 'feature' but they are not exactly intuitive.

          Attached a simple pipeline to demonstrate the issue.

           
          Andrew Bayer made changes -
          Link New: This issue duplicates JENKINS-41519 [ JENKINS-41519 ]
          Andrew Bayer made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Liam Newman made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

            abayer Andrew Bayer
            rayalexander Ray Alexander
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: