This topic explains in detail the Integration between Appdome and CircleCI.

To successfully secure your applications with Appdome from CircleCI platform, you can either use Appdome build-2secure orb, or use Appdome DEV-API.

build-2secure orb - Recommended

With this orb, you can easily secure and customize your mobile apps on CircleCI, including signing your app with your own enterprise certificate for added flexibility and control. No coding or technical expertise is required.

For detailed information about integrating build-2secure orb into your CircleCI pipeline, please follow:build-2secure KB

DEV-API

To successfully use Appdome DEV-API in CircleCI environment, please follow the below steps:

Requirements:

  1. An Appdome account
  2. Appdome’s token
  3. Fusion-Set ID
  4. A CircleCI account. To create a new project on CircleCI, please follow this guide

Initial Configurations

According to your CircleCI version, you can either start with a simple bash terminal Docker or orb.

Orb example:

version: 2.1

orbs:
  shellcheck: circleci/[email protected]

Docker example:

version: 2
jobs:
  shellcheck:
    docker:
      - image: koalaman/shellcheck-alpine:stable

API implementation

Start by installing curl and jq.
Continue with implementing each part of the build process as documented in the How to section.

Example for uploading and building your app:

jobs:
  api-usage:
    steps:
      - checkout
      - run:
          name: "secure-app"
          command: |
            apt --no-cache add curl jq
       			echo "uploading..."
            publicLink=$(curl -s --request GET \
                --url "https://fusion.appdome.com/api/v1/upload-link" \
              --header "Authorization: $APPDOME_API_TOKEN")
            curl -s -X PUT "$(echo "$publicLink" | jq -r .url)" \
                --header 'Content-Type: application/x-compressed-tar' \
              -T $APP_FILE
            app=$(curl -s \
                --request POST \
              --url "https://fusion.appdome.com/api/v1/upload-using-link" \
              --header "Authorization: $APPDOME_API_TOKEN" \
              --header 'content-type: multipart/form-data' \
              --form file_name=$APP_FILE \
              --form file_app_id="$(echo "$publicLink" | jq -r .file_id)")
            echo "building..."
            task_id=$(
                curl -s --request POST \
                  --url "https://fusion.appdome.com/api/v1/tasks" \
                  --header "Authorization: $APPDOME_API_TOKEN" \
                  --header 'accept: application/json' \
                  --header 'content-type: multipart/form-data' \
                  --form action=fuse \
                  --form fusion_set_id="$FUSION_SET" \
                  --form app_id="$(echo "$app" | jq -r .id)" |
                jq -r .task_id
              )
            statusWaiter() {
              task_id=$task_id
              status="progress"
              while [[ $status == "progress" ]]; do
                status=$(curl -s --request GET \
                  --url "https://fusion.appdome.com/api/v1/tasks/$task_id/status?team_id=personal" \
                  --header 'Content-Type: application/json' \
                  --header "Authorization: $APPDOME_API_TOKEN" |
                  jq -r '.status')
                sleep 0.5
              done
            }
            statusWaiter "$task_id"

workflows:
  api-secure-app:
    jobs:
      - api-usage