Create a Jira issue
Open an issue in a Jira Cloud project, for example when a deploy or a test run fails, and pass its key to later steps. Logs in with an email and API token from a Kubernetes Secret.
Install v1.0.0
Installs the template into your Argo namespace. The URL is pinned to this version.
kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/jira-create-issue/1.0.0/template.yaml
Or with the Argo CLI:
argo template create -n argo https://catalog.dagweave.com/api/v1/items/jira-create-issue/1.0.0/template.yaml
Facts
- Category
- Notifications
- Tags
- notifications python
- Entrypoint
create- Template SHA-256
61d336f0c142c8e7d97988dcb4313d9d639b1e86516660bc6937d04213fb1e1a- Source
- jira-create-issue at catalog commit 67458f7
- API
- item document, latest template.yaml
Images and provenance
Every image is pinned by digest, so a rebuilt tag can never change what this version runs.
| Repository | Tag | Digest |
|---|---|---|
cgr.dev/chainguard/python | latest-dev | sha256:8a5780972067cfba4592b10e786a889807ed876c1100f89410fd0ed4e398992c |
Parameters
| Name | Description | Default |
|---|---|---|
base-url required |
Address of your Jira Cloud site. Example https://acme.atlassian.net |
none |
project-key required |
Key of the project to create the issue in. Example OPS |
none |
summary required |
Issue title. Example Nightly backup failed |
none |
description |
Issue body as plain text. Leave blank for none. | empty |
issue-type |
Name of the issue type, as the project spells it. Example Bug |
Task |
jira-email-key |
Key in that Secret that holds the account email. | email |
jira-secret-name |
Name of the Kubernetes Secret that holds the Jira login. | jira-credentials |
jira-token-key |
Key in that Secret that holds the API token. | api-token |
labels |
Comma-separated labels. Example ci,backup |
empty |
WorkflowTemplate
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: jira-create-issue
labels:
dagweave.io/catalog-item: jira-create-issue
annotations:
dagweave.io/catalog-version: "1.0.0"
dagweave.io/catalog-category: "Notifications"
spec:
entrypoint: create
templates:
- name: create
inputs:
parameters:
- name: base-url
- name: project-key
- name: summary
- name: description
default: ""
- name: issue-type
default: "Task"
- name: labels
default: ""
- name: jira-secret-name
default: "jira-credentials"
- name: jira-email-key
default: "email"
- name: jira-token-key
default: "api-token"
outputs:
parameters:
# Key of the new issue, such as OPS-142.
- name: issue-key
valueFrom:
path: /tmp/issue-key
retryStrategy:
limit: "2"
retryPolicy: OnError
backoff:
duration: 10s
factor: "2"
maxDuration: 2m
container:
# cgr.dev/chainguard/python:latest-dev
image: cgr.dev/chainguard/python@sha256:8a5780972067cfba4592b10e786a889807ed876c1100f89410fd0ed4e398992c
command: [sh, -c]
args:
- |
set -eu
python - <<'PY'
import base64, json, os, sys, urllib.error, urllib.request
env = os.environ
fields = {
"project": {"key": env["PROJECT_KEY"]},
"summary": env["SUMMARY"],
"issuetype": {"name": env["ISSUE_TYPE"]},
}
if env["DESCRIPTION"]:
fields["description"] = env["DESCRIPTION"]
if env["LABELS"]:
fields["labels"] = [l.strip() for l in env["LABELS"].split(",") if l.strip()]
auth = base64.b64encode((env["JIRA_EMAIL"] + ":" + env["JIRA_API_TOKEN"]).encode()).decode()
req = urllib.request.Request(
env["BASE_URL"].rstrip("/") + "/rest/api/2/issue",
data=json.dumps({"fields": fields}).encode(),
headers={"Content-Type": "application/json", "Authorization": "Basic " + auth},
)
try:
with urllib.request.urlopen(req, timeout=30) as resp:
key = json.load(resp)["key"]
except urllib.error.HTTPError as err:
print(err.code, err.read().decode(), file=sys.stderr)
sys.exit(1)
open("/tmp/issue-key", "w").write(key)
print("created", key)
PY
env:
- name: BASE_URL
value: "{{inputs.parameters.base-url}}"
- name: PROJECT_KEY
value: "{{inputs.parameters.project-key}}"
- name: SUMMARY
value: "{{inputs.parameters.summary}}"
- name: DESCRIPTION
value: "{{inputs.parameters.description}}"
- name: ISSUE_TYPE
value: "{{inputs.parameters.issue-type}}"
- name: LABELS
value: "{{inputs.parameters.labels}}"
- name: JIRA_EMAIL
valueFrom:
secretKeyRef:
name: "{{inputs.parameters.jira-secret-name}}"
key: "{{inputs.parameters.jira-email-key}}"
- name: JIRA_API_TOKEN
valueFrom:
secretKeyRef:
name: "{{inputs.parameters.jira-secret-name}}"
key: "{{inputs.parameters.jira-token-key}}"
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
memory: 256Mi
Version history
Read from the item's changelog. Each version has its own JSON document; the pinned catalogue vendors the manifest of the latest one, so that is the version that installs.
-
1.0.0 latest 2026-10-18
Initial release.
kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/jira-create-issue/1.0.0/template.yamlargo template create -n argo https://catalog.dagweave.com/api/v1/items/jira-create-issue/1.0.0/template.yaml
Run it once
After installing, from the command line.
argo submit -n argo --from workflowtemplate/jira-create-issue \
-p base-url=https://acme.atlassian.net \
-p project-key=OPS \
-p summary='Nightly backup failed'
Workflow that references it
A Workflow with the required parameters filled from the examples.
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: jira-create-issue-
spec:
workflowTemplateRef:
name: jira-create-issue
arguments:
parameters:
- name: base-url
value: "https://acme.atlassian.net"
- name: project-key
value: "OPS"
- name: summary
value: "Nightly backup failed"
As a step of a larger workflow
steps:
- - name: jira-create-issue
templateRef:
name: jira-create-issue
template: create