Comment on page
The Run Command action block enables you to run a bash command on your client device.
The Run Command action block is useful for performing a variety of actions on the edge device. You may need the Run Command as a prerequisite to other action blocks, for example, to create folders on the devices before delivering files or to stop a service before delivering an update.
You might also use Run Command after other action blocks, for example, to run a script that was delivered in a previous action or to delete artifacts no longer used.
Although you could create a workflow with a single run command action block, you may use Run Command along with other action blocks. A customer example below illustrates how you might use the Run Command action block in an update workflow.
A pull command used in the Run Command action block cannot be reverted. Therefore, for pulling artifacts, we recommend using one of the pull action blocks such as Artifacts, Deploy Containers or Git Repository.
JFrog Connect account and at least one device registered.
- 1.Go to Updates in the left sidebar and click Create Update Flow.
- 2.Drag the Run Command action block and drop it in the workflow.
Click the action block to open and configure it.
- 1.Enter a name for the action block.
- 2.Enter the full bash command to run, including the values of any parameters required.
- 3.If you want to enter an expected exit code, click Advanced and enter the code.
- 5.Save your action block configuration.
You can run additional commands in the update workflow by adding more action blocks. You can also perform other actions in the same workflow just by adding and configuring the relevant action blocks.
If you plan to run several commands and need to specify a logic that is more complex, you might consider using the Run Script action block.