Is there a way to specify different build commands based on the the branch the build was triggered from?
For android specifically I’d like to be able to build 1 flavor+buildType per branch.
ex:
for branch/master: gradlew assembleMasterDebug
for branch/full: gradlew assembleFullRelease
This differentiation is currently available for the deployment step, but not the test step where the build happens.
Could you explain what you mean by each branch can have a different circle.yml? Maybe I’m missing something.
As best as I can tell from https://circleci.com/docs/1.0/configuration/ the only place you can do per-branch config is in the deployment phase. I need per-branch config in the test phase where the apk is built.
What he means is that when you push your branch to Github, and then CI pulls it and starts doing stuff. Well you pushed code that is specific to your branch. Your circle.yml is part of that branches code.
All you need to do is make your circle.yml files specific to their branch.
So in your master branch, your circle.yml calls gradlew assembleMasterDebug
In you full branch, your circle.yml calls gradlew assembleFullRelease instead.
As long as you keep the circle.yml files separate, it will work.