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
Can you provide a copy of the yml file?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please guide me what mistake I am making
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
oh..thanks man!!..or may be just replace development with master...ryt @Steve Thornhill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yep, or 'default', then you will catch any branches that are committed too.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.