You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugins/confluence-plugin/README.md
+38-8Lines changed: 38 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -14,20 +14,30 @@ Your Confluence instance URL should look like `https://something.atlassian.net`.
14
14
15
15
### Set your Confluence credentials
16
16
17
-
If you are using username and password authentication, type them in to a text editor with a colon (`:`) between them. If you are using SSO, use an API token in place of the password. To create an API token in Confluence, follow the [instructions provided by Atlassian](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/). Once you have your text in your text editor like `[email protected]:MySecretPassWordOrToken`, you need to base64 encode it. You can do this using an online tool like [this](https://www.base64encode.org). You will add the base64 encoded value to Cortex as a secret. Copy the base64 encoded value. In Cortex, click on Settings > Secrets > Add secret. In Secret name, type `confluence_secret`, paste the base64 encoded secret into Secret value, and click on Create secret.
17
+
1. If you are using username and password authentication, type them in to a text editor with a colon (`:`) between them. If you are using SSO, use an API token in place of the password. To create an API token in Confluence, follow the [instructions provided by Atlassian](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/).
18
+
2. Once you have your text in your text editor like `[email protected]:MySecretPassWordOrToken`, you need to base64 encode it. You can do this using an online tool like [this](https://www.base64encode.org).
19
+
3. You will add the base64 encoded value to Cortex as a secret. Copy the base64 encoded value. In Cortex, click on Settings > Secrets > Add secret. In Secret name, type `confluence_secret`, paste the base64 encoded secret into Secret value, and click on Create secret.
18
20
19
21
### Set up a Plugin Proxy
20
22
21
-
After you've saved the secret, we will set up a proxy to use that secret to communicate with Confluence. In Cortex, click on Plugins > Proxies > Create Proxy. In Name, type `Confluence Proxy`. Click on Add URL, and put in your Confluence Instance URL, like `https://something.atlassian.net`. Click Save. Next, click on "Add header to https://something.atlassian.net". In the dialog box that appears, type `Authorization` in the Name field, and in the Value field, type `Basic {{{secrets.confluence_secret}}}`. Make sure you include the three curly braces, and make sure the secret name matches the secret you created above, with `secrets.` in front of it. Click Save, then click on the Create Proxy button.
23
+
After you've saved the secret, we will set up a proxy to use that secret to communicate with Confluence.
22
24
23
-
### Associate the plugin with the plugin proxy
25
+
1. In Cortex, click on Plugins > Proxies > Create Proxy.
26
+
2. In Name, type `Confluence Proxy`.
27
+
3. Click on Add URL, and put in your Confluence Instance URL, like `https://something.atlassian.net`. Click Save.
28
+
4. Next, click on "Add header to https://something.atlassian.net". In the dialog box that appears, type `Authorization` in the Name field, and in the Value field, type `Basic {{{secrets.confluence_secret}}}`. Make sure you include the three curly braces, and make sure the secret name matches the secret you created above, with `secrets.` in front of it. Click Save, then click on the Create Proxy button.
24
29
25
-
Create or edit your Confluence Plugin. In the dropdown under the Associated Proxy heading, choose the Confluence proxy you created above. Next, click Save plugin at the bottom of the page.
30
+
### Associate the plugin with the plugin proxy and set entity types
31
+
32
+
1. Create or edit your Confluence Plugin.
33
+
2. In the Plugin Context section, find the dropdown under the Associated Proxy heading, choose the Confluence proxy you created above.
34
+
3. At the bottom of Plugin Context section, click on **"Add another context"** and add the `entity types` you want to display your plugin. (eg. `service`)
35
+
4. Next, click Save plugin at the bottom of the page.
26
36
27
37
### Create a plugin configuration entity
28
38
29
-
- Consider creating a new entity type, so that any existing scorecards are not affected by ths configuration entity. In this example, we have created a new entity type called `plugin-configuration`
30
-
- Create a new entity with the tag `confluence-plugin-config`
39
+
- Consider creating a new **entity type**, so that any existing scorecards are not affected by ths configuration entity. In this example, we have created a new entity type called `plugin-configuration`
40
+
- Create a new **entity** with the tag `confluence-plugin-config`
31
41
- Set `x-cortex-definition.confluence-url` to the value of your Confluence Instance URL. For example, if my Confluence Instance URL was `https://martindstone.service-now.com`, my `confluence-plugin-config` entity would look like this:
32
42
33
43
```
@@ -43,18 +53,38 @@ info:
43
53
44
54
### Adding Confluence content to entities
45
55
46
-
Entities can be associated with Confluence Page IDs by adding a PageID tag to the `x-cortex-confluence` object. In the Entity yaml for the entity to the Page ID that you'd like to view inside of Cortex, such as:
56
+
To associate confluence pages with entities you will require `id` for each page in which you can find by following the instructions on [here](https://confluence.atlassian.com/confkb/how-to-get-confluence-page-id-648380445.html).
57
+
58
+
Entities can be associated with Confluence Page IDs in two ways:
59
+
60
+
1. If there is only one confluence page, adding a PageID tag to the `x-cortex-confluence` object will be ok. In the Entity yaml for the entity to the Page ID that you'd like to view inside of Cortex, such as:
47
61
48
62
```
49
63
x-cortex-confluence:
50
64
pageID: "123456"
51
65
```
52
66
67
+
2. If there are multiple confluence pages, adding pages under `x-cortex-confluence` and then under `pages` you can enter multiple `id`s and `title`s as well to describe the corresponding confluence page. Entity yaml should look like this:
68
+
69
+
```
70
+
x-cortex-confluence:
71
+
pages:
72
+
- id: "327681"
73
+
title: Page Title 1
74
+
- id: "65718"
75
+
title: Page Title 2
76
+
- id: "1179675"
77
+
title: ""
78
+
- id: "1277954"
79
+
```
80
+
81
+
The `id` field is mandatory but `title` filed is optional for each page.
82
+
53
83
You can do this for Custom Entities, as well as any Service entity.
54
84
55
85
### Done!
56
86
57
-
Now when you load the Confluence plugin on an entity that has a Confluence page ID in `x-cortex-confluence.pageID`, you should see the content of that page in Cortex!
87
+
Now when you load the Confluence plugin on an entity, you should see the contents of associated pages in Cortex!
0 commit comments