...
Salesforce pipeline webhook setup contains 3 steps:
Table of Contents |
---|
1. Source Repository Configuration in Start of Workflow
In the salesforce pipeline Workflow, in Start of Workflow box, open up the Source Repository settings by selecting the gear icon(⚙︎). This will open Source Repository configurations.
To restrict a Pipeline based webhook trigger to a particular project and branch (master or non-master) select a source repository management Platform from the drop down. Choose from GitLab, GitHub or Bitbucket.
Upon selecting a Platform, corresponding accounts stored in the Tool Registry will be fetched and provided in the Account drop down. Select the account containing the project you wish to configure your webhook trigger events to.
Once the Account is selected, a list of Repositories and then Branches will be fetched and provided in drop downs. Select the Repository of your project and then select a Primary Branch. You have the option to select a Secondary Branch as well. Once the webhook is successfully registered in the following steps, this pipeline will be triggered any time a commit occurs on the selected Primary and Secondary Branch.
Enable the ‘Trigger Active’ toggle to proceed with webhook registration.
Complete webhook registration by copying the webhook URL shown. You will need to paste the copied webhook URL In your SCM account’s webhook settings.
Info |
---|
Note: The ‘Register Webhook’ button will not automatically register your webhook. Register it manually in the next steps. |
2. Webhook Registration - GitHub
Use the following instructions to manually configure your webhook in GitHub webhook settings.
...
4. Select ‘Add webhook’ button to save configuration.
3. Salesforce Package Job Creation step configuration
Salesforce pipeline webhook events require further configuration within the first pipeline step - the Salesforce Package Job Creation (Using Jenkins tool with a Salesforce package job). The Jenkins job must also contain an Account including the repository selected in the Source Repository step. The Repository and Branch selected in this step must match those selected in the Source Repository step or this step (pre-start action in pipeline activity logs) will fail and the modified branch will not contain the altered files.
...