-
Notifications
You must be signed in to change notification settings - Fork 105
Add additional variables for Jenkins #2263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Don't forget to add
|
Name | Link |
---|---|
🔨 Latest commit | 2594b0e |
🔍 Latest deploy log | https://app.netlify.com/projects/semgrep-docs-prod/deploys/688ce7789523b5000842d4ce |
😎 Deploy Preview | https://deploy-preview-2263--semgrep-docs-prod.netlify.app |
📱 Preview on mobile |
To edit notification comments on pull requests, go to your Netlify project configuration.
I think we need to make this change in more places, and provide more context on when and how to set which variables, so I'd advise we don't accept this PR as written but do use it as a foundation to improve here. Thanks for your contributions, Oscar! |
@@ -65,7 +65,11 @@ pipeline { | |||
|
|||
:::note | |||
- Ensure that you have defined a `SEMGREP_APP_TOKEN` as a credential in Jenkins. | |||
- The variable SEMGREP_BASELINE_REF must be set to the main branch, in the example: `origin/master`. | |||
- The variable `SEMGREP_BASELINE_REF` must be set to the main branch, in the example: `origin/master`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The variable `SEMGREP_BASELINE_REF` must be set to the main branch, in the example: `origin/master`. | |
- Ensure that you have defined the variable `SEMGREP_BASELINE_REF` and set its value to the name of the main branch, such as `origin/master`. |
@@ -65,7 +65,11 @@ pipeline { | |||
|
|||
:::note | |||
- Ensure that you have defined a `SEMGREP_APP_TOKEN` as a credential in Jenkins. | |||
- The variable SEMGREP_BASELINE_REF must be set to the main branch, in the example: `origin/master`. | |||
- The variable `SEMGREP_BASELINE_REF` must be set to the main branch, in the example: `origin/master`. | |||
- You may need to set additional variables, depending on your environment configuration, such as; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- You may need to set additional variables, depending on your environment configuration, such as; | |
- You may need to set additional variables, depending on your environment configuration, such as: |
- The variable SEMGREP_BASELINE_REF must be set to the main branch, in the example: `origin/master`. | ||
- The variable `SEMGREP_BASELINE_REF` must be set to the main branch, in the example: `origin/master`. | ||
- You may need to set additional variables, depending on your environment configuration, such as; | ||
- `SEMGREP_REPO_NAME` -> An exact, case-sensitive match, to the repository name in Bitbucket |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `SEMGREP_REPO_NAME` -> An exact, case-sensitive match, to the repository name in Bitbucket | |
- `SEMGREP_REPO_NAME`: The Bitbucket repository name. This value is case sensitive. |
- The variable `SEMGREP_BASELINE_REF` must be set to the main branch, in the example: `origin/master`. | ||
- You may need to set additional variables, depending on your environment configuration, such as; | ||
- `SEMGREP_REPO_NAME` -> An exact, case-sensitive match, to the repository name in Bitbucket | ||
- `SEMGREP_REPO_URL` -> The web link to your repository (not the `.git` one) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `SEMGREP_REPO_URL` -> The web link to your repository (not the `.git` one) | |
- `SEMGREP_REPO_URL`: The web link to your repository (_not_ the `.git` URL). |
- You may need to set additional variables, depending on your environment configuration, such as; | ||
- `SEMGREP_REPO_NAME` -> An exact, case-sensitive match, to the repository name in Bitbucket | ||
- `SEMGREP_REPO_URL` -> The web link to your repository (not the `.git` one) | ||
- `SEMGREP_COMMIT` -> Specifically for PRs / diff scans, set this to the HEAD commit of the PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `SEMGREP_COMMIT` -> Specifically for PRs / diff scans, set this to the HEAD commit of the PR | |
- `SEMGREP_COMMIT`: The HEAD commit of the pull request. This variable is specifically used for diff-aware scans. |
As a result of the Linear FS-2764, we identified that customers using a Jenkins & Bitbucket combo meal may need to include these additional variables in their Jenkins Pipeline:
SEMGREP_REPO_NAME
SEMGREP_REPO_URL
SEMGREP_COMMIT
Specifically the commit one, without this PR comments were failing for the customer, due to a piece of logic we have in
renderer.py
that requires therepo_name
,pr_id
andcommit
to be able to post comments.The definitions I've added (and the location of the addition) might need tweaking, definitely not a final version here.