...
Here is a table summarizing the most common variables in use, details below in the relevant SCM section
Sealights PR Parameter | Jenkins GitHub Pull Request Builder variables | BitBucket env. variables | GitLab env. variables | Generic Git variables |
---|---|---|---|---|
pullRequestNumber |
|
|
|
|
latestCommit |
|
|
|
|
repoUrl |
|
|
|
|
targetBranch |
|
|
|
|
Note |
---|
For latestCommit parameter, we’re highlighting the short version in the screenshots below but the long/entire SHA identifier needs to be used. |
...
If you’re using the GitHub Pull Request Builder you can use the following mapping to environment variables provided by the plugin
Sealights PR Parameter | GitHub Pull Request Builder variables | Comment |
pullRequestNumber |
| |
latestCommit |
| |
repoUrl |
| Something similar to: https://github.mycompany.com/myappjava/ if the pull request URL is |
targetBranch |
| This is the branch name itself and might need to have a prefix added (Like: "origin/") to match the branch that was provided to SeaLights when scanning the merged branch |
GitLab
Please notice GitLab refers to this capability as Merge Request (MR) and not as Pull Request (See GitLab documentation for more details).
...
If you’re using the GitLab plugin for Jenkins you can use the following mapping to environment variables provided by the plugin
Sealights PR Parameter | GitLab plugin variables | Comment |
pullRequestNumber |
| |
latestCommit |
| |
repoUrl |
| |
targetBranch |
| This is the branch name itself and might need to have a prefix added (Like: "origin/") to match the branch that was provided to SeaLights when scanning the target branch |
Info |
---|
More details about available variables from this plugin may be found in the official documentation: https://github.com/jenkinsci/gitlab-plugin#defined-variables |
...
Bitbucket provides a set of default variables that are available for builds, and can be used in scripts. These variables are detailed in the official Bitbucket documentation and can be used like below
Sealights PR Parameter | BitBucket Env. Variable | Comment |
---|---|---|
pullRequestNumber |
| |
latestCommit |
| |
repoUrl |
| In some configurations, you may need to prepend the base URL of your repository, like "https://bitbucket.mycompany.int/$BITBUCKET_REPO_SLUG" |
targetBranch |
| This is the branch name itself and might need to have a prefix added (Like: "origin/") to match the branch that was provided to SeaLights when scanning the merged branch |
Using Webhook to Jenkins for Bitbucket plugin (sending URL parameters to Jenkins)
Pull Request-related variables (e.g. Pull Request number) can be passed from Bitbucket to a Jenkins job via the Webhook to Jenkins for Bitbucket plugin using URL parameters to be defined in the plugin settings.
...
Info |
---|
Documentation for the above plugin settings is available here https://mohamicorp.atlassian.net/wiki/spaces/DOC/pages/210305025/Sending+URL+Parameters+to+Jenkins#Available-Parameters |
Bamboo
Sealights PR Parameter | Bamboo Build env. variables | Comment |
pullRequestNumber | ||
latestCommit |
| |
repoUrl |
| |
targetBranch |
| The base reference name of the webhook event that triggered the build. It is the branch reference for pull requests (i.e. target branch). |
Info |
---|
More details for Bamboo CI may be found in the official documentation: https://confluence.atlassian.com/bamboo/bamboo-variables-289277087.html |
Azure DevOps (formerly Team Foundation Server)
Sealights provides support only for ADO or TFS “Git-Based“ repositories: TfsGit
, Git,
or GitHub
. Pull Request integration won’t work with TfsVersionControl
or Svn
repository types.
Sealights PR Parameter | env. variables | Comment |
pullRequestNumber |
| |
latestCommit |
| |
repoUrl |
| |
targetBranch |
|
Info |
---|
More details for ADO/TFS variables may be found in the official documentation: https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables |
AWS CodeBuild
Sealights PR Parameter | AWS Code Build env. variables | Comment |
pullRequestNumber |
| For builds triggered by a pull request, its format is |
latestCommit |
| |
repoUrl |
| |
targetBranch |
| The base reference name of the webhook event that triggered the build. It is the branch reference for pull requests (i.e. target branch). |
Info |
---|
More details for AWS CodeBuild may be found in the official documentation: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-env-vars.html |
...
Page Properties | ||
---|---|---|
| ||
|