Remove duplicates in the custom trigger

Viewed 44

I have a bitbucket pipeline in the python repository.
https://support.atlassian.com/bitbucket-cloud/docs/pipeline-triggers/
In this pipeline I have a custom trigger:

  custom: # Pipelines that can only be triggered manually
    first-trigger:
      - step:
          script:
            - pip install library
            - Specific step ...
    second-trigger:
      - step:
          script:
            - pip install library
            - Specific step ...
    third-trigger:
      - step:
          script:
            - pip install library
            - Specific step ...

I will call these triggers manually depending on the situation.
I don't like the fact that I have repetitions, I have pip install library in each custom step.
Is it possible to make it so that the library is installed every time this no matter what custom step was called?
Or can I add an image before the custom trigger?

custom: # Pipelines that can only be triggered manually
image: the image # This step uses its own image

Thank you.

0 Answers
Related