From e7cad46d5cf94d89152cd4baf35dcb7be2b16ddf Mon Sep 17 00:00:00 2001 From: Anton Weiss Date: Tue, 5 Dec 2017 12:27:30 +0200 Subject: [PATCH] Add Jira plugin --- CATALOG.md | 2 +- stable/jira/NOTES.md | 1 + stable/jira/README.md | 33 +++++++++++++++++++++++++++++++++ stable/jira/plugin.yaml | 23 +++++++++++++++++++++++ 4 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 stable/jira/NOTES.md create mode 100644 stable/jira/README.md create mode 100644 stable/jira/plugin.yaml diff --git a/CATALOG.md b/CATALOG.md index 481ffb68..7f37fd02 100644 --- a/CATALOG.md +++ b/CATALOG.md @@ -12,7 +12,7 @@ | [GitHub PR](stable/github-pr/README.MD) | @nick-codefresh | Creates pull request to GitHub | `github` | | [Run Jenkins Jobs](https://github.com/codefresh-io/plugins/tree/master/stable/run-jenkins-job/README.md)|@vadim-codefresh, @jennyps | Run jenkins job from codefresh pipeline | `jenkins` `job` | | [Deploy to DCOS](stable/dcos-app-deploy/README.md) | @eugene-codefresh | Deploy application image to DC/OS cluster | `dcos` `deploy` `containers` | - +| [Interact with Jira](https://github.com/codefresh-io/plugins/tree/master/stable/jira/README.md)|@antweiss | Interact with Jira from codefresh pipelines | `jira` `workflow` ## Incubator Plugins | Plugin | Description | Tags | diff --git a/stable/jira/NOTES.md b/stable/jira/NOTES.md new file mode 100644 index 00000000..842a96bc --- /dev/null +++ b/stable/jira/NOTES.md @@ -0,0 +1 @@ +## Notes \ No newline at end of file diff --git a/stable/jira/README.md b/stable/jira/README.md new file mode 100644 index 00000000..99f95e1e --- /dev/null +++ b/stable/jira/README.md @@ -0,0 +1,33 @@ +# Codefresh Jira Plugin + +Use Codefresh Jira plugin to interact with a Jira instance. + +## Usage + + +```yaml +--- +version: '1.0' + +steps: + + ... + + UpdateJira: + title: Update Jira Issue + image: otomato/jira-cli:alpine + commands: + - yes n | jira-cli update ${JIRAID} --comment 'New docker image otomato/bringon:${{CF_SHORT_REVISION}}. Build log is here ${{CF_BUILD_URL}}' --jira-url ${JIRA_URL} -u ${JIRA_USR} -p ${JIRA_PWD} + when: + condition: + all: + JiraIdFound: 'match("${JIRAID}", "[A-Z]+-[0-9]+", true)' + ... + +``` + +## Environment Variables + +- **required** `JIRA_URL` - Url to Jira instance +- **required** `JIRA_USR` - Jira user +- **required** `JIRA_PWD` - - Jira password diff --git a/stable/jira/plugin.yaml b/stable/jira/plugin.yaml new file mode 100644 index 00000000..33f31aac --- /dev/null +++ b/stable/jira/plugin.yaml @@ -0,0 +1,23 @@ +image: otomato/jira-cli +tag: alpine +version: 0.1.0 +description: Update a Jira ticket +keywords: + - jira +home: https://github.com/codefreshdemo/jira-cli-docker +sources: + - https://github.com/codefreshdemo/jira-cli-docker +maintainers: # (optional) + - name: Ant Weiss + email: anton@otomato.link +icon: https://github.com/codefreshdemo/jira-cli-docker/blob/master/jira-logo.png +envs: + - name: JIRA_URL + type: required + description: Url to Jira instance + - name: JIRA_USR + type: required + description: Jira user + - name: JIRA_PWD + type: required + description: Jira password