An extension resource definition may include optional shell scripts to be executed when the resource is used in a step as an input or output. These may be useful for:
Additional validation of properties
Testing for a property value to trigger a conditional action
onInput.sh
When present in the resource definition's repository directory, the onInput.sh
shell script will be executed whenever the resource is named among the step's inputResources
.
onInput.sh
test_input() { echo "onInput Executed" echo "resource name: $1" } execute_command "test_input %%context.resourceName%%"
onOutput.sh
When present in the resource definition's repository directory, the onOutput.sh
shell script will be executed whenever the resource is named among the step's OutputResources.
onOutput.sh
test_output() { echo "onOutput Executed" echo "resource name: $1" } execute_command "test_output %%context.resourceName%%"