This topic explains in detail the Integration between Appdome and Bitrise workflow.

To successfully secure your applications with Appdome from Bitrise, you can either use "Appdome build-2secure" extension, or use Appdome DEV-API.

build-2secure action - Recommended

With this action, you can easily secure and customize your mobile apps on Bitrise, 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 "Appdome build-2secure" action into your Bitrise workflow, please follow: Appdome build-2secure KB

DEV-API

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

Requirements:

An Appdome account
Appdome’s token
Fusion-Set ID
A Bitrise account
An active repository

  1. Create a new workflow for your project.
  2. Add the following Secret to your workflow:

APPDOME_API_TOKEN - Your Appdome API token

  1. Add the following Env Vars to your workflow:

APP_LOCATION - URL to your app file

FUSION_SET - Fusion set ID

  1. Add a new step. Looking for "Script" in the step search bar, select and add it to your workflow.
  2. After the Script step had been added to the workflow, click on it to edit its input variables.
  3. Copy the snipped code to the Script content

API implementation

Steps:

#!/bin/bash

export APP_FILE=$APP_LOCATION

download_file() {
  file_location=$1
  uri=$(echo $file_location | awk -F "?" '{print $1}')
  downloaded_file=$(basename $uri)
  curl $file_location --output $downloaded_file && echo $downloaded_file
}

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
}

if [[ $APP_FILE == *"http"* ]];
then
	APP_FILE=$(download_file $APP_FILE)
else
	APP_FILE=$app_location
fi

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"

Continue with implementing each part of the build process as documented in the How to section.