Rundeck not able to login to Jira with credentials provided

67 Views Asked by At

I have Rundeck community edition 4.1. I want to include jira issue ID in my job execution. For that I installed plugsins and the jira issue exists is hwoing up in workflow step. I configured project.plugin.Notification.JIRA.login=username project.plugin.Notification.JIRA.password=password project.plugin.Notification.JIRA.url=https://jiratestuser.atlassian.net in project.properties file. When I execute rundeck job, it is giving this error

Execution failed: 37321 in project Project-Name: [Workflow result: , step failures: {1=PluginFailed: login is required}, status: failed]

So I configured in framework.properties file with below settings

jira.url=https://instance.atlassian.net jira.login=user jira.auth_token=keys/jira/token

I restarted rundeck service and ran the job still it gave same error. Can someone suggest whether I am missing any?

1

There are 1 best solutions below

5
MegaDrive68k On BEST ANSWER

I reproduced your issue and that happens when the plugin can't find the credentials in the right place.

Jira Notification

Considering that you're using the OSS Jira Notification plugin. Follow these steps (the first step is optional if you don't have the plugin installed in your Rundeck instance):

  1. Install the plugin via the Plugin Manager (Gear Icon > Plugins > Find Plugins > Put "Jira" on the "Search for..." field, and install the Jira Notification Plugin).
  2. You do not need to generate a "project.properties" file because that configuration is now saved on the Rundeck backend. So, log in to Rundeck and navigate to your Project > Project Settings (left menu) > Edit Configuration > Edit Configuration File button (top right). This is the "new" project's properties. There is where you need to insert your Jira credentials, such as:
project.plugin.Notification.JIRA.login=user
project.plugin.Notification.JIRA.password=password
project.plugin.Notification.JIRA.url=http://jira_host:port
  1. Save the config and now run your job with THE Jira notification included in the notification tab. I used the following job definition example:
- defaultTab: nodes
  description: ''
  executionEnabled: true
  id: 37362a27-3e3e-4ea8-950e-ae64e2463172
  loglevel: INFO
  name: JiraNotificationJob
  nodeFilterEditable: false
  notification:
    onsuccess:
      plugin:
        configuration:
          issue key: RUN-23
        type: JIRA
  notifyAvgDurationThreshold: null
  plugins:
    ExecutionLifecycle: {}
  scheduleEnabled: true
  sequence:
    commands:
    - configuration:
        adhocRemoteString: echo "hi"
      nodeStep: true
      type: exec-command
    keepgoing: false
    strategy: node-first
  uuid: 37362a27-3e3e-4ea8-950e-ae64e2463172
  1. Check the Jira issue updated.

As you see and according to the documentation, you don't need that framework.properties credentials. It works with the project configuration parameters.

Jira Workflow Step

Considering that you're using the OSS Jira Workflow Step plugin plugin. Follow these steps (the first step is optional if you don't have the plugin installed in your Rundeck instance):

  1. Install the plugin via the Plugin Manager (Gear Icon > Plugins > Find Plugins > Put "Jira" on the "Search for..." field, and install the Jira Workflow Step Plugin).

  2. You do not need to generate a "project.properties" file because the configuration is now saved on the Rundeck backend (from Rundeck 3.1; you are using Rundeck 4.1). So, sign in to Rundeck and navigate to your Project > Project Settings (left menu) > Edit Configuration > Edit Configuration File button (up to right). That is the "new" project, properties. There is a place where you should enter your Jira credentials, like this:

project.plugin.WorkflowStep.JIRA-Issue-Exists.login=user
project.plugin.WorkflowStep.JIRA-Issue-Exists.password=password
project.plugin.WorkflowStep.JIRA-Issue-Exists.url=http://jira_host:port
  1. Save the config and now run your job with the Jira Workflow Step included in your workflow. I used the following job definition example:
- defaultTab: nodes
  description: ''
  executionEnabled: true
  id: 93990eea-df5f-446a-beb0-5e7bb4b0bfcf
  loglevel: INFO
  name: JiraIssueExists
  nodeFilterEditable: false
  plugins:
    ExecutionLifecycle: {}
  scheduleEnabled: true
  sequence:
    commands:
    - configuration:
        issue-key: RUN-23
      nodeStep: false
      type: JIRA-Issue-Exists
    keepgoing: false
    strategy: node-first
  uuid: 93990eea-df5f-446a-beb0-5e7bb4b0bfcf

  1. Check the Rundeck execution result.

Like the Notification plugin and according to the documentation, you don't need the framework.properties credentials. It works with the project configuration parameters.