Buddybuild Integration

Buddybuild Integration Instructions

The following tutorial will guide you through the process of integrating Buddybuild with Lab Automated.

Integration Step-By-Step

STEP 1 Get an API token from Lab Automated

API tokens can be found by clicking on the Profile button, then Account. Select Access Tokens and create a token.

STEP 2 From the main Buddybuild dashboard, click App Settings and click Environment Variables under Build Settings.

STEP 3 Add a variable with the value of your access token given by Lab Automated.

In this case we named ours LAB_TOKEN.Once complete, click “Create new environment variable.”

STEP 4 Create a buddybuild_postbuild.sh script and place it in the root of your application’s repository.

Note: LAB_TOKEN is used here but may be different depending on how you defined your access token.

The default paths used for compiled builds are stored in @$BUDDYBUILD_APK_PATH and @$BUDDYBUILD_IPA_PATH which we can leverage in our script.

Here is an example script:


#!/usr/bin/env bash

echo -n "Submitting build to Lab Automated ... "

curl \

-X POST \

-H "Authorization: Bearer $LAB_TOKEN" \

https://lab-api.nowsecure.com/build/ --data-binary @$BUDDYBUILD_IPA_PATH

if [ $? -eq 0 ]; then

echo "COMPLETED"

else

echo "ERROR - CODE: $?"

fi

With every build on the master branch it will now automatically push a new binary and start an assessment in Lab Automated.

Integration Complete

Buddybuild integration is now complete for your account with Lab Automated. If you need assistance, feel free to contact support.

See a Video Walkthrough

This video showcases four key functions:

  • Commit a new mobile app build in GitHub
  • Build your app using CI tools like buddybuild
  • Automatically run a security assessment in Lab Automated
  • View issues and assign them to your team in JIRA