This page summarizes the agents commands for genrating a pull request specific build session ID and configuration, for the following technologies:
Table of Contents | ||
---|---|---|
|
Java Agent - CLI
Noteinfo |
---|
|
...
Parameter | Description |
---|---|
token | Access token generated from the SeaLights server |
tokenfile | Path to file containing the access token generated from the SeaLights server |
appname | The name of the app the Pull Request is being merged to (as provided to SeaLights) |
targetBranch | The name of the branch the Pull Request is being merged to (as provided to SeaLights) |
latestCommit | The latest commit SHA of the Pull Request branch |
pullRequestNumber | The Pull Request number that is being evaluated |
repoUrl | The repository URL of the Pull Request and merged branchs |
pi, packagesincluded | Comma-separated list of packages to include in scan Supports wildcards (* = any string, ? = any character). For example: 'com.example.* ,io.*.demo, com.?ello.world' |
pe,packagesexcluded | Comma-separated list of packages to exclude from scan Supports wildcards (* = any string, ? = any character). For example: 'com.example.* ,io.*.demo, com.?ello.world' |
proxy | Address of proxy to run connection through |
...
Note |
---|
The packages included and excluded should be exactly the same as what was defined to SeaLights for the merged branch so that the compared results will be the same |
Node.js Agent - CLI
Noteinfo |
---|
|
...
Parameter | Description |
---|---|
token | Access token generated from the Sealights server |
tokenfile | Path to file containing access token generated from the SeaLights server |
appname | The name of the app the Pull Request is being merged to (as provided to SeaLights) |
pullRequestNumber | The Pull Request number that is being evaluated |
targetBranch | The name of the branch the Pull Request is being merged to (as provided to SeaLights) |
latestCommit | The latest commit SHA of the Pull Request branch |
repositoryUrl | The repository URL of the Pull Request and merged branchs |
proxy | Address of proxy to run connection through |
failbuild | Exit with an error code if an error is encountered (Default: false) |
Logging
In order to enable logs you can set the NODE_DEBUG environment variable to one of the following:
...
sl
...
sl-file
...
Furthermore, you can set the level of logging by using the SL_LOG_LEVEL environment variable with one of the following options error, warning, info or debug
...
...
export NODE_DEBUG=sl
export SL_LOG_LEVEL=debug
Jenkins plugin
You can refer to the default configuration page for Generating a Build Session ID using the Jenkins Plugin in regards to installation and other details.
...
Parameter | Description |
---|---|
App Name | The name of the app the Pull Request is being merged to (as provided to SeaLights) |
Latest Commit | The latest commit SHA of the Pull Request branch |
Repository URL | The repository URL of the Pull Request and merged branchs |
Target Branch | The name of the branch the Pull Request is being merged to (as provided to SeaLights) |
Pull Request Number | The Pull Request number that is being evaluated |
Additional Arguments | Section to provide additional parameters if needed usually to override the global parameters. See the field help () in Jenkins for more details |
Logging
Java
In order to enable logs you can set the following parameters as environment variables or when using as javaagent add them 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 |
Node.js
In order to enable logs you can set the NODE_DEBUG environment variable to one of the following:
Value | Description |
---|---|
sl | Display log output to the console |
sl-file | Export the log information to a log file named 'sl.node.log' |
Furthermore, you can set the level of logging by using the SL_LOG_LEVEL environment variable with one of the following options error, warning, info or debug
Code Block | ||||
---|---|---|---|---|
| ||||
export NODE_DEBUG=sl
export SL_LOG_LEVEL=debug |