Create an executable service
You can create an executable service to run scripts or applications stored in a Git repository. Executable services use a pre-defined executable object to determine how to run your script.
Prerequisites
- An executable object that defines the command to run your script
- A Git repository that contains your script or application
- Operator role permissions
- Repository authentication configured (if using a private repository)
Create a basic executable service
Use the iagctl create service executable command to create a new executable service.
Syntax:
Parameters:
<service-name>: A unique name for the executable service--executable-object: The name of the executable object that runs your script--repository: The name of the Git repository that contains your script--working-dir: The path within the repository where your script is located--filename: The name of the script file to execute
Example:
Create an executable service that runs a Bash script:
This example uses the executable object named my-obj (which would be configured to use /usr/bin/bash) to run the test.sh script.
Create an executable service with argument formatting
Add the --arg-format parameter to define how IAG passes arguments to your script at runtime.
Syntax:
Example:
Create an executable service with custom argument formatting: