Description of the issue
Hi, i know there is a possibility to trigger Workflows with Build Start step. Can i do the same with apps? We have 3 apps on Bitrise - for rebuilding android, ios and one for testing. We want it to work like this:
- New build is merged,
- Bitrise rebuilds the app and deploys it,
- When rebuilding is finished, test app is triggered and new deployed app is tested.
These 3 apps are in 3 different repositories on gitlab so i think we can’t just do another workflow in matching app for tests because it won’t have access to test app gitlab repository? Or can i clone repository of different app?
We use browserstack for testing, step Browserstack-upload generates variable $BROWSERSTACK_APP_URL. How can i pass that variable to the test app so it will modify my browserstack.yml with new url?
Test app gitlab repository has two branches - one with tests for ios and one with tests for android. How can i specify which branch will be triggered?
EDIT: I found a way to do it. Now i have to share browserstack app url between two workflows.
Right now it works like this:
- Android app is builded
- Start build step starts another workflow with tests
- Workflow with tests clones another repository
There i have to pass new app url to browserstack.yml so tests can work on new version of the app. Any ideas how to do it? I tried to put it as env variable and share it in Start Build Step but it doesn’t get passed. I think it isn’t even saved to environment variable because thats the output of script that i’m using.
curl -u [REDACTED]:[REDACTED] -X POST https://api-cloud.browserstack.com/app-live/upload -F file=@/bitrise/deploy/app.apk
- response=‘{“app_url”:“bs://…”}’
++ echo ‘{“app_url”:“bs://…”}’
++ jq -r .app_url
-
app_url=bs://…
-
envman add --key BROWSERSTACK_APP_URL --value bs://…
-
echo bs://…
++ cat app_url.txt
-
stored_app_url=bs://…
-
echo 'BrowserStack App URL from envman: ’
BrowserStack App URL from envman: <---- empty space suggests me that it wasn’t set
- echo ‘Content of app_url.txt:’
Content of app_url.txt:
- cat app_url.txt
bs://…
- echo ‘Stored App URL from file: bs://…’
Stored App URL from file: bs://…