Details
-
Feature
-
Status: Released (View Workflow)
-
Minor
-
Resolution: Fixed
-
2.0.0
-
None
Description
Feature
- JOC Cockpit supports re-usable script snippets.
- Such snippets are managed from the "DailyPlan" object folder and "Scripts" object sub-folder in the JOC Cockpit Configuration View.
- The names of "Scripts" are unique across folders.
- Snippets can include any sort of script code. No syntax checking is performed.
- Syntax Highlighting: the Script Editor for "Scripts" supports the most common languages such as Perl, PowerShell, Python, Ruby etc.
- "Scripts" can be referenced from Shell Jobs. A reference has the following format:
(##|::|//)!include script-include-name [--replace="search literal","replacement literal" [--replace=...]]
Example in a Unix Shell Job looks like this:
#!/user/bin/bash ##!include bash_functions get_env ##!include global_paths --replace="/home/sos","/home/js7" --replace="/var/myapp","/home/js7/myapp" hostname
-
- Any number of references to the same or to different "Scripts" can occur in a Shell Job.
- "Script Includes" support replacements that are specified with the --replace= argument followed by the original value and separated by a comma , the replacement.
- The Deployment functionality of JOC Cockpit
- replaces any occurrences of "Script Includes" by the respective "Script"
- performs any replacements in the included "Script" snippet.
- The Export/Import functionality of JOC Cockpit supports use of "Scripts"
- The "Search" functionality of JOC Cockpit offers
- to find any workflows that include jobs with references to "Script" snippets,
- bulk operations to update "Script Includes" such as to delete or to update "Script Includes".