我有 Rundeck 社区版 4.1。我想在我的作业执行中包含 jira 问题 ID。为此,我安装了插件,并且在工作流程步骤中存在 jira 问题。 我配置了
project.plugin.Notification.JIRA.login=username project.plugin.Notification.JIRA.password=password project.plugin.Notification.JIRA.url=https://jiratestuser.atlassian.net
在 project.properties
文件中。
当我执行 rundeck 作业时,出现此错误
Execution failed: 37321 in project Project-Name: [Workflow result: , step failures: {1=PluginFailed: login is required}, status: failed]
所以我在
framework.properties
文件中配置了以下设置
jira.url=https://instance.atlassian.net jira.login=user jira.auth_token=keys/jira/token
我重新启动了 rundeck 服务并运行了作业,但仍然出现相同的错误。 有人可以建议我是否遗漏了什么吗?
我重现您的问题,当插件无法在正确的位置找到凭据时就会发生这种情况。
考虑到您正在使用 OSS Jira Notification 插件。请按照以下步骤操作(如果您的 Rundeck 实例中没有安装该插件,则第一步是可选的):
project.plugin.Notification.JIRA.login=user
project.plugin.Notification.JIRA.password=password
project.plugin.Notification.JIRA.url=http://jira_host:port
- 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
如您所见,并且 根据文档,您不需要该
framework.properties
凭据。它与项目配置参数一起使用。
考虑到您正在使用 OSS Jira Workflow Step 插件 插件。请按照以下步骤操作(如果您的 Rundeck 实例中没有安装该插件,则第一步是可选的):
通过插件管理器安装插件(齿轮图标 > 插件 > 查找插件 > 将“Jira”放在“搜索...”字段中,然后安装 Jira Workflow Step 插件)。
您不需要生成“project.properties”文件,因为配置现在保存在 Rundeck 后端上(来自 Rundeck 3.1;您正在使用 Rundeck 4.1)。因此,登录到 Rundeck 并导航到“项目”>“项目设置”(左侧菜单)>“编辑配置”>“编辑配置文件”按钮(右上角)。这就是“新”项目,属性。您应该在一个地方输入您的 Jira 凭据,如下所示:
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
- 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
与通知插件一样,根据文档,您不需要在那里定义的
framework.properties
凭据。它与项目配置参数一起使用。