move secrets to hashicorp, don't use match (wip)
Some checks failed
Build and deploy the backend to staging / Build and push image (pull_request) Successful in 1m41s
Build and release debug APK / Build APK (pull_request) Failing after 4m46s
Build and deploy the backend to staging / Deploy to staging (pull_request) Successful in 16s

This commit is contained in:
2024-12-14 16:39:27 +01:00
parent 4a542a4a1f
commit cbada7e4a4
6 changed files with 115 additions and 41 deletions

View File

@@ -46,12 +46,17 @@ bundle exec fastlane <lane>
```
This is reused in the CI/CD pipeline to automate the deployment process.
Fastlane assumes mutliple secrets to be present as files in the platform directories. These are:
- for android:
- `secrets.properties` used by gradle to load secrets needed at execution time
- `release.keystore` used by gradle to sign the apk
- `google-key.json` used by fastlane to authenticate with the Google Play Store
- for ios:
- TODO
Secrets used by fastlane are stored on hashicorp vault and are fetched by the CI/CD pipeline. See below.
These files are stored as secrets in the GitHub repository so that the CI pipeline can access them.
## Secrets
These are mostly used by the CI/CD pipeline to deploy the application. The main usage for github actions is documented under [https://github.com/hashicorp/vault-action](https://github.com/hashicorp/vault-action).
**Global secrets** are used for both versions of the app (android and ios).
- `GOOGLE_MAPS_API_KEY` is used to authenticate with the Google Maps API
**Platform-specific secrets** are used by the CI/CD pipeline to deploy to the respective app stores.
- `ANDROID_KEYSTORE` is used to sign the android apk
- `ANDROID_GOOGLE_KEY` is used to authenticate with the Google Play Store api
- `IOS_GOOGLE_...`
- `IOS_GOOGLE_...`
- `IOS_GOOGLE_...`
- `IOS_GOOGLE_...`