CircleCI-Public / jira-connect-orb

Display the status of CircleCI workflows and deployments in Jira!
https://circleci.com/orbs/registry/orb/circleci/jira
MIT License
25 stars 27 forks source link

CircleCI JIRA job passes even when JIRA notification fails #83

Closed petergphillips closed 1 year ago

petergphillips commented 2 years ago

Orb version

1.3.1

What happened

The CircleCI job displayed the message

Error calling Jira, result: 403
{
  "message": "Permission denied"
}
CircleCI received exit code 0

but the job still passed.

Expected behaviour

I would have expected a client failure response (in this case forbidden) should have caused the notify job to fail as it has failed to send the information to JIRA.

Succeeding in this case makes the orb totally pointless as there is no guarantee that the information in JIRA is correct.

As a side issue the output

Results from Jira: 
Error calling Jira, result: 403

isn't correct. The job isn't calling JIRA - it is calling a CircleCI endpoint, namely

POST "https://circleci.com/api/v1.1/project/${VCS_TYPE}/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/jira/deployment" --data @/tmp/jira-status.json)

so I think the 403 is because our CIRCLE_TOKEN isn't correct for the project and has got nothing to do with JIRA at this stage.

The orb should fail if it receives anything other than a 200 response.

KyleTryon commented 1 year ago

Hello Friends 👋

The day has finally come 🎉 ! As we have alluded to in a few spots in this repository, we have been working on a new integration for Jira with CircleCI to replace this outdated orb which has historically been difficult for us to update. Today we are excited to announce Jira Integration V2 is finally LIVE!

New Docs: https://circleci.com/docs/jira-plugin/ Orb v2:

Atlassian Forge App: https://github.com/CircleCI-Public/circleci-for-jira

Key Features

What to know