Hello,
We have a single android project from which we’re building 27 different apps. The backbone of these apps is more or less the same. Some features are different or enabled only on some of the brands, but overall the apps look very similar to each other.
I use environment variable to determine which customers to build for. Environment variable and configuration definition as follows:
TENANT_NAMES=‘customer1;customer2’
language: android jdk: oraclejdk8 android: licenses: - 'android-sdk-preview-license-.+' - 'android-sdk-license-.+' - 'google-gdk-license-.+' components: - tools - platform-tools - build-tools-29.0.2 - android-29 script: - | for TENANT_NAME in $(echo ${TENANT_NAMES} | tr ";" "\n") do echo "Build is starting for $TENANT_NAME" ./gradlew app:assemble${TENANT_NAME} done
I want to run build process in parallel to shorten the execution time. I have done this by changing the following lines and it works great. You can see details here
env: matrix: - TENANT_NAME=customer1 - TENANT_NAME=customer2 script: - | echo "Build is starting for $TENANT_NAME" ./gradlew app:assemble${TENANT_NAME}
In the next step, I added the following lines to dynamically define the customers to start build process without changing travis.yml file.
env: matrix: - for TEMP in $(echo ${TENANT_NAMES} | tr ";" "\n"); do env TENANT_NAME=$TEMP; done
But it does not work as expectation and I couldn’t find solution. Can you help please?
https://travis-ci.com/dtprotel/loyalty-android/builds/144132930
Thanks