Preparing Jenkins machine to use service hook in Azure DevOps
2 min readApr 11, 2021
- Open https://portal.azure.com/ and access your virtual machine with Jenkins.
- Click the “Networking” link in the Settings tab and click “Add inbound port rule” button
- Set an inbound rule for port 8080
- Navigate to your Jenkins page and go to User | Configure. Click on Add new token under API Token section and give some name and click Generate. Make a note of the Token generated. We would be using this Token as Jenkins password in Azure DevOps
- Go to your project settings. Select Pipelines and Service connections, click New service connection and choose Jenkins from the dropdown.
- Provide a connection name, Jenkins server URL in the format
http://[server IP address]:8080
and Jenkins user name with password (Use Jenkins User API Token as password). Select Verify Connection and validate the configuration. If it is successful, then select Ok. - The next step would be to configure the build pipeline
- Go to Pipelines | Pipelines, Click New Pipeline to create a new build definition.
- Select Use the classic editor to create a pipeline without a YAML.
- Select ProjectName project, repository and click Continue.