Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Unable to automatically run bitbucketpipeline automatically on every push

Deleted user April 16, 2018

I have a bitbucket-pipelines.yml file in the root directory of my Project.However when ever I push new code to the master branch its not getting run automatically.I have to go to the commits history and explicitly run the pipeline for them. I  want to run these pipeline whenever I push some changes to the master branch.Please let me know if I am doing anything wrong so that its not automatically triggering the bitbucket-pipelines.yml 

1 answer

0 votes
Steve Thornhill
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 16, 2018

Can you provide a copy of the yml file?

Deleted user April 16, 2018

yeah sure @Steve Thornhill...there you go!!
options:
   docker: true

pipelines:
  branches:
   development:
     - step:
       #node image with aws-cli installed
       image: mesosphere/aws-cli
       script:
         # aws login
          - eval $(aws ecr get-login --region ${AWS_DEFAULT_REGION} --no-include-email)
         # docker
          - export BUILD_ID=$BITBUCKET_BRANCH_$BITBUCKET_COMMIT_$BITBUCKET_BUILD_NUMBER
          - docker build -t ${AWS_REGISTRY_URL}:$BUILD_ID .
          - docker push ${AWS_REGISTRY_URL}:$BUILD_ID
          - docker tag ${AWS_REGISTRY_URL}:$BUILD_ID ${AWS_REGISTRY_URL}:development
          - docker push ${AWS_REGISTRY_URL}:development

Deleted user April 16, 2018

Please guide me what mistake I am making

Steve Thornhill
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 16, 2018

From looking at that, it would trigger when you push to the development branch.

If you need to trigger on the master branch then you will need to add an additional section 

ie under branches add master: followed by the commands

Like Mehran Ishanian likes this
Deleted user April 16, 2018

oh..thanks man!!..or  may be just replace development with master...ryt @Steve Thornhill

Steve Thornhill
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 16, 2018

Yep, or 'default', then you will catch any branches that are committed too.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events