Skip to content

Commit 4fa1f47

Browse files
author
Mayuko Sawai
committed
Add insights-snapshot-badge.adoc
1 parent ee1f751 commit 4fa1f47

File tree

2 files changed

+99
-40
lines changed

2 files changed

+99
-40
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
3+
version:
4+
- クラウド
5+
---
6+
= インサイト スナップショットバッジ
7+
:page-layout: classic-docs
8+
:page-liquid:
9+
:page-description: Generate a badge that displays Insights metrics for a project.
10+
:icons: font
11+
:toc: macro
12+
:toc-title:
13+
14+
== 概要
15+
16+
インサイト スナップショットバッジは、プロジェクトの README に埋め込まれている <<status-badge#,ステータスバッジ>> と同様に、プロジェクトのヘルスや使用状況のメトリクスを素早く確認することができます。
17+
18+
image::insights-snapshot-preview.png[Insights snapshot badge]
19+
20+
インサイト スナップショットバッジの最も一般的なユースケースは、プロジェクトの README のメインブランチでの、デプロイワークフローの <<insights#, インサイト>> メトリクスの表示です。 しかし、このバッジは、プロジェクト内のすべてのブランチのすべてのワークフローのインサイトメトリクスを表示するようにも設定できます。 そうすることにより、例えば、スケジュール化したワークフロー、ビルドターゲットが異なるワークフロー、テスト用に使われるワークフローの追加バッジを作成することができます。
21+
22+
インサイト スナップショットバッジは、一般的にプロジェクトの README に配置されますが、 Web ドキュメントのどこにでも埋め込むことができます。 現在このバッジは、インサイトダッシュボードから下記の 3 つのメトリクスを表示します。
23+
24+
* *Throughput*: 選択したワークフローの設定した時間枠における平均実行数
25+
* *Duration*: 任意のワークフローの選択した時間枠における 95 パーセンタイル実行時間。
26+
95 パーセンタイルにより、一時的な急増の可能性を考慮して最後の 5% を除いた、ビルド終了までの最長時間を確認できます。
27+
* *Success Rate*: 選択したワークフローの設定した時間枠における成功ビルドの割合
28+
29+
== インサイト スナップショットバッジの生成
30+
31+
インサイトスナップショットバッジのパブリックリポジトリ用のコードスニペットを生成するには、 https://app.circleci.com/[CircleCI Web アプリ]を開き、プロジェクトを選択します。 *Project Settings* を開き、*Insights Snapshot Badge* のページに移動します。
32+
33+
Insights Snapshot Badge のページでは、プロジェクトのメトリクスを表示するブランチ、ワークフロー、時間枠、そしてコードスニペットの形式を選択することができます。
34+
35+
以下の形式のコードを生成できます。
36+
37+
* 画像 URL
38+
* Markdown
39+
* Textile
40+
* Rdoc
41+
* AsciiDoc
42+
* reStructuredText
43+
* Pod
44+
45+
下記は、CircleCI ドキュメントのリポジトリ用に
46+
Markdown 形式で生成されたインサイト スナップショットバッジの例です。
47+
48+
[![CircleCI](https://dl.circleci.com/insights-snapshot/gh/circleci/circleci-docs/master/build-deploy/badge.svg?window=30d)](https://app.circleci.com/insights/github/circleci/circleci-docs?branches=master&workflows=build-deploy&reporting-window=last-30-days&insights-snapshot=true)
49+
50+
== プライベートリポジトリ用のバッジの作成
51+
52+
プライベートプロジェクトのインサイト スナップショットバッジを作成するには、“Status” のスコープを持つ API トークンを作成し、そのトークンを画像のソース URL に含める必要があります。 同じプロジェクトにステータスバッジを生成したことがある場合は、インサイト スナップショットバッジに同じ API トークンを再利用することができます。
53+
54+
Insights Snapshot Badge ページで *Add API Token* をクリックすると、直接 API トークンを追加することができます。 これにより、"Status" のスコープを持つ API トークンと "insights-snapshot" ラベルが作成されます。 (プロジェクトの *API Permissions* でも新しいトークンが表示されます)。 コードスニペットは、API の作成後に表示されます。
55+
56+
== 関連項目
57+
58+
* <<status-badges#,ステータスバッジ>>
59+
* <<insights-glossary#,インサイトメトリクスの用語集>>

jekyll/_cci2_ja/status-badges.md

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
---
22
layout: classic-docs
3-
title: ステータス バッジの追加
4-
description: CircleCI のステータス バッジを Web ページや Web ドキュメントに埋め込む方法
3+
title: ステータスバッジの追加
4+
description: CircleCI のステータスバッジを Web ページや Web ドキュメントに埋め込む方法
55
version:
6-
- Cloud
6+
- クラウド
77
- Server v3.x
88
- Server v2.x
99
---
1010

11-
プロジェクトのビルド ステータス (成功または失敗) を表示するバッジを README または他のドキュメントに作成する方法について説明します。
11+
プロジェクトのビルドステータス (成功または失敗) を表示するバッジを README または他のドキュメントに作成する方法について説明します。
1212

1313
## 概要
1414
{: #overview }
1515

16-
ステータス バッジは、一般にプロジェクトの README に埋め込まれていますが、どの Web ドキュメントにも配置できます。 CircleCI では、ステータス バッジの埋め込みコードを生成するツールが提供されています。 By default, a badge displays the status of a project's default branch, though you can also display the status of specific branches.
16+
ステータスバッジは、一般的にプロジェクトの README に埋め込まれていますが、どの Web ドキュメントにも配置することができます。 CircleCI では、ステータスバッジの埋め込みコードを生成するツールを提供しています。 デフォルトで、バッジにはプロジェクトのデフォルトブランチのステータスが表示されますが、特定のブランチを選択することも可能です。
1717

18-
A badge status allows teams to quickly see build statuses in their repo. Badges change appearance depending on their status (success, failure).
18+
バッジのステータスにより、リポジトリにおけるビルドステータスを素早く確認することができます。 バッジはステータス(成功または失敗)に応じて表示されます。
1919

2020
以下の形式のコードを生成できます。
2121
- 画像 URL
@@ -26,120 +26,120 @@ A badge status allows teams to quickly see build statuses in their repo. Badges
2626
- reStructuredText
2727
- pod
2828

29-
## Generating a status badge
29+
## ステータスバッジの生成
3030
{: #generating-a-status-badge }
3131

32-
To generate your own status badge, you will need to know, and substitute, the following variables in the code snippets below:
32+
独自のバッジを生成するには、下記のコードスニペットの変数について理解し、置き換える必要があります。
3333

34-
- `<PROJECT_NAME>` - Your project's name. Example: `circleci-docs`
35-
- `<ORG_NAME>` - The organization or user name the project in question belongs to
36-
- `<VCS>` - your VCS provider (`gh` for "github" and `bb` for BitBucket)
37-
- `<LINK>` - The link you want the status badge to go to when clicked (example: the pipeline overview page)
38-
- Optional: an API token (to create badges for private projects)
34+
- `<PROJECT_NAME>`: プロジェクト名( 例: `circleci-docs`
35+
- `<ORG_NAME>` : そのプロジェクトの組織名またはユーザー名
36+
- `<VCS>`: VCS プロバイダー ("github" `gh`、BitBucket は `bb` )
37+
- `<LINK>`: ステータスバッジをクリックしたら移動するリンク(パイプラインの概要のページなど)
38+
- オプション: API トークン(プライベートプロジェクト用のバッジの作成)
3939

40-
The following examples demonstrate how to generate a status badge for various template languages. Each example also provides a status badge code for a specific branch.
40+
下記は、様々なテンプレート言語でステータスバッジを生成する例です。 各例では特定のブランチ用のステータスバッジコードも示しています。
4141

4242
{:.tab.status.Markdown}
4343
```text
44-
# Template:
44+
# テンプレート:
4545
[![<ORG_NAME>](https://circleci.com/<VCS>/<ORG_NAME>/<PROJECT_NAME>.svg?style=svg)](<LINK>)
4646
47-
# Example:
47+
# :
4848
[![CircleCI](https://circleci.com/gh/circleci/circleci-docs.svg?style=svg)](https://circleci.com/gh/circleci/circleci-docs)
4949
50-
# Example for specific branch:
50+
# 特定のブランチ用の例:
5151
[![CircleCI](https://circleci.com/gh/circleci/circleci-docs/tree/teesloane-patch-5.svg?style=svg)](https://circleci.com/gh/circleci/circleci-docs/?branch=teesloane-patch-5)
5252
```
5353

5454
{:.tab.status.Textile}
5555
```text
56-
# Template:
56+
# テンプレート:
5757
!https://circleci.com/<VCS>/<ORG_NAME>/<PROJECT_NAME>.svg?style=svg!:<LINK>
5858
59-
# Example:
59+
# :
6060
!https://circleci.com/gh/circleci/circleci-docs.svg?style=svg!:https://circleci.com/gh/circleci/circleci-docs
6161
62-
# Example for specific branch:
62+
# 特定のブランチ用の例:
6363
!https://circleci.com/gh/circleci/circleci-docs/tree/teesloane-patch-5.svg?style=svg!:https://circleci.com/gh/circleci/circleci-docs/?branch=teesloane-patch-5
6464
```
6565

6666
{:.tab.status.Rdoc}
6767
```text
68-
# Template:
68+
# テンプレート:
6969
{<img src="https://circleci.com/<VCS>/<ORG_NAME>/<PROJECT_NAME>.svg?style=svg" alt="<ORG_NAME>" />}[https://circleci.com/gh/<ORG_NAME>/<PROJECT_NAME>]
7070
71-
# Example:
71+
# :
7272
{<img src="https://circleci.com/gh/circleci/circleci-docs.svg?style=svg" alt="CircleCI" />}[https://circleci.com/gh/circleci/circleci-docs]
7373
74-
# Example for specific branch:
74+
# 特定のブランチ用の例:
7575
{<img src="https://circleci.com/gh/circleci/circleci-docs/tree/teesloane-patch-5.svg?style=svg" alt="CircleCI" />}[https://circleci.com/gh/circleci/circleci-docs/?branch=teesloane-patch-5]
7676
```
7777

7878
{:.tab.status.Asciidoc}
7979
```text
80-
# Template:
80+
# テンプレート:
8181
image:https://circleci.com/<VCS>/<ORG_NAME>/<PROJECT_NAME>.svg?style=svg["<ORG_NAME>", link="https://circleci.com/<VCS>/<ORG_NAME>/<PROJECT_NAME>"]
8282
83-
# Example:
83+
# :
8484
image:https://circleci.com/gh/circleci/circleci-docs.svg?style=svg["CircleCI", link="https://circleci.com/gh/circleci/circleci-docs"]
8585
86-
# Example for specific branch:
86+
# 特定のブランチの例:
8787
image:https://circleci.com/gh/circleci/circleci-docs/tree/teesloane-patch-5.svg?style=svg["CircleCI", link="https://circleci.com/gh/circleci/circleci-docs/?branch=teesloane-patch-5"]
8888
```
8989

9090
{:.tab.status.reStructuredText}
9191
```text
92-
# Template:
92+
# テンプレート:
9393
.. image:: https://circleci.com/<VCS>/<ORG_NAME>/<PROJECT_NAME>.svg?style=svg
9494
:target: https://circleci.com/<VCS>/<ORG_NAME>/<PROJECT_NAME>
9595
96-
# Example:
96+
# :
9797
.. image:: https://circleci.com/gh/circleci/circleci-docs.svg?style=svg
9898
:target: https://circleci.com/gh/circleci/circleci-docs
9999
100-
# Example for specific branch:
100+
# 特定のブランチの例:
101101
.. image:: https://circleci.com/gh/circleci/circleci-docs/tree/teesloane-patch-5.svg?style=svg
102102
:target: https://circleci.com/gh/circleci/circleci-docs/?branch=teesloane-patch-5
103103
```
104104

105105
{:.tab.status.pod}
106106
```text
107-
# Template:
107+
# テンプレート:
108108
=for HTML <a href="https://circleci.com/<VCS>/<ORG_NAME>/<PROJECT_NAME>"><img src="https://circleci.com/<VCS>/<ORG_NAME>/<PROJECT_NAME>.svg?style=svg"></a>
109109
110-
# Example:
110+
# :
111111
=for HTML <a href="https://circleci.com/gh/circleci/circleci-docs"><img src="https://circleci.com/gh/circleci/circleci-docs.svg?style=svg"></a>
112112
113-
# Example for specific branch:
113+
# 特定のブランチの例:
114114
=for HTML <a href="https://circleci.com/gh/circleci/circleci-docs/?branch=teesloane-patch-5"><img src="https://circleci.com/gh/circleci/circleci-docs/tree/teesloane-patch-5.svg?style=svg"></a>
115115
116116
```
117117

118-
## Creating badges for private repositories
118+
## プライベートリポジトリ用のバッジの作成
119119
{: #creating-badges-for-private-repositories }
120120

121-
**NOTE:** To create a status badge for a private project you will need to create an **api token** _specifically scoped to "status"_ and include that token in the url string of your badge. Consider the following markdown image badge snippet against the original markdown example above; it has a URL parameter for a token added.
121+
**注: プライベートリポジトリ用のステータスバッジを作成するには、_ "status" のスコープを持つ </strong>**API トークン**_を作成する必要があります。 上記の Markdown 形式の例と比較して、下記の Markdown 形式のイメージバッジスニペットを考えてみましょう。この例では、トークンの URL パラメータが追加されています。</p>
122122

123123
```markdown
124124
[![CircleCI](https://circleci.com/<VCS>/<ORG_NAME>/<PROJECT_NAME>.svg?style=svg&circle-token=<YOUR_STATUS_API_TOKEN>)](<LINK>)
125125
```
126126

127-
To create a status API token, go to the [CircleCI web app](https://app.circleci.com/), navigate to a specific project, go to **Project Settings -> API Permissions**, and create a token scoped to `status`.
127+
ステータス API トークンを作成するには、[CircleCI Web アプリ](https://app.circleci.com/)を開き、目的のプロジェクトに行き、**Project Settings > API Permissions** に移動し、`status`のスコープを持つトークンを作成します。
128128

129-
## Different styles
129+
## その他のスタイル
130130
{: #different-styles }
131131

132-
デフォルトのステータス バッジでは物足りないという場合は[Shields スタイル](https://shields.io/)を使用できます。 Shield スタイルを使用するには、前述の手順で生成したリンクの `style=svg``style=shield` に置き換えます。
132+
デフォルトのステータスバッジでは物足りないという場合は[Shields スタイル](https://shields.io/)を使用できます。 Shield スタイルを使用するには、前述の手順で生成したリンクの `style=svg``style=shield` に置き換えます。
133133

134134
![svg</code>@@ version" />]({{site.baseurl}}/assets/img/docs/svg-passed.png)
135135

136136
![svg</code>@@ version" />]({{site.baseurl}}/assets/img/docs/svg-failed.png)
137137

138-
![Passing shield version]({{site.baseurl}}/assets/img/docs/shield-passing.png)
138+
![シールドバージョンのパス]({{site.baseurl}}/assets/img/docs/shield-passing.png)
139139

140-
![Failing shield version]({{site.baseurl}}/assets/img/docs/shield-failing.png)
140+
![シールドバージョンの失敗]({{site.baseurl}}/assets/img/docs/shield-failing.png)
141141

142142
## 設定ファイルの詳細
143143
{: #see-also }
144144

145-
* [ステータス]({{site.baseurl}}/2.0/status/)
145+
* [ステータス]({{site.baseurl}}/ja/2.0/status/)

0 commit comments

Comments
 (0)