Support multiple values in a dropdown for custom pipeline variables

XMLWordPrintable

    • 1

      This ticket follows the tickets https://jira.atlassian.com/browse/BCLOUD-13737 and https://jira.atlassian.com/browse/BCLOUD-18771.

       

      Bitbucket has made a good progress so far in supporting for CI/CD. It would have been better if Bitbucket can support for multiple pre-defined values for variables in custom pipelines. And then display them in a dropdown where the users can select a value from.

       

      Having to type values for the variable in a input box is trouble and error-prone. The facility to select a value from a dropdown is the best. The ideal use case would be as below.

       

      In bitbucket-pipelines.yml

       

      pipelines:
        custom:
          testing:
            - variables:
                - name: LOCALE
                  values:
                    - "en"
                    - "cs"
                 - name: TENANT
                   values:
                    - "tenant1_name"
                    - "tenant2_name"
                    - "tenant3_name"

       

      In order to mitigate this issue with the current Bitbucket facilities as of now, I have to write 6 custom pipelines (2 locales x 3 tenants), repeating the same pipeline code but, using different values for the 2 env variables.

       

      In bitbucket-pipelines.yml

      pipelines:
        custom:
          testing-tenant1_name-en:
            - step:
                name: "Deploy tenant1_name to testing in en"
                deployment: test
                script:
                  - pipe: atlassian/ssh-run:0.3.1
                    variables:
                      SSH_USER: "$SSH_USER"
                      SERVER: "$SERVER"
                      MODE: 'script'
                      COMMAND: 'deploy.sh'
                      ENV_VARS: >-
                        TENANT="tenant1_name"
                        LOCALE="en"
      
          testing-tenant1_name-cs:
            - step:
                name: "Deploy tenant1_name to testing in cs"
                deployment: test
                script:
                  - pipe: atlassian/ssh-run:0.3.1
                    variables:
                      SSH_USER: "$SSH_USER"
                      SERVER: "$SERVER"
                      MODE: 'script'
                      COMMAND: 'deploy.sh'
                      ENV_VARS: >-
                        TENANT="tenant1_name"
                        LOCALE="cs"

       

            Assignee:
            Unassigned
            Reporter:
            Hasanta Sumudupriya
            Votes:
            43 Vote for this issue
            Watchers:
            21 Start watching this issue

              Created:
              Updated: