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

Reseting Branch after PR

    XMLWordPrintable

Details

    Description

      Hi All,

      I tried multiple times with different YML version and am not able to do this.

      I have 3 branches :
      Master
      UAT
      CICD

      I want to achieve this:

      When someone does a PR to UAT and its approved,

      • Everything is copied to CICD
      • UAT is rebased to master or reset to master

      What i have tried:

      image: php:5.6.31

      clone:
      depth: full

      pipelines:
      pull-requests:
      uat:

      • step:
        name: Clone
        script:
      • echo "CICD Branch Creation"
      • apt-get update && apt-get install -y unzip git
      • git config --global user.email "XXX" && git config --global user.name "XXX"
      • git checkout -B cicd
      • git push -f origin cicd

      branches:
      cicd:

      • step:
        name: Build and release
        script:
      • apt-get update && apt-get install -y unzip git
      • git checkout master
      • git checkout -B uat master
      • git push -f origin uat

      I would think that when a PR is made to UAT THE 1st block run and copied all to cicd.
      When CICD sees a push, it runs ITS OWN Branch block and resets UAT ?? This does not work. When i do a PR and merge it to UAT nothing is ran. But the push to cicd is ok, it clears UAT -> sync to master.

      Attachments

        Activity

          People

            Unassigned Unassigned
            73e8e3711255 Sheilen Manna
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: