• Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      The stages feature in Bitbucket pipelines does not allow conditions for a step in a stage at the moment as mentioned in the limitations section

      A stage can't contain conditional steps, but you can configure a stage to be conditional.

       
      The request is to allow the condition for a step in a stage.

            [BCLOUD-22216] Support condition for a step in a stage

            cardiente added a comment -

            +1

            cardiente added a comment - +1

            Anas Bouhtouch added a comment - - edited

            It's appalling that a feature as fundamental as this is still missing, not being able to use conditions on a step under stage makes it unusable, I'd rather continue wasting deploy minutes.

            Anas Bouhtouch added a comment - - edited It's appalling that a feature as fundamental as this is still missing, not being able to use conditions on a step under stage makes it unusable, I'd rather continue wasting deploy minutes.

            +1

            Amazing how many basic features which are staples of CI/CD development are just not allowed, or a limitation, or totally impossible in Bitbucket pipelines. Do Atlassian realise that their main competititors in this space i.e. GitHub/GitLab are totally blowing Bitbucket pipelines in the middle of last decade. This ticket and dozen or so other tickets to allow for basic stuff, like variablising deployment variables, allowing conditional steps, deployments with parallel steps, more than one step with a deployment in a stage and other very simple capabilities to implement is really hindering the ability for engineers to use Bitbucket pipelines properly. These tickets have been open for literally years, with no updates, no comments from anyone at Atlassian and it's very poor.

            Adam Sambridge added a comment - +1 Amazing how many basic features which are staples of CI/CD development are just not allowed, or a limitation, or totally impossible in Bitbucket pipelines. Do Atlassian realise that their main competititors in this space i.e. GitHub/GitLab are totally blowing Bitbucket pipelines in the middle of last decade. This ticket and dozen or so other tickets to allow for basic stuff, like variablising deployment variables, allowing conditional steps, deployments with parallel steps, more than one step with a deployment in a stage and other very simple capabilities to implement is really hindering the ability for engineers to use Bitbucket pipelines properly. These tickets have been open for literally years, with no updates, no comments from anyone at Atlassian and it's very poor.

            +1 On this one. Hard to believe it's been over a year and a half since this was requested and it still hasn't been implemented...kinda hard to believe it was ever a restriction in the first place. Though I haven't seen the code myself, I'm guessing it's some weird fallout due to the nature of the way it's been written. I do hope that's it, instead of "we never imagined users would want to skip steps within stages, so we just didn't allow the usage of conditions there." If the ability to skip a step exists, you'd think that would mean the ability to skip a step would be possible wherever a step can exist.

            Richard Guffey added a comment - +1 On this one. Hard to believe it's been over a year and a half since this was requested and it still hasn't been implemented...kinda hard to believe it was ever a restriction in the first place. Though I haven't seen the code myself, I'm guessing it's some weird fallout due to the nature of the way it's been written. I do hope that's it, instead of "we never imagined users would want to skip steps within stages, so we just didn't allow the usage of conditions there." If the ability to skip a step exists, you'd think that would mean the ability to skip a step would be possible wherever a step can exist.

            I need this feature because changes in different folders must trigger different steps for the same deployment

            Vadim GLUKHIKH added a comment - I need this feature because changes in different folders must trigger different steps for the same deployment

            +1

            I need to skip a migration database step when these files are no affected...

            PD: this step (database-migration) have env variables by stage (deployment).

            example:
            branches:
            Test:
            - stage:
            name: "Test enviroment deployment"
            deployment: Test
            steps:
            - step:
            <<: *database-migration
            # condition:
            # changesets:
            # includePaths:
            # # only xml files directly under resources directory
            # - "db/changelog/*.xml"
            - step:
            name: "Build and deploy app in Test enviroment"

            Deleted Account (Inactive) added a comment - I need to skip a migration database step when these files are no affected... PD: this step (database-migration) have env variables by stage (deployment). example: branches : Test : - stage : name : "Test enviroment deployment" deployment : Test steps : - step : << : * database-migration # condition: # changesets: # includePaths: # # only xml files directly under resources directory # - "db/changelog/*.xml" - step : name : "Build and deploy app in Test enviroment"

            Tina.Enriquez added a comment - - edited

            +1 Need this badly

            Tina.Enriquez added a comment - - edited +1 Need this badly

            Joe Yang added a comment -

            Created 03/Mar/2019 Parent ticket:

            https://jira.atlassian.com/browse/BCLOUD-18261

            Joe Yang added a comment - Created 03/Mar/2019 Parent ticket: https://jira.atlassian.com/browse/BCLOUD-18261

            Stefan Maurer added a comment - - edited

            We're using a mono-repo approach and could benefit from conditional steps within a stage.

             

            Our (simplified) pipeline

            • stage: dev
              • deploy service 1
              • deploy service 2
              • deploy service 3
              • deploy service 4
            • stage: staging
              • deploy service 1
              • deploy service 2
              • deploy service 3
              • deploy service 4
            • stage: production
              • deploy service 1
              • deploy service 2
              • deploy service 3
              • deploy service 4

            If we for example only modified 2 services, we don't want to deploy all our unchanged services as well.

             

            We could create separate deployments for each service, but that would add a lot of duplicated variables in the Deployments configuration.

            Stefan Maurer added a comment - - edited We're using a mono-repo approach and could benefit from conditional steps within a stage.   Our (simplified) pipeline stage: dev deploy service 1 deploy service 2 deploy service 3 deploy service 4 stage: staging deploy service 1 deploy service 2 deploy service 3 deploy service 4 stage: production deploy service 1 deploy service 2 deploy service 3 deploy service 4 If we for example only modified 2 services, we don't want to deploy all our unchanged services as well.   We could create separate deployments for each service, but that would add a lot of duplicated variables in the Deployments configuration.

              57465700c4e1 Edmund Munday
              skhandelwal@atlassian.com Sandeep K
              Votes:
              117 Vote for this issue
              Watchers:
              52 Start watching this issue

                Created:
                Updated: