Closed mbajur closed 1 year ago
@mbajur - you are correct, the tag based filter is the problem.
Here you can see the command fetch the current job info from circleci - this job info is then used in the following line with jq to parse the job details and search for the jira in the subject/body keys.
Workflows triggered via a 'tag' do not have these fields set
},
"status" : "success",
"committer_name" : null,
"retries" : [ 331 ],
"subject" : null,
"vcs_type" : "github",
"timedout" : false,
"dont_build" : null,
"lifecycle" : "finished",
"no_dependency_cache" : false,
"stop_time" : "2021-01-13T22:01:18.697Z",
"ssh_disabled" : true,
Does it mean using this orb is not possible with tag-based deploys?
@mbajur with the way it's currently built, it wouldn't work for tag-based filters, yes. I will discuss this with the team internally to see if we can get some time to enhance this.
For now (I know, not ideal), you could do your own tag checks in the job itself. Here's a pseudo config example:
deploy_production_notify:
jobs:
- deploy_production:
pre-steps:
# e.g. this step would fail if there's not a tag for the pushed sha and it doesn't meet a valid semver regex
- run: git fetch --tags && git describe --exact-match | sed -nre 's/^[^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p'
post-steps:
- jira/notify:
environment: production
environment_type: production
job_type: deployment
filters:
branches:
only: /master/
We're making some small changes in #61 which would allow for manual setting of the Jira tag, rather than scanning the commit message for it - there are some instructions in that PR on how to test it :) @mbajur
thank you @gmemstr ! I will test that soon
Is this codebase still maintained? I'd love to see this feature implemented
+1 would love to see this resolved
Is there any plan to fix this problem? Kind of important for our workflow
We have a very similar git workflow as described in the original post. We don't filter on tags, though. What we'd like is that all the commits from our develop branch that got merged into master are picked up and reported as being part of this deployment, which isn't the case. I suppose our problem is at least related?
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
Orb version
1.3.0
What happened
Hello!
I'm trying to use https://circleci.com/developer/orbs/orb/circleci/jira orb in one of my projects based on gitflow. So, basically, i have two main branches -
master
anddev
. All the ongoing work is merged intodev
and once the version/sprint is complete, i mergedev
intomaster
. Hotfixes goes straight tomaster
.Here is my circleci config file:
And the thing is - when i'm merging my PRs into
dev
branch, all works perfectly well and deployment statuses of tasks are being reported to Jira. On the other hand, when i merge intomaster
and do a deployment on there *(using tags v.)**, jira orb reports that it was not able to find any issue keys.jira/notify
ofdeploy_production
job output:jira/notify
ofdeploy_production_notify
workflow output:What's interesting is that merging
master
back todev
(obviously) triggers the deployment notification and jira deployment notification works in there properly! Which makes me think it's nothing strictly related to jira orb itself and that it has something to do with a fact that I'm using tags/releases.Thanks in advance for any clues.