How to run same configuration multiple times?

Completed

I have build config that builds apk with different params e.g. endpoint, debug or release mode. Its ok when i run it manually, just pressed 3 times and gain 3 different apk with neede params. But i need to build 3 apk at once when triggered release branch, i dont want to create one more config with hardcoded params. I dont know how solve my problem.  So far I managed to get 1 artifact through the dependent build but i need 3

Actual behaviour:

Config1: Make apk (url, buildType)

Config2: Release (triggered when appear new commit), and call 'Config1' with  hardcoded params. After build executed i gain 1 arttifact


Expected behaviour:

Config1: Make apk (url, buildType)

Config2: Release (triggered when appear new commit), and call 'Config1' with params (url1, debug), call 'Config1' with params (url2, debug), call 'Config1' with params (url3, release). Builds goes in parallel and after execute send notification with 3 artifacts.

0
3 comments

Hi, you can build all three APKs in the same build step. Assuming you have these tasks configured in Gradle, you can specify their names in “Gradle tasks” parameter of your “Gradle” build step. An example: “assembleRelease assembleDebug assembleEndpoint”. Please let me know if the suggested solution works for you.

0

Thanks for advice!
But if i understand you correctly this task will run synchronously. In my case i want to run three tasks parallel using one build configuration. 
My task is solved by copy-pasting config with help of templates with overriden perameters

0

To simplify the creation of such copy-pasted build configurations you may utilise the Build Configuration Template feature. It allows you to define most settings in one place and redefine only certain ones when creating build configurations from a template. This will save some time for you.

Alternatively, you can use Kotlin DSL to describe your project. This can be enabled in Versioned Settings in your Project. From there you may generate portable Kotlin scripts describing your project/builds. You may then edit the script and generate build configurations in a loop in the project.

0

Please sign in to leave a comment.