GitLab app distribution for Android builds
GitLab CI/CD can be used to deploy Android apps with the API Upload (curl) to Updraft.

Quick Start

  • Login into our app distribution tool getupdraft.com/login
  • Go to your Profile within the sidebar
  • Copy your API Key as well as the App Key of your App
    • Your API Key you find in your Profile.
    • The App Key you will find on the application overview. The App key differs for each environment.

Configure Gitlab CI/CD Settings & Variables

As soon you have your Updraft account created, you are ready to configure the CI/ CD pipeline with GitLab.
  1. 1.
    Open your Gitlab Project
  2. 2.
    Go to the Settings
  3. 3.
    Select CI/CD
  4. 4.
    Go to the section Variables
  5. 5.
    Add your Variables from Updraft (API key and App Key) in two separate fiels

Add .gitlab-ci.yml file for Android app distribution

  1. 1.
    Head over to the root directory (files) of your Android app project in GitLab.
  2. 2.
    Add a new file your .gitlab-cy.yml file
  3. 3.
    Copy the below example of .gitlab-ci.yml file

Example of .gitlab-ci.yml file for Android app distribution

1
stages:
2
- build
3
- updraft
4
5
buildProd:
6
stage: build
7
only:
8
- release
9
script:
10
- ./gradlew app:assembleProdRelease
11
artifacts:
12
paths:
13
- app/build/outputs/apk/prod/release/*.apk
14
15
deploy:
16
stage: updraft
17
only:
18
- release
19
script:
20
- |
21
curl \
22
-F whats_new="Gitlab build" \
23
-F "[email protected]/build/outputs/apk/prod/release/android.apk" \
24
-X PUT https://getupdraft.com/api/app_upload/$UPDRAFT_APP_KEY/$UPDRAFT_API_KEY/
25
Copied!