Bitbucket
Deploy Bitbucket as a CI/CD tool in your environment so that you can observe the test runs from the CI Dashboard view and view links to the CI Dashboard view in Slack and Jenkins.
To help you get started and as a point of reference, we have made a sample project available here.
Step-by-step instructions
Click a step to view details.
To sign up and try Bitbucket for free, follow the steps at https://bitbucket.org/account/signup.
- Log in to Bitbucket.
-
On your own work tab, click Create repository.
- In a terminal window, do the following:
- Switch to your repository's directory.
Connect your existing repository to Bitbucket with the following git commands:
Copygit init
git remote add origin https://<username>@bitbucket.org/<username>/<repo name>.git
git add .
git commit -m "first commit" git push -u origin masterwhere
<username>
refers to your Bitbucket username and<repo name>
refers to the name of your repo in Bitbucket.
- On the Pipelines tab, do one of the following:
-
Select your preferred sample pipeline and click Commit file to automatically start the pipeline. For more information, see this Bitbucket article.
-
If you plan to reuse the bitbucket-pipelines.yml file or if you already have a pipeline in your project, click Enable.
-
- Validate your
pipeline.yml
file. You can use this validator. -
On the Settings tab, under Repository variables, use the Name and Value fields to provide the following information. Make sure to select the Secured checkbox for each name/value pair to securely store the values from the console.
-
The username for your Perfecto cloud
You may want to skip securing the name of your Perfecto cloud. If you do secure it, the name will not show up in the Single Test Report URL that appears in the console.
-
Your Perfecto security token
To generate a security token:-
In the Perfecto UI at <YourCloud>.app.perfectomobile.com (where YourCloud is your actual cloud name, such as mobilecloud), click your user name and select My security token.
-
In the My security token form, click Generate Security Token.
-
Click Copy to clipboard. Then paste it into any scripts that you want to run with Perfecto.
- Click Close.
-
- The slack_hook to store the Incoming Webhook URL of your Slack app. For more information on integrating with Slack, see this Slack article.
-
- Optionally, manually trigger the pipeline as follows:
- On the Pipeline tab, click Run pipeline.
-
Select the branch and pipeline and click Run.
- To schedule jobs in Bitbucket, see this Bitbucket article.
-
Review the results of the pipeline execution in the CI Dashboard view of the Perfecto UI.
With Slack integration, you receive a link to the CI Dashboard in a Slack notification.
To view the pipeline execution in our sample project, click here.
- To integrate with Jenkins:
- See the Jenkins with Maven article.
Under source code management, set the Git repository to your Bitbucket repo URL and select your Bitbucket credentials.
- To integrate with Slack, see the Slack integration article.