...
Info |
---|
It is also possible to pass the same parameters as Java properties, like in the example below |
Code Block | ||
---|---|---|
| ||
java -Dsl.tokenFile=/path/to/sltoken.txt -Dsl.github.url=http://github.internal.net:443 -Dsl.github.owner=<owner name> -Dsl.github.repo=<repo name> -Dsl.github.appId=<app ID assigned to SL app> -Dsl.github.privateKeyFile=</path/to/private-key-file> -jar sl_task_runner.jar |
SeaLights GitHub App
...
Setup
In order to benefit of the Pull Request Analysis, you will need to create a new Appon your Github Enterprise instance: https://githubenterprise.yourorg.net/settings/apps/new
This page can also be navigated to by going to. This app will be used by the Sealights Task Runner to push the information to your GitHub Entreprise instance.
The app can be created via the relevant setting
Open your GitHub Settings > Developer Settings > Github Apps > New GitHub App
You can also access this setting page using a similar link to: https://githubenterprise.yourorg.net/settings/apps/new
The application will not require any access to your source code
...
.It only requires:
Read access to metadata
Read and write access to checks
Website & Website hook must be filled in
Specify the app ID based on the following, after the application has been created:
...
The following Private Key is to be downloaded and placed in the same folder as the TaskRunner agent:
...
Then, navigate to Install App, and choose an account to install the SeaLights app on:
...
Select “All Repositories” in the following screen
...
Configuring the pull request job
The pull request job needs to run the SeaLights build scan and test listener for the test stages you want the analysis on.
These results will be compared to the latest build you reported to SeaLights for the branch you are merging the Pull Request to.
Note |
---|
The difference between the pull request job and standard jobs is in how the session ID is created using Pull Request specific parameters. |
Generating a session ID
You create the Pull Request build session ID by using the SeaLights Java Build Scanner (See: Downloading the java agent files) with the prConfig option:
...
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 branches |
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 |
Pull Request parameters explanation as seen in GitHub.com
...