Preparing Jenkins machine to use service hook in Azure DevOps

Pravin Chaturvedi
2 min readApr 11, 2021
  1. Open https://portal.azure.com/ and access your virtual machine with Jenkins.
  2. Click the “Networking” link in the Settings tab and click “Add inbound port rule” button
  1. Set an inbound rule for port 8080
  1. 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
  1. Go to your project settings. Select Pipelines and Service connections, click New service connection and choose Jenkins from the dropdown.
  2. 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.
  3. The next step would be to configure the build pipeline
  4. Go to Pipelines | Pipelines, Click New Pipeline to create a new build definition.
  5. Select Use the classic editor to create a pipeline without a YAML.
  6. Select ProjectName project, repository and click Continue.

--

--