master
branch and click nextconfig.xml
location with .
android
platform.You are done. No you can go to the workflow section and start preparing the configuration.
The app: envs:
section specifies Environment Variables which are available for every build, every workflow, every step.
APP_ID
: The bundle id for the app.PLATFORMS
: To set the platform to build. It can be android
, ios
, or ios,android
If you want to run a step only when a platform is defined in PLATFORMS
you can use the run_if
step property like this.
...
steps:
- deploy-to-itunesconnect-deliver:
run_if: |-
{{ enveq "is_ios" "true"}}
- google-play-deploy:
run_if: |-
{{ enveq "is_android" "true"}}
...
These are the main features of the staging workflow
cl.platan.myapp_staging
My App - Staging
versionCode
, this way we have an incremental versionCode
on each build.We can define specific configurations for the staging build in the envs
key under the staging
workflow.
STAGE: staging
The name of the stageBUILD_CONFIG: debug
the build type pass to the cordova build commandTo be able to update the app each time we trigger a new build, we have to sign the apk with the same certificate. Bitrise creates a new environment on each build, so the default debugging keystore is different each time hence we are going to get an error if we try to update our app.
To overcome this problem we need to create a common keystore for every build.
Use this command to create the keystore. Use android
as the keystore and key password.
keytool -genkey -v -keystore my-debug-key.keystore -alias androiddebugkey -keyalg RSA -keysize 2048 -validity 10000
Then upload the my-debug-key.keystore
to bitrise in the Code Signing section under generic file storage. Use DEBUG_KEYSTORE
as
the unique ID input.
We need to override the default keystore config in the workflow config
- BITRISEIO_ANDROID_KEYSTORE_URL: "$BITRISEIO_DEBUG_KEYSTORE_URL"
- BITRISEIO_ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD: android
- BITRISEIO_ANDROID_KEYSTORE_ALIAS: androiddebugkey
- BITRISEIO_ANDROID_KEYSTORE_PASSWORD: android
To trigger this workflow, we need to add some trigger map. We do this in the trigger_map
key. By default, we start with
a map that triggers the staging workflow when we push new changes to the master
branch.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)Thank you contributors!
Bitrise Cordova Configuration is maintained by platanus.
Bitrise Cordova Configuration is 2017 platanus, spa. It is free software and may be redistributed under the terms specified in the LICENSE file.