Problem
A synchronization security token was introduced in version 3.0.0 that is required when Jenkins makes REST calls to Jira. This token is generated and verified using a shared secret, that when a Jenkins site is added to Jira, will be shared with the Jenkins instance. This sharing only done when adding the Jenkins site or when the Jira add-on detects that the Jenkins add-on was installed after the Jenkins site was configured in Jira.
The Jira server add-on has a upgrade task to share this shared secret with the configured Jenkins sites, but this requires that the Jenkins add-on was already upgraded to at least version 3.0.0, if the Jenkins site was still running version 2.x of the add-on then the shared secret would not be saved by Jenkins.
Solution
There is a workaround that allows you to fix the problem by resetting the marker used by the Jira add-on to keep track if the Jenkins add-on is installed.
You will require database access in order to use this workaround!
To fix this you will need to manually change the data within the database.
- Make sure the linked Jenkins sites have the latest version of the add-on installed.
- Shutdown Jira.
- Connect to you Jira database using your favourite SQL tooling that is also appropriate for the database you have.
- Create a backup of your database!
- Once connected locate the table
AO_[HASH]_SITES
, there should only be a single table that matches this name. Next we reset the plugin installed marker for all sites, by executing the following query.
UPDATE AO_[HASH]_SITES SET JENKINS_PLUGIN_INSTALLED = NULL
- Start JIRA again.
- Navigate to the Jenkins Configuration page in Jira and trigger the synchronization of the all Jenkins sites by selecting the "Refresh Job List" action.
Related articles