The runtime environment, where your scripts recorded in the hutte.yml file are executed, is based on Ubuntu. Please refer to the exact specifications at https://devcenter.heroku.com/articles/stack-packages and look for the heroku-22 version.
The following environment variables are available for use in your scripts:
Variable name | Description | Available in push_script and setup_script | Available in custom_script |
SF_TARGET_DEV_HUB | DevHub Username (alias) | ✓ | ✓ |
SF_TARGET_ORG | Username (alias) of the connected Org | ✓ | ✓ |
HUTTE_GIT_SOURCE_BRANCH | Feature branch name | ✓ | ✓ |
HUTTE_GIT_USER_NAME | Git username | 𐄂 | ✓ |
HUTTE_GIT_USER_EMAIL | Git email | 𐄂 | ✓ |
HUTTE_CUSTOM_SCRIPT_NAME | Name of the executed custom script | 𐄂 | ✓ |
Here is a sample usage of the custom variable SF_TARGET_ORG. This example is from a custom button that runs a data import using the popular SFDMU plugin:
custom_scripts:
scratch_org:
"Import Data":
description: "Import data using SFDMU"
run: |
echo y | sf plugins install sfdmu
sf sfdmu run -p data -s csvfile -u "${SF_TARGET_ORG}" --filelog 0 -n