Commit f9e09aaf authored by Aleksey Mikhailov's avatar Aleksey Mikhailov 🗻
Browse files

Merge branch 'gitlab-distrib' into 'master'

MOKO-1250 gitlab app distribution setup

See merge request !59
parents b4e21d28 fc5839f0
Pipeline #46792 passed with stages
in 7 minutes and 51 seconds
......@@ -57,7 +57,8 @@ build ios dev:
only:
- /^build/ios/dev/[0-9]*$/
deploy ios to dev firebase:
# remove dot if you want firebase deploy
.deploy ios to dev firebase:
extends: .deploy_ios_mpp_firebase
variables:
BUILD_APP_IDENTIFIER: $IOS_BUNDLEID_DEV
......@@ -72,6 +73,20 @@ deploy ios to dev firebase:
only:
- /^build/ios/dev/[0-9]*$/
deploy ios to dev gitlab:
extends: .deploy_ios_mpp_gitlab
variables:
BUILD_APP_IDENTIFIER: $IOS_BUNDLEID_DEV
BUILD_SCHEME: $IOS_SCHEME_DEV
BUILD_EXPORT_METHOD: 'enterprise'
<<: *ios_dev_pre_script
environment:
name: gitlab ios dev
except:
- branches
only:
- /^build/ios/dev/[0-9]*$/
build ios stage:
extends: .build_ios_mpp
variables:
......@@ -83,7 +98,8 @@ build ios stage:
only:
- /^build/ios/stage/[0-9]*$/
deploy ios to stage firebase:
# remove dot if you want firebase deploy
.deploy ios to stage firebase:
extends: .deploy_ios_mpp_firebase
variables:
BUILD_APP_IDENTIFIER: $IOS_BUNDLEID_STAGE
......@@ -98,6 +114,20 @@ deploy ios to stage firebase:
only:
- /^build/ios/stage/[0-9]*$/
deploy ios to stage gitlab:
extends: .deploy_ios_mpp_gitlab
variables:
BUILD_APP_IDENTIFIER: $IOS_BUNDLEID_STAGE
BUILD_SCHEME: $IOS_SCHEME_STAGE
BUILD_EXPORT_METHOD: 'enterprise'
<<: *ios_stage_pre_script
environment:
name: gitlab ios stage
except:
- branches
only:
- /^build/ios/stage/[0-9]*$/
build ios prod:
extends: .build_ios_mpp
variables:
......@@ -109,7 +139,8 @@ build ios prod:
only:
- /^build/ios/prod/[0-9]*$/
deploy ios to prod firebase:
# remove dot if you want firebase deploy
.deploy ios to prod firebase:
extends: .deploy_ios_mpp_firebase
variables:
BUILD_APP_IDENTIFIER: $IOS_BUNDLEID_PROD
......@@ -124,6 +155,20 @@ deploy ios to prod firebase:
only:
- /^build/ios/prod/[0-9]*$/
deploy ios to prod gitlab:
extends: .deploy_ios_mpp_gitlab
variables:
BUILD_APP_IDENTIFIER: $IOS_BUNDLEID_PROD
BUILD_SCHEME: $IOS_SCHEME_PROD
BUILD_EXPORT_METHOD: 'ad-hoc'
<<: *ios_prod_pre_script
environment:
name: gitlab ios prod
except:
- branches
only:
- /^build/ios/prod/[0-9]*$/
build ios prod appstore:
extends: .build_ios_mpp
variables:
......@@ -184,7 +229,8 @@ build android prod:
only:
- /^build/android/prod/[0-9]*$/
deploy android dev to firebase:
# remove dot if you want firebase deploy
.deploy android dev to firebase:
extends: .deploy_android_firebase
variables:
FIREBASE_APP_ID: $FIREBASE_APP_ID_ANDROID_DEV
......@@ -195,7 +241,17 @@ deploy android dev to firebase:
only:
- /^build/android/dev/[0-9]*$/
deploy testlab dev:
deploy android dev to gitlab:
extends: .deploy_android_gitlab
environment:
name: gitlab android dev
except:
- branches
only:
- /^build/android/dev/[0-9]*$/
# remove dot to enable Fireabase Testlab for Android (setup of service account required!)
.deploy testlab dev:
extends: .deploy_android_firebase_test_lab
variables:
FIREBASE_APP_ID: $FIREBASE_APP_ID_ANDROID_DEV
......@@ -206,7 +262,8 @@ deploy testlab dev:
only:
- /^build/android/dev/[0-9]*$/
deploy android stage to firebase:
# remove dot if you want firebase deploy
.deploy android stage to firebase:
extends: .deploy_android_firebase
variables:
FIREBASE_APP_ID: $FIREBASE_APP_ID_ANDROID_STAGE
......@@ -217,7 +274,17 @@ deploy android stage to firebase:
only:
- /^build/android/stage/[0-9]*$/
deploy testlab stage:
deploy android stage to gitlab:
extends: .deploy_android_gitlab
environment:
name: gitlab android stage
except:
- branches
only:
- /^build/android/stage/[0-9]*$/
# remove dot to enable Fireabase Testlab for Android (setup of service account required!)
.deploy testlab stage:
extends: .deploy_android_firebase_test_lab
variables:
FIREBASE_APP_ID: $FIREBASE_APP_ID_ANDROID_STAGE
......@@ -228,7 +295,8 @@ deploy testlab stage:
only:
- /^build/android/stage/[0-9]*$/
deploy android prod to firebase:
# remove dot if you want firebase deploy
.deploy android prod to firebase:
extends: .deploy_android_firebase
variables:
FIREBASE_APP_ID: $FIREBASE_APP_ID_ANDROID_PROD
......@@ -239,7 +307,17 @@ deploy android prod to firebase:
only:
- /^build/android/prod/[0-9]*$/
deploy testlab prod:
deploy android prod to gitlab:
extends: .deploy_android_gitlab
environment:
name: gitlab android prod
except:
- branches
only:
- /^build/android/prod/[0-9]*$/
# remove dot to enable Fireabase Testlab for Android (setup of service account required!)
.deploy testlab prod:
extends: .deploy_android_firebase_test_lab
variables:
FIREBASE_APP_ID: $FIREBASE_APP_ID_ANDROID_PROD
......
......@@ -41,12 +41,19 @@ Different parameter for production bundle needed for cases when you use fully di
- Call `./setup-android-signing.sh <key_name> <gitlab_token> <gitlab_project_id>`
- commit and push created file
## Setup Firebase deploy
## Setup Firebase AppDistribution deploy
- run `firebase login:ci`
- copy token from results
- call `./setup-firebase-deploy.sh <gitlab_token> <gitlab_project_id> <firebase_token>`
- In the App Distribution page of the Firebase console, select the app you want to distribute, then click `Get started`
- in `.gitlab-ci.yml` remove dots at start of deploy firebase jobs
- in `.gitlab-ci.yml` remove gitlab distribution jobs
## Setup GitLab Distribution deploy
- get token from [Confluence](https://confluence.icerockdev.com/pages/viewpage.action?pageId=69437109)
- call `./setup-gitlab-deploy.sh <gitlab_token> <gitlab_project_id> <deploy_token>`
## Setup iOS CI config
......
#!/bin/bash
set -euo pipefail
GITLAB_TOKEN=$1
GITLAB_PROJECT_ID=$2
GITLAB_DISTRIB_TOKEN=$3
curl --request POST --header "PRIVATE-TOKEN: $GITLAB_TOKEN" \
"https://gitlab.icerockdev.com/api/v4/projects/$GITLAB_PROJECT_ID/variables" \
--form "key=GITLAB_DIST_TOKEN" --form "value=$GITLAB_DISTRIB_TOKEN"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment