CircleCI Integration

CircleCI Integration Instructions

The following tutorial will guide you through the process of integrating CircleCI 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 Open your CircleCI build configuration and navigate to Environment Variables.

STEP 3 Add a variable with the value of your access token given by Lab Automated. In this case we named ours “LAB_TOKEN.”

STEP 4 Open your “circle.yml” file in the root of your app’s repository.

STEP 5 In the test section, confirm that your built IPA or APK file is going to the artifacts.

STEP 6 In the deployment section under commands, add the following to run a security assessment on the uploaded file. Make sure that the command points to the location of the binary in the CircleCI artifacts.

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

    - (./gradlew assemble -PdisablePreDex):
      timeout: 360
    - cp -r ${HOME}/${CIRCLE_PROJECT_REPONAME}/app/build/outputs/apk/ $CIRCLE_ARTIFACTS

#Deploy when tests pass
    branch: master
        #Send to Lab Automated and run an assessment
        - curl -X POST --data-binary @$CIRCLE_ARTIFACTS/apk/app-debug.apk -H "Authorization:Bearer $LAB_TOKEN"

Every build on the master branch will now automatically push a new binary and start a security assessment in Lab Automated. You can place the curl command however you see fit to determine which builds are affected.

Integration Complete

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

CircleCI Integration Video