While raising an PR from development to test, the pipeline for development gets executed. It shouldn't happen right. As i understood only commit on specific branches runs the pipeline under branches .
Any idea why development branch gets trigger when a Pr is raised from development to test and how to avoid it ?
pipelines:
pull-requests:
revert-*:
- step: *build-test-sonarcloud
- step: *check-quality-gate-sonarcloud
feature/*:
- step: *build-test-sonarcloud
- step: *check-quality-gate-sonarcloud
bugfix/* :
- step: *build-test-sonarcloud
- step: *check-quality-gate-sonarcloud
branches:
development:
- step: *deploy
test:
- step:
<<: *deploy
deployment: staging
name: Deploy to staging server for testing
script:
- <<: *deploy-script
variables:
<<: *deploy-variables
SSH_USER: $STAGING_SSH_USER
SERVER: $STAGING_SERVER_ADDR
Hi Naveen,
The pipeline for the development branch should only get executed when there are new commits on the branch, if someone manually triggers it, or if there is a schedule. Pipelines can be manually triggered from the UI (on the Pipelines page of a repo there is an option Run pipeline) or via an API call.
Have you raised additional PRs with development as the source branch? And does the development branch pipeline get executed every time you raise such a PR?
One thing to check is the content of the bitbucket-pipelines.yml in the development branch. Is it the same as the one you have posted there, or is there an additional definition for pull-requests based on the development branch?
If you cannot consistently reproduce, did someone perhaps push commits to the development branch around the same time you created the PR? Or did they trigger the branch pipeline manually?
If you can consistently reproduce this every time you raise a PR with development as a source branch, another thing to check is the webhooks on this repo. Have you set up any webhooks that get triggered when a PR is created? If such a webhook exists that sends a request to your server, does your server then perhaps trigger the pipeline with an API call?
Kind regards,
Theodora
I can't tell from your description but my guess is that there a push been done to development in some step your are doing when raising the PR. You should be able to tell by looking the pipeline logs.
Depending on what you are trying to achieve you might also want check out our Flowie Smart Pipelines which give you greater control over triggering your pipelines.
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.