Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6869c86

Browse files
Adding Jira integration documentation (codefresh-io#208)
* Adding Jira integration documentation* Added example* Added what to read next and further links* Updating Jira documentation
1 parent5985e1d commit6869c86

File tree

9 files changed

+141
-16
lines changed

9 files changed

+141
-16
lines changed

‎_data/nav.yml‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,8 @@
302302
sub-pages:
303303
-title:Sending the notification to Slack
304304
url:"/sending-the-notification-to-slack"
305+
-title:Sending the notification to Jira
306+
url:"/sending-the-notification-to-jira"
305307
-title:"Security"
306308
url:"/examples"
307309
sub-pages:
@@ -429,8 +431,8 @@
429431
sub-pages:
430432
-title:Slack
431433
url:"/slack-integration"
432-
-title:Jira Integration
433-
url:"/jira-integration"
434+
-title:Jira
435+
url:"/jira-integration"
434436
-title:Codefresh API
435437
url:"/codefresh-api"
436438

‎_docs/integrations/jira-integration.md‎

Lines changed: 0 additions & 13 deletions
This file was deleted.

‎_docs/integrations/notifications.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ Codefresh enables you to send notifications about events.
1111
Codefresh supports the following notification channels:
1212
- Email
1313
-[Slack]({{ site.baseurl }}/docs/integrations/notifications/slack-integration/)
14+
-[Jira]({{ site.baseurl }}/docs/integrations/notifications/jira-integration/)
15+
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
title:"Jira Integration"
3+
description:""
4+
group:integrations
5+
redirect_from:
6+
-/docs/jira-integration-1/
7+
-/docs/integrations/jira-integration-1/
8+
toc:true
9+
---
10+
The Jira Issue Manager can either be accessed by adding the plugin to your codefresh.yml file or by adding your own jira-cli to your Dockerfile.
11+
12+
Prerequisites needed:
13+
*[Codefresh Account](https://codefresh.io/docs/docs/getting-started/create-a-codefresh-account/)
14+
*[Have a Jira Account](https://www.atlassian.com/software/jira)
15+
16+
##Plugin Marketplace
17+
18+
The plugin marketplace offers several freestyle steps that can be used in your Codefresh pipeline through plugins.
19+
20+
One of those plugins is the[Jira Issue Manager](https://codefresh.io/steps/step/jira-issue-manager). It can be used to:
21+
* Create a Jira issue
22+
* Comment on existing Jira issues
23+
* Change the status of an issue e.g. once the build is successful
24+
* Add a description to your issue
25+
* And more
26+
27+
More information on how to use the Jira Issue Manager in your Codefresh pipeline are provided[directly in the example]({{site.baseurl}}/docs/yaml-examples/examples/sending-the-notification-to-jira/).
28+
29+
30+
##Using your own jira-cli
31+
32+
Alternatively, you can use your own jira-cli by adding the following steps to your Dockerfile:
33+
34+
{% highlight yaml %}
35+
FROM python:2-alpine
36+
RUN apk add -U gcc musl-dev linux-headers openssl-dev libffi-dev && pip install jira-cli
37+
{% endhighlight %}
38+
39+
And then running the Dockerfile.
40+
41+
##What to read next
42+
43+
*[Example for sending notifications to Jira]({{site.baseurl}}/docs/yaml-examples/examples/sending-the-notification-to-jira/)
44+
* Have a look at other things that you can do with your Codefresh Pipeline in the[example section]({{site.baseurl}}/docs/yaml-examples/examples/)
45+
*[Create a pipeline]({{site.baseurl}}/docs/configure-ci-cd-pipeline/pipelines/)

‎_docs/whats-new/whats-new.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ toc: true
1111

1212
###February 2021
1313

14+
- Jira integration -[documentation]({{site.baseurl}}/docs/yaml-examples/examples/sending-the-notification-to-jira/)
1415
- SLA details -[documentation]({{site.baseurl}}/docs/terms-and-privacy-policy/sla/)
1516

16-
1717
###January 2021
1818

1919
- Using external secrets in Codefresh GUI -[documentation]({{site.baseurl}}/docs/configure-ci-cd-pipeline/secrets-store/#using-secrets-in-the-codefresh-gui)

‎_docs/yaml-examples/examples.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,4 @@ Codefresh can deploy to any platform such as VMs, FTP/SSH/S3 sites, app servers
111111
##Notifications
112112

113113
-[Sending the notification to Slack]({{site.baseurl}}/docs/yaml-examples/examples/sending-the-notification-to-slack)
114+
-[Sending the notification to Jira]({{site.baseurl}}/docs/yaml-examples/examples/sending-the-notification-to-jira)
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
title:"Sending the notification to Jira"
3+
description:""
4+
group:yaml-examples
5+
sub_group:examples
6+
toc:true
7+
---
8+
9+
The plugin marketplace offers several freestyle steps that can be used in your Codefresh pipeline through steps.
10+
11+
One of those steps is the[Jira Issue Manager](https://codefresh.io/steps/step/jira-issue-manager).
12+
13+
Prerequisites
14+
*[Have a Codefresh Pipeline]({{site.baseurl}}/docs/getting-started/create-a-basic-pipeline/) set-up
15+
*[Have a Jira Account](https://www.atlassian.com/software/jira)
16+
17+
This documentation is using the following[example](https://github.com/codefresh-contrib/jira-demo-app). You can either use the example provided to try out the Jira integration or follow along with your own application.
18+
19+
1. You need an issue in your Jira account that you want to link to your Codefresh pipeline. If you do not have one yet, please create an issue. (Note that the project type and who is creating the issue etc. does not matter.) Alternatively, you can also create an issue first with the Jira step. However, this is not explained in this example.
20+
21+
2. Next, add the following step to your Codefresh pipeline. In case that you are using the example, the[codefresh.yml](https://github.com/codefresh-contrib/jira-demo-app/blob/master/codefresh.yml) file is already added.
22+
23+
{% highlight yaml %}
24+
JiraCommentCreate:
25+
title: "Add Jira Comment"
26+
type: "codefreshdemo/jira-issue-manager"
27+
stage: "deploy"
28+
arguments:
29+
JIRA_BASE_URL: '${{JIRA_BASE_URL}}'
30+
JIRA_USERNAME: '${{JIRA_USERNAME}}'
31+
JIRA_API_KEY: '${{JIRA_API_KEY}}'
32+
JIRA_ISSUE_SOURCE_FIELD: '${{JIRA_ISSUE_SOURCE_FIELD}}'
33+
ACTION: "comment_create"
34+
COMMENT_BODY: "Build number ${{CF_BUILD_URL}} finished in Codefresh"
35+
{% endhighlight yaml %}
36+
37+
Let's look in detail at this step.
38+
- Everything up to the arguments is similar to other Codefresh steps.
39+
40+
These arguments are required to use the step:
41+
-`JIRA_BASE_URL`: This is the url of your organisation e.g. 'https://company-name.atlassian.net'
42+
-`JIRA_USERNAME`: This is usually the e-mail that you are logged in with at Jira
43+
-`JIRA_API_KEY`: Note that you will have to create this key. The official[Atlassian documentation](https://confluence.atlassian.com/cloud/api-tokens-938839638.html) details how it can be created.
44+
45+
Then we added these arguments for our specific step:
46+
-`JIRA_ISSUE_SOURCE_FIELD`: This is the tag that identifies your issue e.g. MKTG-102
47+
- Within the comment, we are using a[Codefresh native variable](https://codefresh.io/docs/docs/codefresh-yaml/variables/)`CF_BUILD_URL`, which will reference your pipeline build and will allow you to search for your pipeline.
48+
49+
All variables use the Codefresh specific variable notation ${% raw %}`{{MY_VARIABLE_EXAMPLE}}`{% endraw %}`.
50+
51+
Since it is a new stage in your Codefresh pipeline, you want to add it at the top to your stages, e.g.:
52+
53+
{% highlight yaml %}
54+
stages:
55+
- "clone"
56+
- "build"
57+
- "JiraCommentCreate"
58+
{% endhighlight yaml %}
59+
60+
Note that you can[provide the variables]({{site.baseurl}}/docs/configure-ci-cd-pipeline/shared-configuration/) needed for the Jira step directly in the shared configuration. The benefits are:
61+
* You do not have to post sensitive information, such as the API key, directly in the codefresh.yml.
62+
* If you use the same step across multiple pipelines, you don't have to copy-paste the same variables.
63+
64+
Once you run the pipeline, you should be able to see the following output or similar
65+
66+
{% include image.html
67+
lightbox="true"
68+
file="/images/integrations/jira/codefreshpipeline.png"
69+
url="/images/integrations/jira/codefreshpipeline.png"
70+
alt="Pipeline with Jira integration"
71+
max-width="80%"
72+
%}
73+
74+
And the comment, including the URL to the pipeline, should be added to your Jira issue:
75+
76+
{% include image.html
77+
lightbox="true"
78+
file="/images/integrations/jira/jira-comment.png"
79+
url="/images/integrations/jira/jira-comment.png"
80+
alt="Comment in Jira"
81+
max-width="80%"
82+
%}
83+
84+
##What to read next
85+
86+
*[Sending notifications to Slack]({{site.baseurl}}/docs/yaml-examples/examples/sending-the-notification-to-slack/)
87+
* Have a look at other things that you can do with your Codefresh Pipeline in the[example section]({{site.baseurl}}/docs/yaml-examples/examples/)
88+
*[Create a pipeline]({{site.baseurl}}/docs/configure-ci-cd-pipeline/pipelines/)
143 KB
Loading
41.8 KB
Loading

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp