Quick Info
Description
A shell is a software that provides an interface for users of an operating system that provides access to the services of a kernel. Operating system shells typically fall into 1 of 2 categories: command line and graphical. Command-line shells provide a command-line interface (CLI) to the operating system, while graphical shells provide a graphical user interface (GUI). In either category, the primary purpose of the shell is to call or start another program. Shells frequently have more capabilities such as viewing the contents of directories.With the Shell plug-in, you can run custom shell scripts during the deployment process.
Quick Info
launch-shell-16.1155715.zip
Uploaded: 21-Apr-2023 14:11
launch-shell-15.1150657.zip
Uploaded: 01-Feb-2023 14:30
launch-shell-14.1148560.zip
Uploaded: 03-Jan-2023 15:40
Release Notes
Fixes APAR PH27500 - Shell step will now use AGENT_HOME/var/temp as the temporary directory.launch-shell-13.1142526.zip
Uploaded: 10-Oct-2022 16:34
Release Notes
Updating jettison library for CVE-2022-40150 CVE-2022-40149launch-shell-12.1131568.zip
Uploaded: 08-Apr-2022 15:34
Release Notes
Update log4j 2.17launch-shell-11.1128757.zip
Uploaded: 07-Feb-2022 16:49
Release Notes
Remove log4j functionality related to: CVE-2019-17571, CVE-2020-9488. CVE-2021-4104, CVE-2022-23302, CVE-2022-23305, CVE-2022-23307launch-shell-10.1126864.zip
Uploaded: 23-Dec-2021 06:15
Release Notes
Add compatibility with Groovy 3.launch-shell-10.1126079.zip
Uploaded: 02-Dec-2021 06:04
launch-shell-9.1108232.zip
Uploaded: 11-Jun-2021 11:21
Release Notes
Support property file encryption.Summary
The Shell plugin includes steps that run commands on the target system. You can run a command with or without arguments.
This plugin includes one or more steps, click Steps for step details and properties.
Compatibility
This plugin requires HCL Launch version 7.0 or later.
The steps in this plugin run on any agents that the HCL Launch server supports.
Installation
See Installing plugins in HCL Launch for installing and removing plugins.
History
The following table describes the changes made in each plugin version.
Version | Description |
---|---|
9 | Minor enhancements |
Usage
With the Shell plugin steps, you can run a Shell script as part of the deployment process. The plugin step contains the scripts.
The steps in this plugin wait until the command is complete. For best results, run commands that complete or run the commands in the background. If a command runs indefinitely, the step and the process that contains the step wait indefinitely.
The commands for each step share stdout and stdin streams. If you use a command or script that runs other commands, each of those commands uses the same stdout and stdin stream as the first command or script. The step waits for all commands to finish.
Each step runs in its own shell. For example, if you set a system variable in one step, future steps do not have access to the variable because they are running in a new instance of the shell.
If one shell script calls another shell script, starting a child process, this child process inherits the file descriptors of the parent process, such as input and output streams. If the parent shell script exits but the child process does not, the step continues, waiting for output from the child process. To make sure that the step can end normally, redirect the output and error streams for the child process. For example, if the child process is child.sh
, you can redirect the output and error streams with the following code:
child.sh < /dev/null > tempout 2>&1
cat tempout
Step palette
To access this plugin in the palette, click Scripting > Shell.
Steps
The following process steps are available in the Shell plugin.
Shell
Use this step to run a shell or batch script.
Name | Type | Description | Required |
---|---|---|---|
|
Boolean | If this property is enabled, the command runs in the background while it permits the step to complete immediately. The output is not captured if the command runs as a daemon. | No |
|
String | The working directory to use when you execute this command. This directory is relative to the current working directory. | Yes |
|
String | The interpreter to use to evaluate the command. If this property is left blank the following platform-specific interpreters are used: Windows:.bat file interpreterVMS: .com file interpreterOther: The shell that is specified by the air/shell agent variable if it is present. Linux and UNIX systems might override this setting by having the command line start with a #! sequence. |
No |
|
String | Specify this property only if the Daemon property is enabled. The path of the file to which the command output is directed. To discard the output, leave this property blank. The output is captured if an output file is specified. | No |
|
String | The script code to execute. | Yes |
Shell (with xargs)
Use this step to run a shell or batch script a number of times equal to a multi-valued input.
Name | Type | Description | Required |
|
Boolean | If this property is enabled, the command runs in the background while permitting the step to complete immediately. The output is not captured if it runs as a daemon. | No |
---|---|---|---|
|
String | The working directory to use when you execute this command. This directory is relative to the current working directory. | Yes |
|
String | The interpreter to use to evaluate the command. If this property is left blank the following platform-specific interpreters are used: Windows: .bat file interpreterVMS: .com file interpreterOther: The shell that is specified by the air/shell agent variable if it is present. Linux and UNIX systems might override this setting by having the command line start with a #! sequence. |
No |
|
Boolean | Run the script once for each argument in the xargs property. | No |
|
String | The path of the file to which the command output is directed. To discard the output, leave this property blank. The output is captured if an output file is specified. | No |
|
String | The shell script code to execute. | Yes |
|
String | The list input value to the script. Separate each value with the delimiter that is specified in the delimiter property. | Yes |
|
String | The delimiter that is used to separate the input values to the script. The default delimiter used is the comma (,). | Yes |