Install Mend Developer Platform for Bitbucket Cloud
Overview
In this article, you will find step-by-step instructions for installing the Mend Developer Platform for Bitbucket Cloud.
Getting it done
Prerequisites
Access to a Bitbucket workspace and a user with Admin privileges
If your workspace has conditional access to certain IP addresses, add the following IPs to your allowlist:
Non-EU customers (e.g., saas.mend.io) -
34.197.147.244
34.239.12.110
35.169.49.18
44.206.201.73
52.0.106.131
52.45.235.219
52.207.155.173
54.243.119.210
98.82.39.166
107.20.215.6
Also, for paid Mend customers only:
Mend Account with SCA/SAST entitlement on the Mend Platform
Admin Access to Mend Platform to generate Activation Key
Notes:
You should have access to the Mend Platform only if you wish to unlock all the premium features, such as SCA and SAST. If you solely intend to utilize Renovate, there is no need to create a Mend account.
A GitHub.com token is recommended for running scans. Without it, GitHub release notes won’t be retrieved, which will result in a warning message.
Installing Mend Developer Platform for Bitbucket Cloud
Log in to the Mend Developer Portal and authorize with your Bitbucket Cloud user.
Click on “Go to Bitbucket” and select the workspace where the app should be installed.
Grant access for the Mend Bitbucket Cloud App.
After granting access, you will see your workspace available in the Mend Developer Portal.
Click on the workspace for which you would like to install the Mend App.
Note: You can integrate multiple BB workspaces with 1 Mend organization. Click “Install more” to onboard additional workspaces to your Mend Developer Platform App.
The Setup Wizard will open, where two product options will be presented.
Renovate-only users: Choose Renovate only, then skip to step 11.
Paid Mend customers: Choose Mend Application Security, then continue to follow all steps.Open the Mend Platform and navigate to Integrations under the Settings toggle, then select the Bitbucket Cloud integration.
Click Get Activation Key and copy the activation key. This will be used in step #10.
Return to the Mend Developer Portal to complete installation.
Using the Activation Key copied from the Mend Platform (as described in the previous step), paste the Activation Key into the Mend License Key box to connect your Bitbucket workspace with your paid Mend account.
Click CONNECT WORKSPACE, and then CONTINUE.
You’ll see the name of the Mend Organization that your workspace is now connected to.Now you have the option to activate the Mend App for all repositories or only selected repositories. Select your preference, and then click CONTINUE.
During the installation process, please note that the Mend Developer Platform app is installed for the entire workspace. This means that it will have access to all repositories within the workspace, regardless of the repositories selected during installation.
The purpose of selecting repositories at this step is to define which repositories will have the available engines enabled and activated.
The next screen is different for Renovate-only users and paid Mend customers.
Renovate-only users: Select “Silent mode” or “Interactive mode”, the press CONTINUE.Paid Mend customers: Select “Scan only” or “Scan and alert”, then press CONTINUE
This completes the installation steps for Mend Renovate and Mend Developer Platform.
Create a branch restriction in Bitbucket Cloud using Mend checks
To create a Bitbucket Project branch restriction that will block pull requests to the default branch of each repository when the Mend check fails (using the default Mend configuration):
Within Bitbucket, select Projects on the top navigation bar to access the projects within the workspace.
Select the Project in which you want to add branch restrictions.
Select Project Settings on the left navigation sidebar.
Select Branch restrictions on the left navigation sidebar.
Select Add a branch restriction.
Select the Merge settings tab.
Check the following box ‘Minimum number of successful builds for the last commit with no failed builds <number> and no in progress builds' - please set 'number’ to your company policy.
Click Save.