Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info
titleBitBucket Permissions

Keep in mind that the user from which the Personal access token is created must have read permission for the projects & repositories that are to be scanned

It is recommended to define a dedicated user from which the PR tasks will be executed


Info

The application will not modify anything in your repositories and projects as it only requires Read access.


SeaLights Task Runner App

...

Configuration

  • To report the Pull Request data to SeaLights, the Task Runner must be installed locally on the BitBucket server:

    1. Download the Task Runner from the following link: https://s3.amazonaws.com/sl-repo/sl_task_runner/sl_task_runner-2.1.1206.zip
    2. Prepare a configuration file to be used by the Task Runner in JSON format:
      • The Bitbucket server properties in this configuration file should be defined within  json property  "bitbucketServer" as follows: 

...

Once the configuration file is created, run the SeaLights task runner .jar file, specifying the configuration file created in the previous step:

Code Block
titleRunning the SeaLights Task Runner using a configuration file
java -Dsl.config.file=config/sl-taskrunner-cfg.json -jar sl_task_runner.jar


Alternatively, the same parameters can be specified directly as Java params:

Code Block
titleRunning the SeaLights Task Runner using Java parameters
java -Dsl.tokenFile=/path/to/sltoken.txt -Dsl.bitbucketServer.url=http://bitbucket.internal.net:7990 -Dsl.bitbucketServer.token=<personal access token> -jar sl_task_runner.jar

Common configuration properties for the task runner are as follows:

PropertyDefaultRequiredDescription

sl.enableUpgrade

true

optional

Flag allows automatic upgrade

sl.upgradeIntervalMins

1440

optional

Interval in minutes for auto-upgrade version checking

sl.taskPollingIntervalSecs

60

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.token

-

mandatory *

The sealights token

sl.tokenFile

-

mandatory *

The file with sealights token

sl.proxy-optionalThe proxy configuration for connection to Sealights.

Configuring the BitBucket Pull Request to compare data to SeaLights

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.

...