Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Script Includes are managed from the Configuration view , for example for a number of use cases.

Use Case: Global Functions

This use case include to define functions, e.g. for bash scripts, that can be used across job scripts in a number of workflows:

Use Case: Environment Variables

Script Includes can similarly be used to define environment variables that are used in a number of shell scripts:

...

  • Use of JS7 - Job Resources is preferable if the only purpose of the Script Include is to publish environment variables to shell scripts. 

Use Case: Shebang Replacement

Script Includes can be used as a shebang replacement:

Image Added


Hint:

Applying Script Includes

Use Case: Global Functions

Script Includes can be applied to any Shell Jobs. Consider the example of a workflow that includes a Shell Job like this:

...

The job script in the above workflow looks like this:

Use Case: Shebang Replacement

The above example of a Script Include that hides the complexity of a shebang replacement for PowerShell with Windows is applied like this:

Image Added

Adding Script Includes to a Job Script

Script Includes can be added to a job script in a number of ways:

...