Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-22605

Bitbucket Cloud Pipelines to support JSON case insensitive deserialisation as variables

      Issue Summary

      Currently, if you use the Pipes script (atlassian/trigger-pipeline) to trigger a Pipelines build to another repository while passing a JSON file as variables, Pipelines can only parse variables with the correct casing. It will fail if the incorrect casing has been used in the JSON format.

      For example:

        {
          "Key": "SOME_KEY",
          "Value": "SOME_VARIABLE"
        }
      

      Steps to Reproduce

      1. Use the Pipes script to trigger a build - atlassian/trigger-pipeline
      2. Pass JSON variables (with the example format above) to the PIPELINE_VARIABLES variable (or using the below step configuration)
      3. Run a build
              - step:
                  name: Some Step
                  script:
                    - export VARIABLES=$(envsubst < ./some_data.json)
                    - pipe: atlassian/trigger-pipeline:5.1.0
                      variables:
                        BITBUCKET_USERNAME: $BITBUCKET_USERNAME
                        BITBUCKET_APP_PASSWORD: $BITBUCKET_APP_PASSWORD
                        REPOSITORY: 'some_repo'
                        REF_TYPE: 'branch'
                        REF_NAME: 'some_branch'                
                        CUSTOM_PIPELINE_NAME: 'some_custom_pipelines_name'
                        PIPELINE_VARIABLES: $VARIABLES
                        WAIT: 'true'
                        DEBUG: 'true' 
        

      Expected Results

      The JSON file will be parsed even if it's case insensitive

      Actual Results

      The JSON file is not being parsed by Pipelines due to case insensitivity

      Workaround

      Update the JSON format by using lower casing.

            [BCLOUD-22605] Bitbucket Cloud Pipelines to support JSON case insensitive deserialisation as variables

            There are no comments yet on this issue.

              Unassigned Unassigned
              mcerezo Mark C
              Affected customers:
              0 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated: