Local testing

This commit is contained in:
2023-08-03 22:05:35 +01:00
parent cd2f90d6ef
commit 2ccf734428
5 changed files with 50 additions and 39 deletions

View File

@@ -26,6 +26,7 @@ commands:
command: |
sudo chmod +x ./gradlew
./gradlew androidDependencies
- android/save-gradle-cache
# Setup files for build.
- run:
name: Setup variables for build
@@ -125,10 +126,10 @@ jobs:
steps:
# Checkout the code and its submodule as the first step.
- setup_repo
- run_tests:
flavour: << parameters.flavour >>
- run_ui_tests:
flavour: << parameters.flavour >>
# - run_tests:
# flavour: << parameters.flavour >>
# - run_ui_tests:
# flavour: << parameters.flavour >>
# Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
workflows:
@@ -137,37 +138,41 @@ workflows:
jobs:
- build-and-test:
flavour: "Driver"
filters:
branches:
ignore:
- main_admin
# filters:
# branches:
# ignore:
# - main_admin
- android/deploy-to-play-store:
filters:
branches:
only:
- main_driver
- circleci_branch_filter_fix
requires:
- build-and-test
executor:
name: android/android-machine
tag: 2023.05.1
keystore-location: "./app/keystore.jks"
release-keystore: "keystore.jks"
lane-name: deployDriver
build-release-admin:
jobs:
- build-and-test:
flavour: "Admin"
filters:
branches:
ignore:
- main_driver
- android/deploy-to-play-store:
filters:
branches:
only:
- main_admin
requires:
- build-and-test
executor:
name: android/android-machine
tag: 2023.05.1
lane-name: deployAdmin
# build-release-admin:
# jobs:
# - build-and-test:
# flavour: "Admin"
# filters:
# branches:
# ignore:
# - main_driver
# - android/deploy-to-play-store:
# filters:
# branches:
# only:
# - main_admin
# requires:
# - build-and-test
# executor:
# name: android/android-machine
# tag: 2023.05.1
# keystore-location: "keystore.jks"
# lane-name: deployAdmin

View File

@@ -6,9 +6,9 @@ plugins {
id 'androidx.navigation.safeargs'
}
def relStorePassword = System.getenv("RELEASE_STORE_PASSWORD")
def relKeyPassword = System.getenv("RELEASE_KEY_PASSWORD")
def relKeyAlias = System.getenv("RELEASE_KEY_ALIAS")
def keyStorePropertiesFile = rootProject.file("keystore.properties")
def keyStoreProperties = new Properties()
keyStoreProperties.load(new FileInputStream(keyStorePropertiesFile))
android {
compileSdkVersion 31
@@ -37,10 +37,10 @@ android {
signingConfigs {
release {
storePassword relStorePassword
keyPassword relKeyPassword
keyAlias relKeyAlias
storeFile file('./keystore')
keyAlias keyStoreProperties['releaseKeyAlias']
keyPassword keyStoreProperties['releaseKeyPassword']
storeFile file(keyStoreProperties['releaseKeyStore'])
storePassword keyStoreProperties['releaseStorePassword']
}
}

View File

@@ -1,2 +1,2 @@
circleci config process .circleci/local_config.yml > process.yml
circleci local execute -c process.yml build-and-test-1 -e $GIT_EMAIL="h.malik144@gmail.com" -e BASE64_KEYSTORE=$BASE64_KEYSTORE -e RELEASE_KEYSTORE=$RELEASE_KEYSTORE -e RELEASE_STORE_PASSWORD=$RELEASE_STORE_PASSWORD -e RELEASE_KEY_PASSWORD=$RELEASE_KEY_PASSWORD -e RELEASE_KEY_ALIAS=$RELEASE_KEY_ALIAS -e DOCKER_USERNAME=$DOCKER_USERNAME -e DOCKER_PASSWORD=$DOCKER_PASSWORD -e GOOGLE_SERVICES_KEY=$DRIVER_GOOGLE_SERVICES
circleci local execute -v $(pwd):/root/repo -c process.yml deploy-to-play-store-1 -e $GIT_EMAIL="h.malik144@gmail.com" -e BASE64_KEYSTORE=$BASE64_KEYSTORE -e RELEASE_KEYSTORE=$RELEASE_KEYSTORE -e RELEASE_STORE_PASSWORD=$RELEASE_STORE_PASSWORD -e RELEASE_KEY_PASSWORD=$RELEASE_KEY_PASSWORD -e RELEASE_KEY_ALIAS=$RELEASE_KEY_ALIAS -e DOCKER_USERNAME=$DOCKER_USERNAME -e DOCKER_PASSWORD=$DOCKER_PASSWORD -e DRIVER_GOOGLE_SERVICES_B64=$DRIVER_GOOGLE_SERVICES_B64

View File

@@ -32,13 +32,19 @@ platform :android do
desc "Deploy a new version of Driver to the Google Play"
lane :deployDriver do
gradle(task: "clean bundle", flavor: "driver", build_type: "Release")
upload_to_play_store(aab: "app/build/outputs/bundle/driverRelease/app-driver-release.aab", json_key: "google-play-key.json", package_name: "h_mal.appttude.com.driver")
gradle(
task: "clean bundle",
flavor: "Driver",
build_type: "Release")
upload_to_play_store(
aab: "app/build/outputs/bundle/driverRelease/app-driver-release.aab",
json_key: "google-play-key.json",
package_name: "h_mal.appttude.com.driver")
end
desc "Deploy a new version of Admin to the Google Play"
lane :deployAdmin do
gradle(task: "clean bundle", flavor: "admin", build_type: "Release")
gradle(task: "clean bundle", flavor: "Admin", build_type: "Release")
upload_to_play_store(aab: "app/build/outputs/bundle/adminRelease/app-admin-release.aab", json_key: "google-play-key.json", package_name: "h_mal.appttude.com.driver.admin")
end
end

View File

@@ -1,6 +1,6 @@
#Mon Feb 13 21:54:13 GMT 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME