Skip to content

Commit

Permalink
Merge pull request #5 from Logitech/adoroshenko/jitic
Browse files Browse the repository at this point in the history
added jitic github action
  • Loading branch information
adoroshenko-logitech authored Apr 23, 2020
2 parents 26f0cc0 + 0f07120 commit 60bf1bc
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
6 changes: 6 additions & 0 deletions actions/jitic/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM golang:latest
ARG jitic_version=v1.1.1
ADD docker-entrypoint.sh /docker-entrypoint.sh
RUN go get github.com/andygrunwald/jitic && \
go build github.com/andygrunwald/jitic
ENTRYPOINT ["/docker-entrypoint.sh"]
29 changes: 29 additions & 0 deletions actions/jitic/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: 'jitic - JIRA Ticket Checker'
description: 'Checks the existence of one or more issues in the JIRA issue tracker. If the issue exists we will shutdown with exit code 0. Otherwise with 1.'
inputs:
url:
description: 'JIRA instance URL (format: scheme://[username[:password]@]host[:port]/).'
required: false
default: https://jira.logitech.com/
issues:
description: Message to retrieve the issues from.
required: true
user:
description: JIRA Username.
required: true
pass:
description: JIRA Password.
required: true
runs:
using: 'docker'
image: 'Dockerfile'
args:
- jitic
- -url
- '${{ inputs.url }}'
- -user
- '${{ inputs.user }}'
- -pass
- '${{ inputs.pass }}'
- -issues
- '${{ inputs.issues }}'
11 changes: 11 additions & 0 deletions actions/jitic/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

if [ "$1" = 'jitic' ]; then
shift
/go/jitic "$@"
exit_code=$?
[ $exit_code -eq 1 ] && echo "Jira issue does not exists"
exit $exit_code
else
exec "$@"
fi

0 comments on commit 60bf1bc

Please sign in to comment.