The following tutorial will guide you through the process of integrating Buddybuild with Lab Automated.
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.
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_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.
Buddybuild integration is now complete for your account with Lab Automated. If you need assistance, feel free to contact support.
This video showcases four key functions: