notifications-engine
notifications-engine copied to clipboard
Support for Atlassian's Jira
By @AlexDHoffer: https://github.com/argoproj-labs/argocd-notifications/issues/240
Some existing CD systems e.g. Jenkins can post build results to Jira issues as well as natively link commits in the build to those issues. See here for details: https://plugins.jenkins.io/jira/
This is a slick feature for a CD system and since Atlassian's Jira is in such widespread usage these days it would be cool to have something similar, where ArgoCD can key off a Jira issue tag in a commit message and post when a successful sync of that tag occurred back to the issue itself in Jira.
Has anybody worked around this? Thinking about a PostSync hook but this would require a dedicated pod to connect with the Jira API and a solution to get the git diff of the sync inside this pod. Or probably easier to listen for ArgoCD webhooks and do the work.
Hello Is there a status on this for bringing this in? Either that or possibly suggestions on how it could be incorporated?
Hi , any updates here?
Bump
Where would ArgoCD get the deployment information from? I'm looking at the deployment API and you need to pass an issue key to annotate the Jira issue with the deployment information.
It's not clear where this would come from. Potentially it could be build into the container as a label I guess?
Where would ArgoCD get the deployment information from? I'm looking at the deployment API and you need to pass an issue key to annotate the Jira issue with the deployment information.
It's not clear where this would come from. Potentially it could be build into the container as a label I guess?
We have that information attached to commits in the Git repo used to build the docker image Argo uses. But that repo is of course not connected to Argo in any way. If this is a common setup one idea would be to link a repo to read issue keys from commit messages
Did someone tried with that? : https://developer.atlassian.com/cloud/jira/software/rest/api-group-deployments/#api-rest-deployments-0-1-bulk-post
The jira/gha integration works by looking for issue keys in each commits deployed. I guess most of the time the deployment trigger comes from a PR, then we can fill the issue key array with all issue id found.
In case it helps others, I found this example in slack (I haven't tested if it works):
trigger.on-sync-succeeded: |
- description: Application syncing has succeeded
send:
- atlassian
when: app.status.operationState.phase in ['Succeeded']
template.atlassian: |
webhook:
atlassian:
method: POST
body: |
{"fields": {"project":{"key": "OP"},"summary": "please ignore {{.app.metadata.name}}","description": "argocd notification check this out {{.context.argocdUrl}}/applications/{{.app.metadata.name}} is in status {{.app.status.sync.status}}","issuetype": {"name": "Bug"},"components": [{"name" : "OES"}],"priority": { "name": "Low"}}}
service.webhook.atlassian: |
url: https://devops.atlassian.net/rest/api/2/issue/
basicAuth:
username: $jira-username
password: $jira-password
headers:
- name: Content-Type
value: application/json