Hi,
I was wondering what’s the best way to do sort steps looping.
As an example.
We have an iOS application which we want to put on Fabric but for 3 build configurations.
We want to make an Archive and Upload to fabric. For ‘Beta-Prod’ - ‘Beta-Stag’ - ‘InHouse’
So I’m looking for the best way to do these steps for these 3 configurations.
Also the configurations could be different for every app so it should be sort of dynamic. Maybe like an ENV var with different configurations. I have no clue what’s the best way to do it.
The reason it has to be dynamic is because we are looking to make like 1 generic bitrise.yml file for all the apps and only difference is the ENV vars.
Maybe would be cool to have like support for Jinja2?
http://dontfragment.com/using-python-yaml-and-jinja2-to-generate-config-files/
So you could do something like.
{% for build_config in $BUILD_CONFIGS %}
- xcode-archive@2.4.15:
inputs:
- export_method: "$BITRISE_EXPORT_METHOD"
- configuration: build_config
- fabric-crashlytics-beta-deploy@2.2.4:
inputs:
- build_secret: "$FABRIC_BUILD_SECRET"
- group_aliases_list: "$FABRIC_TESTER_GROUPS"
- release_notes: '$GIT_CLONE_COMMIT_MESSAGE_BODY'
- api_key: "$FABRIC_API_KEY"
{% endfor %}
And you will see all the steps in the workflow but of course you can’t edit it.
I hope my question is clear
Friendly regards,
Seppe