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

Pipelines validator allows multiple steps deploying to same environment

    XMLWordPrintable

Details

    Description

      Hi,

      I have this excerpt of code in the Bitbucket pipelines

      branches:
          master:
            - step:
                name: Move code to Databricks
                deployment: production
                caches:
                  - pip
                script:
                  - pip install -r requirements.txt
                  - bash move_code_to_databricks.sh prod
            - step:
                name: Update the job in Databricks
                deployment: production
                script:
                  - python configure_job_in_databricks.py prod
      

      I tested it in the validator and it passes , but the build fails saying that

      The deployment environment 'production' in your bitbucket-pipelines.yml file occurs multiple times in the pipeline


      New Update:

      Reopened the bug ticket as pipeline validator still fails to identify error if multiple steps deploying to the same environment with more than one blocks, for example:

      image: atlassian/default-image:2
      pipelines:
        default:
           - parallel:
               - step:
                    name: Build and Test
                    script:
                         - echo "test"
                         
               - step:
                     name: Prod
                     script:
                          - echo "test"
                
                        
        branches:
            master:
                - step:
                     name: Build and Test
                     script:
                         - echo "test"
                - step:
                     name: Deploy to Production numbered
                     deployment: Production
                     script:
                          - echo "test"
                          
                - step:
                    name: Deploy to Production latest
                    deployment: Production
                    script:
                        - echo "test"
                       
                         

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rkambhampati ravi (Inactive)
              Votes:
              7 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: