GitLab
This topic explains in detail the Integration between Appdome and GitLab.
To successfully secure your applications with Appdome from GitLab platform, you can either use Appdome build-2secure, or use Appdome DEV-API.
build-2secure - Recommended
With Appdome build-2secure, you can easily secure and customize your mobile apps on GitLab, 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 into your GitLab pipeline, please follow:build-2secure KB
DEV-API
To successfully use Appdome DEV-API in GitLab environment, please follow the below steps:
Requirements:
- An Appdome account
- Appdome’s token
- Fusion-Set ID
- A GitLab account with existing project or create new project create new project
Initial Configurations
According to your GitLab runner, you can either start with a terminal runner or bash Docker based runner.
Docker runner example:
image: ubuntu
Stage declaration (optional):
stages:
- appdome
API implementation
Declare a job that runs using your runner.
In script clause, 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:
appdome-job:
stage: deploy
tags:
- <Runner-tag>
script:
- apk --no-cache add curl jq
- |
echo "uploading..."
publicLink=$(curl -s --request GET \
--url "https://fusion.appdome.com/api/v1/upload-link" \
--header "Authorization: <API-Toke>")
curl -s -X PUT "$(echo "$publicLink" | jq -r .url)" \
--header 'Content-Type: application/x-compressed-tar' \
-T "<app-file-name>"
app=$(curl -s \
--request POST \
--url "https://fusion.appdome.com/api/v1/upload-using-link" \
--header "Authorization: <API-Toke>" \
--header 'content-type: multipart/form-data' \
--form file_name="<app-file-name>" \
--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_ID_ANDROID" \
--form app_id="$(echo "$app" | jq -r .id)" \
)
task_id="$(echo "$task_id" | jq -r .task_id)"
echo "task-id: $task_id"
artifacts: #save build resutls as GitLab artifacts
paths:
- <Results-location>
expire_in: 1 week
Updated 8 months ago