Hi,
Is there a way to know if your steps are running on Standard or Elite Machines?
I would like to run some steps only on the elite machines because the standard ones can’t handle it.
Friendly regards,
Seppe
Hi,
Is there a way to know if your steps are running on Standard or Elite Machines?
I would like to run some steps only on the elite machines because the standard ones can’t handle it.
Friendly regards,
Seppe
Hi @seppe_r!
Well, the way to do that is checking/knowing whether you have an Elite Organization subscription or not
As Elite machines are restricted to those kinds of plans.
Well the problem is. We generate bitrise.ymls for 2 orgs one is elite and one isn’t…
But they use the same workflow. And I would like to detect it in the step
Or maybe I should detect the cpu core count?
I see! We’ve gave this some thought and recommend using the following template:
#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x
# write your script here
brew install jq
json=$(curl -H 'Authorization: '${router}'' "https://api.bitrise.io/v0.1/apps/${BITRISE_APP_SLUG}/builds/${BITRISE_BUILD_SLUG}")
stack=$(echo "${json}" | jq -r '.data | .stack_config_type')
if [[ $stack == *"elite"* ]]; then
envman add --key ELITE_RUN --value true
else
envman add --key ELITE_RUN --value false
fi
Ah thanks!
But I should paste my access token in the router? Or secret var?
Would definitely recommend only using the token as a secret!