Go back to the Installation documentation page
1️⃣ Install Jenkins 'Generic Webhook Trigger' plugin
From your Jenkins dashboard navigate to Manage Jenkins > Manage Plugins and select the Available tab. Use the search bar to find Generic Webhook Trigger (more info).
2️⃣ Connect the Webhook on your Git provider
Bitbucket Server
GitHub
Azure Repos
- Webhook URL:
JENKINS_URL/generic-webhook-trigger/invoke
- Set Up Azure Repos Jenkins Webhook
3️⃣ Optional - setting JobToken
- When using the plugin in several jobs, you will have the same URL trigger all jobs. If you want to trigger only a certain job you can use the JobToken in the URL to specify what job needs to be executed.
- Webhook URL with JobToken :
JENKINS_URL/generic-webhook-trigger/invoke?token=MyJobToken
- On some Git providers the JobToken is called Secret Token.
- Read more JobToken Docs
4️⃣ Set up credentials
- Set up the following credentials using Jenkins credentials functionality, as Secret Text:
- JF_URL - JFrog Platform URL (Example: "https://acme.jfrog.io")
- JF_ACCESS_TOKEN or JF_USER & JF_PASSWORD - JFrog Credentials
- JF_GIT_TOKEN - access token with read&write access to the Git repository
- How to use credentials with Jenkins
5️⃣ Prepare Jenkins Agent
- It is essential to have the appropriate package manager used by the scanned project installed on the Jenkins Agent. For instance, if the project uses an npm project, you need to have the npm client installed.
6️⃣ Scanning pull requests
Create a new pipeline job using this Jenkinsfile template.
Enable the ‘Generic Webhook Trigger’:
7️⃣ Scanning repository branches and fixing issues
Create a new pipeline job using this Jenkinsfile template.