mirror of
https://github.com/AU-COVIDSafe/mobile-ios.git
synced 2025-04-26 00:15:20 +00:00
COVIDSafe code from version 2.6 (#51)
This commit is contained in:
parent
195798ddd5
commit
4d98b6c5e4
43 changed files with 910 additions and 144 deletions
49
.circleci/README.md
Normal file
49
.circleci/README.md
Normal file
|
@ -0,0 +1,49 @@
|
|||
|
||||
## Introduction
|
||||
|
||||
CircleCI has a workflow configured to build and upload UAT builds once a merge is done to the dev branch. In the same way, there is a workflow for production and it runs when a merge is done to the master branch.
|
||||
|
||||
Fastlane is used to build and distribute the app.
|
||||
|
||||
|
||||
## Fastlane Configuration
|
||||
|
||||
The approach taken for the app build and distribution was to provide the `provisioning profile` and the `certificate` manually rather than retrieving it automatically from appstore connect. For this, environment variables are set with the required values for both UAT and PROD.
|
||||
|
||||
This aliviates the requirements for authentication and interaction with the appstore leaving upload as the only outstanding task in the lanes. With fastlane's `pilot` we upload the app to TestFlight using application specific password, this action **requires** both `apple_id` and `skip_waiting_for_build_processing`. For more information see https://docs.fastlane.tools/actions/upload_to_testflight/#use-an-application-specific-password-to-upload
|
||||
|
||||
Note: Build numbers need to be set correctly on merge otherwise the upload will fail. In order to automate the build number update it is recomended to use an api_key.
|
||||
|
||||
### Lanes
|
||||
|
||||
There are 2 lanes defined per app build (UAT and PROD):
|
||||
|
||||
- import_uat_distribution_certificate: This lane will decode and install the needed provisioning profile and signing certificate for the UAT build.
|
||||
- import_distribution_certificate: This lane will decode and install the needed provisioning profile and signing certificate for the PROD build.
|
||||
- beta: This lane will build and upload the UAT build to testflight
|
||||
- release: This lane will build and upload the PROD build to testflight
|
||||
|
||||
## CircleCI Project Configuration
|
||||
|
||||
The following environment variables need to be set in the CircleCI web console project configuration.
|
||||
|
||||
|
||||
- APP_STORE_UAT_PROFILE_B64: Base64 encoded provisioning profile to use with UAT builds
|
||||
- DISTRIBUTION_UAT_P12_B64: Base64 encoded distribution certificate to use with UAT builds
|
||||
- DISTRIBUTION_UAT_P12_PASSWORD: Password for the UAT certificate above.
|
||||
- APPLE_ID_UAT: This is the apps apple id. Can be found in appstore connect under App information -> General information.
|
||||
|
||||
- APP_STORE_PROFILE_B64: Base64 encoded provisioning profile to use with UAT builds
|
||||
- DISTRIBUTION_P12_B64: Base64 encoded distribution certificate to use with UAT builds
|
||||
- DISTRIBUTION_P12_PASSWORD: Password for the UAT certificate above.
|
||||
- APPLE_ID: This is the apps apple id. Can be found in appstore connect under App information -> General information.
|
||||
|
||||
- FASTLANE_USER: App store connect user
|
||||
- FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: Application specific password generated for Fastlane. This is account specific rather than app specific, share the same for UAT and PROD. For more information on how to generate the password see https://docs.fastlane.tools/best-practices/continuous-integration/#method-3-application-specific-passwords
|
||||
|
||||
|
||||
To get a base64 encoded string of the desired secret run
|
||||
|
||||
```
|
||||
openssl base64 -A -in "filename.extension"
|
||||
```
|
69
.circleci/config.yml
Normal file
69
.circleci/config.yml
Normal file
|
@ -0,0 +1,69 @@
|
|||
# Circle CI Build config for COVIDSafe
|
||||
|
||||
version: 2.1
|
||||
|
||||
|
||||
commands:
|
||||
|
||||
prepare-uat:
|
||||
steps:
|
||||
- checkout
|
||||
- run: bundle install
|
||||
- run: mkdir -pv ~/Library/MobileDevice/Provisioning\ Profiles/
|
||||
- run: echo ${APP_STORE_UAT_PROFILE_B64} | base64 --decode > ~/Library/MobileDevice/Provisioning\ Profiles/AppStore_UAT.mobileprovision
|
||||
- run: echo ${DISTRIBUTION_UAT_P12_B64} | base64 --decode > Distribution_UAT.p12
|
||||
- run: bundle exec fastlane import_uat_distribution_certificate
|
||||
|
||||
prepare-release:
|
||||
steps:
|
||||
- checkout
|
||||
- run: bundle install
|
||||
- run: mkdir -pv ~/Library/MobileDevice/Provisioning\ Profiles/
|
||||
- run: echo ${APP_STORE_PROFILE_B64} | base64 --decode > ~/Library/MobileDevice/Provisioning\ Profiles/AppStore.mobileprovision
|
||||
- run: echo ${DISTRIBUTION_P12_B64} | base64 --decode > Distribution.p12
|
||||
- run: bundle exec fastlane import_distribution_certificate
|
||||
|
||||
jobs:
|
||||
|
||||
build-uat:
|
||||
|
||||
macos:
|
||||
xcode: 12.4.0 # Specify the Xcode version to use
|
||||
environment:
|
||||
FL_OUTPUT_DIR: output
|
||||
steps:
|
||||
- prepare-uat
|
||||
- checkout
|
||||
- run: bundle exec pod install
|
||||
- run: bundle exec fastlane beta
|
||||
- store_artifacts:
|
||||
path: output
|
||||
|
||||
build-release:
|
||||
|
||||
macos:
|
||||
xcode: 12.4.0 # Specify the Xcode version to use
|
||||
environment:
|
||||
FL_OUTPUT_DIR: output
|
||||
steps:
|
||||
- prepare-release
|
||||
- checkout
|
||||
- run: bundle exec pod install
|
||||
- run: bundle exec fastlane release
|
||||
- store_artifacts:
|
||||
path: output
|
||||
|
||||
workflows:
|
||||
build-uat:
|
||||
jobs:
|
||||
- build-uat:
|
||||
filters:
|
||||
branches:
|
||||
only: dev
|
||||
|
||||
build-release:
|
||||
jobs:
|
||||
- build-release:
|
||||
filters:
|
||||
branches:
|
||||
only: master
|
Loading…
Add table
Add a link
Reference in a new issue