Jenkins Integration (via MS Power Automate)
IntegrationIntroduction
You can integrate third-party systems with Service Manager in many ways. The method you select will depend on business requirements, architectural and security constraints as well as the characteristics specific to each third-party application or service.
This document describes an integration process that has already been implemented in a customer context.
To find out more about this integration (e.g. scripts to be used), please do not hesitate to contact your EasyVista contact, or your service provider and integrator.
Overview of the integration
Jenkins is an open source automation server. It helps automate the parts of software development related to building, testing, deploying and facilitating continuous integration and continuous delivery.
This integration enables you to start or stop a Jenkins job via Microsoft Power Automate when modifying the management method of a configuration item (CI) in the Service Catalog (Is a service option selected or unselected in the CI form).
Use case: Start a development platform or an Amazon platform when the Is a service option is selected in the CI form.
Preview of the tools used in this integration
IntegrationTool_MicrosoftAzureLogicApps
- Microsoft Azure Logic Apps: It enables you to create logic apps that run workflows and provide access to cloud data and services using ready-to-use connectors.
IntegrationTool_MicrosoftPowerAutomate
- Microsoft Power Automate (formerly known as Microsoft Flow): It enables you to automate recurrent tasks by building workflows using Web applications. The tool relies on standard connectors based on Microsoft Azure Logic Apps for interfacing with any endpoint via HTTP/HTTPS. It can also use the Microsoft Graph gateway via the Microsoft Graph API.
Integration Data Feed (direction) | Authentication Type | Integration Connector Options | ||
---|---|---|---|---|
|
|
|
Available versions | ||
---|---|---|
SaaS | On-premises | |
Service Manager | ![]() |
![]() |
Third-party product | ![]() |
N/A |
Jenkins - definitions
- Jenkins is an open-source automation tool for continuous integration.
- Each time software code is modified in the configuration management, Jenkins will perform a series of tasks to automatically recompile and test the software and send an alert to developers in the event of errors.
- A job is a set of tasks that Jenkins must perform in a sequence, e.g. extract the source code from the version control, compile the code, run individual tests, etc.
- A build represents the execution of all of the job's tasks.
Flows
Prerequisites
- You must have an abonnement Azure. If this is not the case, you can create a free account, or buy a pay-as-you-go subscription .
- You must have the relevant accounts and access rights to the services interfacing with Logic Apps.
- You must have an account authorizing access to your Service Manager platform with a profil and access rights to menu Asset & Configuration.
- You must add the fields specific to the Jenkins integration in the Create a new Configuration Item wizard -
See Procédure
- You must add the Start Jenkins Flow field to the CI form in Service Manager -
SeeProcédure
Caution
Caution_TitleActionInPowerAutomateFlow
- When you create workflow actions in Microsoft Power Automate, you must rename them as indicated in the procedure. This is because certain items of information in the name refer to the title of the action. If you do not respect the naming convention, the workflow will not be triggered correctly.
example The split(body('Analyze_Ticket_Info')'')?['AVAILABLE_FIELD_6'],',') instruction refers to the action called Analyze Ticket Info
Note: Spaces in the title will automatically be replaced by the underscore _.
Step-by-Step Integration Process
You configure the running of a Jenkins job in Service Manager, via Microsoft Power Automate in two phases:
- In Microsoft Azure Logic Apps, create an MS Power Automate flow
- In Service Manager, start or stop the Jenkins flow when modifying the management method of a configuration item (CI) in the Service Catalog
Microsoft Azure Logic Apps: Create the MS Power Automate flow
Description of the workflow
![]() |
Step 1: Create the step that will trigger the flow
==> The flow is triggered when the management method of a configuration item (CI) in the Service Catalog is modified, i.e. when the Service Manager ( Is a service option is selected or unselected in the CI form).
1. Log in to the Azure portal using your Azure account.
2. Create a new logic app. Open the Logic App Designer.
See Microsoft Azure Logic Apps integration for details on the procedure
3. Create a When a HTTP request is received step that will trigger the workflow.
![]() |
|
Step 2: Start the Jenkins flow
1. Create a Condition action to check for changes to the state of the Start Jenkins Flow checkbox in the CI form.
![]() |
|
2. Specify the actions to be performed when the Start Jenkins Flow checkbox is selected (value True - condition satisfied).
- Go to the If Yes branch.
- Select Add an action to add the following actions.
3. Create a HTTP action to start the Jenkins flow.
![]() |
Replace:
example https://Jenkins.net/view/Dev/job/Start_environment/ |
Step 3: Save the configuration of the workflow
1. Click Save at the bottom of the flow.
Service Manager: Start and stop the Jenkins flow
Step 1: Add the information specific to the Jenkins integration
1. Add the fields specific to the Jenkins integration in the Create a new Configuration Item wizard based on your requirements.
See the detailed procedure
2. Add the Start Jenkins Flow field to the CI form.
See the detailed procedure
Step 2: Start and stop the Jenkins flow from the CI form
1. Select the Start Jenkins Flow checkbox in the CI form to enable the Jenkins flow. (1)
2. Select the Is a service option in the CI form to monitor the CI in the Service Catalog. (2)
or
Unselect the Is a service option in the CI form if you do not want to monitor the CI in the Service Catalog.
3. Click Save.
The Jenkins flow will automatically start or stop.