As IT environments grow larger and more complex there’s a need to integrate disparate systems in order to deliver higher level IT outcomes. Morpheus recently released a new integration for the Jenkins CI server platform to help deliver end to end orchestration. The Jenkins Task plugin enables a new automation task type in Morpheus for triggering the build of Jenkins CI jobs. The task could be used to trigger Jenkins jobs for performing tasks such as deploying software onto provisioned infrastructure, validating the configuration of the system, and more.
In this blog post you’ll learn how to create a Jenkins automation task using the Jenkins plugin.
The Jenkins Task Plugin is downloaded from the Morpheus Exchange where Morpheus curated plugins are hosted. Download the latest version of the plugin by clicking on the DOWNLOAD button to the right of the screen.
With the plugin jar file downloaded to the local filesystem, you are now ready to install the Jenkins plugin on your Morpheus appliance. Install the plugin by uploading the plugin through the Morpheus UI from the Administration > Integrations > Plugins.
The automation task requires authentication credentials to enable Morpheus to trigger Jenkins build jobs. You need to generate an API token in Jenkins to enable Morpheus to trigger build jobs. The API token is associated with a Jenkins user or service account.
Once the plugin has been installed, there should be a new task type (Jenkins Trigger Build) that appears in the list of Morpheus automation task types. The task requires the API URL for the Jenkins server along with the authentication credentials, job name and any job parameters.
The example below triggers a job name examplejob and passes a parameter named name to the triggered job.
Once the Morpheus automation task is executed, the Jenkins job should start. The screenshot displayed below is the Jenkins output from the triggered job. The job simply printed “Hello Martez” with “Martez” being the name parameter that was passed from the automation task.
This new integration simplifies the process of trigger CI jobs. The automation task could be added to provisioning workflows as part of server builds or exposed in a self-service fashion via operational workflows.
Join the Morpheus community and engage other Morpheus community users to learn more about ways to use the platform. Also, downloading the Morpheus Community Edition lets you fully experience the Morpheus platform including nearly all features and capabilities! Register at Morpheus Hub and try it in your home lab or test environment today!