The Jira pack provides the ability to create tickets, comment on tickets and to get info about tickets.
To build and run from the command line:
- Clone this repo
- Run
dep ensure
(must have dep installed) - Run
go build
- Run
FLYTE_API_URL=http://.../ JIRA_HOST=https://... JIRA_USER=... JIRA_PASSWORD=... ./flye-jira
- Fill in this command with the relevant API url, jira host, jira user and jira password environment variables
To build and run from docker
- Run
docker build -t flye-jira .
- Run
docker run -e FLYTE_API_URL=http://.../ -e JIRA_HOST=https://... -e JIRA_USER=... -e JIRA_PASSWORD=... flye-jira
- All of these environment variables need to be set
This pack provides three commands: CommentTicket
, TicketInfo
and CreateTicket
.
This command returns information about a specific ticket.
This commands input is the id of the desired ticket:
"input" : "TEST-123",
This command can either return an Info
event or an InfoFailure
event.
This is the success event, it contains the Id, Summary, Status, Description and Assignee. It returns them in the form:
"payload": {
"id": "TEST-123",
"summary": "Fix client race condition",
"status": "In Progress",
"description": "The client experiences.....",
"assignee": "jsmith",
}
This contains the id of the ticket and the error.
"payload": {
"id" : "TEST-123",
"error": "Could not get info on TEST-123: status code 400",
}
This command creates a jira ticket.
This commands input is the project the ticket should be created under, the issue type and the title.
"input": {
"project": "TEST",
"issue_type": "Story",
"title": "Fix csetcd bug"
}
This command can return either a CreateTicket
event or a CreateTicketFailure
event.
This is the success event, it contains the id of the ticket and the url of the ticket along with the input(project, issue_type & title) It returns them in the form:
"payload": {
"id": "TEST-123",
"url": "https://localhost:8100/browse/TEST-123",
"project": "TEST",
"issue_type": "Story",
"title": "Fix csetcd bug"
}
This contains the error if the ticket cannot be created along with the input (project, issue_type & title):
"payload": {
"error": "Cannot create ticket: Fix csetcd bug: status code 400",
"project": "TEST",
"issue_type": "Story",
"title": "Fix csetcd bug"
}
This command comments on an issue.
This commands input is the id of the ticket and the comment to be added.
"input": {
"id": "TEST-123",
"comment": "Added to backlog"
}
This command can return either a Comment
event or a CommentFailure
event.
This is the success event, it contains the id of the ticket, the comment and the status. Status is the status code returned when a comment is left successfully.
"payload": {
"id": "TEST-123",
"comment": "Added to backlog"
}
This returns the error if a ticket cannot be commented on successfully. It contains, the ticket id, the comment and the error:
"payload": {
"id": "TEST-123",
"comment": "Added to backlog",
"error": "Could not comment on ticket: status code 400"
}