-
Notifications
You must be signed in to change notification settings - Fork 3
remove hardcoded URL, add instructions, fix tests #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| if (!context?.apiBaseUrl) { | ||
| return; | ||
| } | ||
| const getConfluencePluginConfig = async (): Promise<void> => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in the long run we'll want to add an abstraction into @cortexapps/plugin-core to retrieve configuration bundles, but for our PoC I think this works, just adding the comment for posterity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed, ideally we would have some boilerplate to show if various things went horribly wrong
plugins/confluence-plugin/README.md
Outdated
|
|
||
| ### Set your Confluence credentials | ||
|
|
||
| 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 by clicking on Security > Create and manage API tokens > Create API token. Once you have your text in your text editor like `myusername@example.com: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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick, typo, should be: "To create an API tolein in Confluence, click on Security > Create"
plugins/confluence-plugin/README.md
Outdated
|
|
||
| ### Set your Confluence credentials | ||
|
|
||
| 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 by clicking on Security > Create and manage API tokens > Create API token. Once you have your text in your text editor like `myusername@example.com: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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, depending on the version and tenant type of Confluence, they may not have an ability to create the API Keys from Confluence Settings and instead will need to navigate to Profile Menu (upper right) -> Account -> Security -> API Tokens. We could provide both, and then link to Atlassian Docs: https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/
jreock
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Background
Confluence plugin had a hardcoded URL, marketplace plugins need to work without being recompiled.
This PR
Removed the hardcoded URL and added code to get the URL from a plugin config entity; added instructions to create the plugin config entity if it's not found.
Checklists
Security