Task Runner Agent - Command Reference
TaskRunner configuration may be provided with system properties or as a configuration file in JSON format.
When a ‘propertyA’ is provided as a command line parameter, it should have a prefix ‘sl.’.
When same ‘propertyA’ is provided in a configuration file, it should be without the prefix.
TaskRunner configuration contains channel-specific properties and common properties. Channel-specific properties have a channel prefix (github, bitbucketServer) following the ‘sl.’ prefix and before the property name.
GitHub Entreprise Server Integration
Starting the Task Runner Agent via Configuration File
java -Dsl.config.file=<arg> -jar ./sl_task_runner.jar
Starting the Task Runner Agent using CLI parameters
java {-Dsl.token=<arg> | -tokenfile=<arg>} -Dsl.github.url=<arg> -Dsl.github.appId=<appID> -Dsl.github.privateKeyFile=</path/to/private-key-file> {-Dsl.github.checkRunName=<arg>} {-Dsl.proxy=<arg>} -jar ./sl_task_runner.jar
Configuration parameters
Property | Default | Required | Description |
---|---|---|---|
sl.config.file | - | mandatory* | Path to JSON file containing the Task Runner configuration |
sl.token | - | mandatory ** | Access token generated from the SeaLights server (Agent token) |
sl.tokenFile | - | mandatory ** | Path to file containing the access token generated from the SeaLights server |
sl.buildSessionId | - | optional | The PR build-session-id to poll for. In this mode only this build will be updated in the SCM |
sl.buildSessionIdFile | - | optional | Path to file containing the build-session-id to poll for. In this mode only this build will be updated in the SCM |
sl.bsidPollingTimeoutMins | 6 | optional | Specifies the maximum amount of time to wait for the result for the specified build when working in the one time build session ID mode |
sl.github.enabled | false | optional | Flag allows support of github channel. |
sl.github.url | mandatory | Repository url | |
sl.github.appId | - | mandatory | Github Application ID assigned to Sealighs' app |
sl.github.privateKeyFile | - | mandatory | Github private key file |
sl.github.checkRunName | Sealights | optional | Check-run name (string) |
sl.taskPollingIntervalSecs | 60/10 | optional | Interval in second for getting SL tasks for execution |
sl.taskTimeoutSecs | 60 | optional | Time in second allocated for task execution. |
sl.logs.sendIntervalMin | 5 | optional | Interval in minutes for sending accumulated logs to the cloud. |
sl.proxy | - | optional | The proxy configuration for connection to Sealights. |
Bitbucket Entreprise Server Integration
Starting the Task Runner Agent via Configuration File
java -Dsl.config.file= <arg> -jar sl_task_runner.jar
Starting the Task Runner Agent using CLI parameters
java {-Dsl.token=<arg> | -tokenfile=<arg>} -Dsl.bitbucketServer.url=<url> -Dsl.bitbucketServer.token=<personal access token> {-Dsl.proxy=<arg>} -jar ./sl_task_runner.jar
Configuration parameters
Property | Default | Required | Description |
---|---|---|---|
sl.config.file | - | mandatory * | Path to JSON file containing the Task Runner configuration |
sl.token |
| mandatory ** | Access token generated from the SeaLights server (Agent token) |
sl.tokenFile |
| mandatory ** | Path to file containing the access token generated from the SeaLights server (Agent token) |
sl.buildSessionId | - | optional | The PR build-session-id to poll for. In this mode only this build will be updated in the SCM |
sl.buildSessionIdFile | - | optional | Path to file containing the build-session-id to poll for. In this mode only this build will be updated in the SCM |
sl.bsidPollingTimeoutMins | 6 | optional | Specifies the maximum amount of time to wait for the result for the specified build when working in the one time build session ID mode |
sl.bitbucketServer.enabled | false | optional | Flag allows support of bitbucket server channel; is set automatically true, if any other property is defined |
sl.bitbucketServer.url |
| mandatory | URL of the Bitbucket Server |
sl.bitbucketServer.token |
| mandatory | Personnal Access Token generated from your Bitbucket Server Instance |
sl.taskPollingIntervalSecs | 60/10 | optional | Interval in second for getting SL tasks for execution |
sl.taskTimeoutSecs | 60 | optional | Time in second allocated for task execution; if expires, task will be aborted and reported with timeout status |
sl.logs.sendIntervalMin | 5 | optional | Interval in minutes for sending accumulated logs to the cloud. If not defined, is forced to the default value on start |
sl.proxy | - | optional | The proxy configuration for connection to Sealights. |
Logging
In order to enable logs you can set the following parameters as environment variables or as -Dsl.* parameters
Parameter | Description |
---|---|
sl.log.level | Sets the log level to one of the following: "off", "error", "warn", "info", "debug" |
sl.log.toConsole | Set to true to enable log output to the console |
sl.log.toFile | Set to true to enable log output to a file |
sl.log.folder | Provide a folder to save the log files in |
sl.log.filename | Provide the name of the log file |
sl.log.count | Limit the number of log files to create. Default: 10 |
sl.log.limit | Limit the size of the log file. Default: 10*1024 KB |