Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-54108

"JIRA: Progress issues by workflow action" fails when job is located within a folder

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: jira-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.143
      JIRA plugin 3.0.3
      Folders plugin 6.6
      JIRA 7.12.3
    • Similar Issues:

      Description

      A job which initiates a transition in Jira via the "Progress issues by workflow action" post-build step will succeed if the job is located in the Jenkins root.  If that exact same job, however, is relocated to a sub-folder (per the Folders plugin), it will always fail with:

      • a "[JIRA] Failed to connect to JIRA" error in the build log
      • a "JIRA session could not be established" error in the plugin's JiraSite class

      I've reduced the scenario to the most basic configuration I could and validated that the only variable between a successful run and a failed one is the location of the job relative to the Jenkins root.  It appears, just on cursory inspection of the plugin's code, that the Jira credentials are "missing" when the build is run from within a Jenkins folder.

      Attached is the affected job's configuration.

        Attachments

          Activity

          Hide
          aliud Anna Tyshkevich added a comment - - edited

          I have same problem. My Jenkins (ver. 2.138.3, LTS) env vars: HOME=/var/lib/jenkins, but JENKINS_HOME=/home/jenkins and installed jira-plugin (ver. 3.0.5) and folders plugin (ver. 6.6). When i run build with step "JIRA: Progress issues by workflow action", then i get error:

          [JIRA] Failed to connect to JIRA

          and log:

          ноя 09, 2018 2:17:10 PM WARNING hudson.plugins.jira.JiraSite progressMatchingIssues
          JIRA session could not be established

          When i validate settings Jira sites, then i get success result and log: 

          ноя 09, 2018 2:16:51 PM FINE hudson.plugins.jira.JiraSite
          creating JIRA Session: https://jira.mydomen.my/

          I think plugin can not get credentials in runtime build for this configuration server.

          I also have other Jenkins server (ver. 2.149, weekly release) with env var HOME equals JENKINS_HOME=/var/lib/jenkins and Jira-plugin (ver 3.0.3) and folder plugin (ver. 6.5.1) and for this configuration plugin is working successful.

          Show
          aliud Anna Tyshkevich added a comment - - edited I have same problem. My Jenkins (ver. 2.138.3, LTS) env vars: HOME=/var/lib/jenkins, but JENKINS_HOME=/home/jenkins and installed jira-plugin (ver. 3.0.5) and folders plugin (ver. 6.6). When i run build with step "JIRA: Progress issues by workflow action", then i get error: [JIRA] Failed to connect to JIRA and log: ноя 09, 2018 2:17:10 PM WARNING hudson.plugins.jira.JiraSite progressMatchingIssues JIRA session could not be established When i validate settings Jira sites, then i get success result and log:  ноя 09, 2018 2:16:51 PM FINE hudson.plugins.jira.JiraSite creating JIRA Session: https: //jira.mydomen.my/ I think plugin can not get credentials in runtime build for this configuration server. I also have other Jenkins server (ver. 2.149, weekly release) with env var HOME equals JENKINS_HOME=/var/lib/jenkins and Jira-plugin (ver 3.0.3) and folder plugin (ver. 6.5.1) and for this configuration plugin is working successful.
          Hide
          aeoris Diego Agulló added a comment -

          I haven't been able to reproduce this issue using the versions listed on the issue description.

          I tested this on the .war version on a fresh install (with a fresh Jira as well). Jason Weiss Anna Tyshkevich do you have any other detail about your setup to try and triage this issue?

          Show
          aeoris Diego Agulló added a comment - I haven't been able to reproduce this issue using the versions listed on the issue description. I tested this on the .war version on a fresh install (with a fresh Jira as well). Jason Weiss Anna Tyshkevich do you have any other detail about your setup to try and triage this issue?

            People

            • Assignee:
              Unassigned
              Reporter:
              jasonrweiss Jason Weiss
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: