Jenkins#
You can integrate Allegra with Jenkins Continuous Integration servers. This section describes how to do this.
Hudson and Jenkins are web-based tools used to regularly build (continuous integration, CI), test, and possibly install software as part of a software development process.
With a special Jenkins plugin, you can integrate Jenkins into Allegra. For Jenkins builds, you can see in Jenkins which Allegra items were involved with a particular build. In Allegra, you can see for each item, which Jenkins builds were involved and which files were affected. You get links in Jenkins and in Allegra that lead you to the respective other application.
To best integrate Jenkins with Allegra, it is recommended to operate both systems with a SSO system. Then go through the next steps.
Step 1: Integrate Jenkins as an application#
Install the Allegra “Portals” plugin in the directory ALLEGRA_HOME
and add the URL of your
Jenkins server to the file trackplus-plugins.xml
there. This allows you to switch directly from
the Allegra main menu between Allegra and Jenkins.
Step 2: Activate web service interface#
To activate the web service interface on your Allegra server, log in as system administrator. Switch to “Administration”. In the main menu select Server Management > Server Configuration > Tab “Miscellaneous”.
![../../_images/track-configure.png](../../_images/track-configure.png)
Step 3: Install Jenkins-Allegra-Plugin#
In order for Jenkins to interact with Allegra, you need to install a plugin for Jenkins. The plugin consists of a single file trackplus.hpi, which you need to copy into the plugin folder in your Jenkins installation as shown in the following figure. The Jenkins plugin folder is located under Servlet-Container-Path/webapps/Jenkins/WEB-INF, or wherever you had previously installed Jenkins. You need to restart Jenkins after copying the file.
![../../_images/hudson-manage.png](../../_images/hudson-manage.png)
![../../_images/hpi.png](../../_images/hpi.png)
Step 4: Connect Jenkins with Allegra#
You need to establish a connection between Allegra and Jenkins. For this purpose, set up in Jenkins one or more Allegra connections. To do this, select the link “Manage Jenkins” on the Jenkins main page.
![../../_images/hudson-manage.png](../../_images/hudson-manage.png)
On the “Manage Jenkins” page, select “Configure System”.
![../../_images/hudson-configure-track.png](../../_images/hudson-configure-track.png)
There is a section labeled “Allegra” Here you can enter the URL for your Allegra server as well as a username and password. This user is used when comments are added to Allegra items due to Jenkins build events.
In Jenkins, you can create multiple Allegra connectors, e.g. for different Allegra servers or different usernames.
Step 5:#
In the last step, you need to instruct Jenkins to use a specific Allegra connection for a specific job. Click on the link for this job from the Jenkins main page.
![../../_images/hudson-main.png](../../_images/hudson-main.png)
Click on the link “Configure” in the menu on the left side. Select the correct Allegra connection and save.
![../../_images/hudson-project-configure.png](../../_images/hudson-project-configure.png)
Step 6:#
The connection between Jenkins builds and Allegra items is created via Allegra item numbers found in Subversion commit comments, prefixed with a hash mark, such as “3009”.
When in the Jenkins build you click on the item number, the browser will take you to the Allegra item. The link in the Allegra item comment will take you to the associated Jenkins build.
![../../_images/hudson-track-comment.png](../../_images/hudson-track-comment.png)