The new Jira Cloud Publisher not sending build status

I have been trying to set-up the Jira build status cloud integration. I am trying to let it send to the https://*.jira.com API. When starting a build it doesn't attempt to send anything to JIRA. I looked at logs and tried setting debugging for logs. But when I GREP logs for JIRA I can't find any besides that it my oauth credentials are saved.

  • I tried checking the OAuth permissions if they are correct.
  • I created new credentials and tried again.
  • I looked at a bunch of tabs trying to find out if I am missing some configuration that doesn't trigger a status change.
  • I have set-up another build-feature that sends info to bitbucket, that one is working just fine.
  • Looked through the documentation and issue trackets
  • I mention the jira key in a branch: feature/KEY-123 and also tried mentioning the jira key in a commit message (like described in documentation)

I am kind of lost, I really want to have this feature implemented because it is a great addition.

Here is a screenshot of my OAuth credentials:

A screenshot of my cloud integration at build features:

 

Interesting note:
I noticed that there is an attempt to send the status to JIRA for my nightly builds on master only. That one gives me a 401 error:


WARN - a.cloud.JiraCloudEventListener - Jira Cloud publisher (https://xxx.jira.com) has failed to send status of build number: 637. HTTP response content: {"error":"access_denied","error_description":"Unauthorized"}, response code: 401. at jetbrains.buildServer.publisher.jira.cloud.JiraCloudEventListener.getAccessToken(JiraCloudEventListener.java:161)

For my own triggered builds I don't see any authentication attempts.

4
6 comments
Avatar
Permanently deleted user

I'm having the same issue, but it's a bit weird. We have 3 build configurations which are all based on the same template. I enabled the Jira Cloud integration on the template and 2 of the 3 builds are sending the build status to Jira just fine, but the 3rd configuration just doesn't send the status to Jira and I have no clue as to why. I have compared all settings between the builds but I haven't found any differences.

I also checked the logs and I also can't find any errors in the logs related to the Jira Cloud integration, it's just not triggered. I also tried to define the Jira Cloud integration in the build configuration which isn't working, but it just won't send the status. 

0

Same here Teamcity (build 99711). 

jetbrains.buildServer.publisher.http.ResponseStatusException: Unauthorized, response code: 401.
  at jetbrains.buildServer.publisher.http.HttpHelper.call(HttpHelper.java:144)
  at jetbrains.buildServer.publisher.http.HttpHelper.lambda$post$0(HttpHelper.java:37)
  at jetbrains.buildServer.serverSide.impl.BaseAccessChecker.runWithDisabledChecks(BaseAccessChecker.java:31)
  at jetbrains.buildServer.serverSide.impl.SecondaryNodeSecurityManager.executeSafe(SecondaryNodeSecurityManager.java:27)
  at jetbrains.buildServer.serverSide.impl.SecondaryNodeSecurityManager.runSafeNetworkOperation(SecondaryNodeSecurityManager.java:45)
  at jetbrains.buildServer.publisher.http.HttpHelper.post(HttpHelper.java:36)
  at jetbrains.buildServer.publisher.http.HttpHelper.lambda$post$1(HttpHelper.java:51)
  at jetbrains.buildServer.serverSide.impl.BaseAccessChecker.runWithDisabledChecks(BaseAccessChecker.java:31)
  at jetbrains.buildServer.serverSide.impl.SecondaryNodeSecurityManager.executeSafe(SecondaryNodeSecurityManager.java:27)
  at jetbrains.buildServer.serverSide.impl.SecondaryNodeSecurityManager.runSafeNetworkOperation(SecondaryNodeSecurityManager.java:45)
  at jetbrains.buildServer.publisher.http.HttpHelper.post(HttpHelper.java:50)
  at jetbrains.buildServer.publisher.jira.cloud.JiraCloudEventListener.send(JiraCloudEventListener.java:207)
  at jetbrains.buildServer.publisher.jira.cloud.JiraCloudEventListener.sendBuildInfo(JiraCloudEventListener.java:135)
  at jetbrains.buildServer.publisher.jira.cloud.JiraCloudEventListener.buildFinished(JiraCloudEventListener.java:77)
  at jetbrains.buildServer.publisher.BuildFeatureEventListener.handleSpecificEvent(BuildFeatureEventListener.java:70)
  at jetbrains.buildServer.publisher.BuildFeatureEventListener.handle(BuildFeatureEventListener.java:48)
  at jetbrains.buildServer.webhook.async.AsyncEventHandlingTask.run(AsyncEventHandlingTask.java:24)
  at jetbrains.buildServer.webhook.async.OrderedExecutor$OrderedTask.run(OrderedExecutor.java:99)
  at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
  at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
  at java.base/java.lang.Thread.run(Thread.java:829)
0

Same issue for me, trying to integrate Teamcity with Jira Cloud, and getting the error : 

Jira Cloud publisher (https://xxxxxx.atlassian.net) has failed to send status of build number: 375. Unauthorized, response code: 401.

 

Double checked the ClientID and Client Secret, did anyone managed to get it working ? 

 

 

0
Avatar
Permanently deleted user

Yes, I got this working again. It was a bug in TeamCity: Jira Cloud OAuth 401 : TW-75582 (jetbrains.com) You can find an updated plugin there which fixed the issue.

0

Updated to Teamcity 2022.04 (build 108502) - now it all works well :+1

0

Please sign in to leave a comment.