The following tutorial will guide you through the process of integrating Buddybuild with NowSecure Auto.
STEP 1 Get an API token from NowSecure Auto
API tokens can be created by navigating to the Profile & Preferences page. Enter a Token Name in the Create Access Token field and click the Create button.
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 NowSecure Auto.
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 NowSecure Auto ... " 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 NowSecure Auto.
Buddybuild integration is now complete for your account with NowSecure Auto. If you need assistance, feel free to contact support.
This video showcases four key functions: