I have access to Repository1 which is used by the DEV team and I have a separate Repository2 in which I have placed my Integration tests.
Query: How can I trigger my integration tests from the YML file in Repository1, so that my integration tests are run immediately after the deployment step is complete?
Additional Information: I have my test scripts in NodeJS and have used Mocha and Chai along with Selenium.
Hi Vasundhara.
You'll need to set up a Bitbucket Pipelines configuration in each of your repositories. In your integration test repository (Repository2), you can set it up to just run the integration tests.
In your DEV team repository (Repository1) you can then set up a Pipelines, which triggers Repository2's Pipeline via the Bitbucket REST API. It can then wait for Repository2's pipeline to complete, and then read the result of that pipeline.
Thanks,
Phil
Hi Phil,
Thank you for the quick response. I had some trouble in understanding the curl request, so, I used a workaround:
- step:
name: Regression tests
script:
- pipe: atlassian/trigger-pipeline:2.0.0
variables:
BITBUCKET_USERNAME: $BITBUCKET_USERNAME
BITBUCKET_APP_PASSWORD: $BITBUCKET_APP_PASSWORD
REPOSITORY: '{repository_name}'
BRANCH_NAME: 'master'
WAIT: 'true'
WAIT_MAX_TIMEOUT: '20000'
Thanks again!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah! I forgot we have a Pipe for that. Great to see you got it working.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.