-
Suggestion
-
Resolution: Won't Fix
This request is for allowing the creation of one single after-script section after all steps of a given Bitbucket Pipelines builds. This "global" after-script should have an effect on all steps of the build.
Currently, the after-script section is applied by step.
Workaround
If users want to have the same after-script section applied to all steps, they can create an after-script block using anchors and reference it on all steps. Below is an example of the same after-script section being applied to two steps of the same build:
definitions:
steps: &after-script-cleanup
after-script:
- echo "after script has run!"
image: atlassian/default-image:3
pipelines:
default:
- step:
name: 'Step 1'
script:
- echo 'Step 1 has run!'
<<: *after-script-cleanup
- step:
name: 'Step 2'
script:
- echo 'Step 2 has run!'
<<: *after-script-cleanup
- resolves
-
BBS-190943 Loading...