Jira Service Management の管理者向けの利用開始ガイド
最初に、Jira Service Management の使用を開始する方法を確認します。
Changes to Free and Standard plans in Jira Service Management
As of October 16, 2024, change management for Jira Service Management will move from Standard to Premium plans. After this point, only Premium and Enterprise plans will have access to this feature.
Existing projects in Free and Standard plans will continue to support existing request types and issue types. Read more about the plan changes.
デプロイの追跡を使用すると、Jenkins パイプラインの任意の段階から変更リクエストを自動的に作成または更新できます。変更に関係者の承認が必要ない場合は、デプロイの追跡を使用します。関係者の承認が必要な場合は、デプロイのゲーティングを使用します。
デプロイの追跡を使用するには、次の手順を実行する必要があります。
Jenkins によるデプロイの追跡を使用するには、次の手順を実行します。
Jenkinsfile に移動します。
Jira に通知したいパイプラインの段階を見つけます。
sendJiraDeploymentInfo ブロックを段階ステップに追加して、Jira Service Management プロジェクトからコピーした Jira サイト名、環境 ID、環境タイプ、サービス IDを置換します。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
stage('Production') {
steps {
// Notify Jira a new deployment has started
jiraSendDeploymentInfo (
environmentId: 'us-prod-1',
environmentName: 'us-prod-1',
environmentType: 'production',
serviceIds: [
'<YOUR-SERVICE-ID>'
],
site: '<YOUR-SITE>.atlassian.net',
state: 'in_progress'
)
sh 'echo Deploy to Production starting...'
}
post {
always {
sh 'sleep 2'
sh 'echo Deployment to production finished'
}
success {
echo 'Deployment successful'
// Notify Jira if the deployment succeeded
jiraSendDeploymentInfo (
environmentId: 'us-prod-1',
environmentName: 'us-prod-1',
environmentType: 'production',
serviceIds: [
'<YOUR-SERVICE-ID>'
],
site: '<YOUR-SITE>.atlassian.net',
state: 'successful'
)
}
failure {
echo 'Deployment failed'
// Notify Jira if the deployment succeeded
jiraSendDeploymentInfo (
environmentId: 'us-prod-1',
environmentName: 'us-prod-1',
environmentType: 'production',
serviceIds: [
'<YOUR-SERVICE-ID>'
],
site: '<YOUR-SITE>.atlassian.net',
state: 'failed'
)
}
}
}
}
本番へのデプロイが開始されたら Jira に通知し、デプロイが終了したらもう一度通知します。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
pipeline {
agent any
stages {
stage('Build') {
steps {
sh 'echo Run build...'
}
}
stage('Test') {
steps {
sh 'echo Run tests...'
}
}
stage('Stage') {
steps {
sh 'echo Deploy to Staging...'
}
}
stage('Production') {
steps {
jiraSendDeploymentInfo (
environmentId: 'us-prod-1',
environmentName: 'us-prod-1',
environmentType: 'production',
serviceIds: [
'<YOUR-SERVICE-ID>'
],
site: '<YOUR-SITE>.atlassian.net',
state: 'in_progress'
)
sh 'echo Deploy to Production starting...'
}
post {
always {
sh 'sleep 2'
sh 'echo Deployment to production finished'
}
// Notify Jira based on deployment step result
success {
echo 'Deployment successful'
jiraSendDeploymentInfo (
environmentId: 'us-prod-1',
environmentName: 'us-prod-1',
environmentType: 'production',
serviceIds: [
'<YOUR-SERVICE-ID>'
],
site: '<YOUR-SITE>.atlassian.net',
state: 'successful'
)
}
failure {
echo 'Deployment failed'
jiraSendDeploymentInfo (
environmentId: 'us-prod-1',
environmentName: 'us-prod-1',
environmentType: 'production',
serviceIds: [
'<YOUR-SERVICE-ID>'
],
site: '<YOUR-SITE>.atlassian.net',
state: 'failed'
)
}
aborted {
echo 'Deployment cancelled'
jiraSendDeploymentInfo (
environmentId: 'us-prod-1',
environmentName: 'us-prod-1',
environmentType: 'production',
serviceIds: [
'<YOUR-SERVICE-ID>'
],
site: '<YOUR-SITE>.atlassian.net',
state: 'cancelled'
)
}
}
}
}
}
この内容はお役に立ちましたか?