Dynamically list pre-defined values for pipeline variable in bitbucket-pipelines.yml

Hello!

I’m attempting to pre-define values of a custom pipeline variable starting from the instructions provided here:

The difference is that I want the allowed-values key to contain the names of files in a certain directory. Is it possible to define this list dynamically using a bash command? If so, can anyone provide an example of how this is done?

    "TEST: Publish build manifest to UAT":
      - variables:
          - name: FILE
            default: ""
            allowed-values: [ "", echo "$( find build-manifests -type f -name '*.*' )" ]
      - step:
          name: "Publish build manifest to UAT"
          deployment: ft-uat

ui

Thanks in advance for any help you can provide!

1 Like

I would also find this useful. If it could support the ability to call out to other APIs to retrieve lists it would be great.

1 Like

Do you have any solution for this case?

1 Like