Open danmorgen opened 2 years ago
Hi,
I'm not very familiar with Jira Server on prem offering.
However, as long as these prerequisites are met, I think the extension should work just the same.
1) The on prem version provides the same REST API, mainly the comment
resource
2) If 1) is available with auth, make sure you have a way to generate an API token for the aforementioned API
3) The Rest API is either public, or the azure build agent that will be running the task can resolve its location
2)+ If the on prem offering comes with a REST API that doesn't need auth, you should be fine by passing a string of alphanumeric characters to the 'token' required field of the task.
Hope that helps 😄
Hi
Tnx for quick reply
My problem is "organisation"
I have url. No organization. On prem
On Thu, Apr 28, 2022, 15:28 Adrian Soomro @.***> wrote:
Hi,
I'm not very familiar with Jira Server on prem offering.
However, as long as these prerequisites are met, I think the extension should work just the same.
- The on prem version provides the same REST API, mainly the comment resource
- If 1) is available with auth, make sure you have a way to generate an API token for the aforementioned API
- The Rest API is either public, or the azure build agent that will be running the task can resolve its location
2)+ If the on prem offering comes with a REST API that doesn't need auth, you should be fine by passing a string of alphanumeric characters to the 'token' required field of the task.
Hope that helps 😄
— Reply to this email directly, view it on GitHub https://github.com/adrian-soomro/jira-commenter/issues/15#issuecomment-1112143268, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK3RM4YFYYAXMROIRGVSDGLVHJ77DANCNFSM5URVOUMA . You are receiving this because you authored the thread.Message ID: @.***>
I see, where is the comment resource located?
The way to get to a cloud one is as follows
const url = `https://${organisation}.atlassian.net/rest/api/2/issue/${project}-${ticketNumber}/comment`
I assume (correct me if I'm wrong) that the API is running on a URL that'd look something like https://host.address/rest/api/2/
if that's the case, you could edit the hosts file on the build agent and add an entry where host.address.atlassian.net
would resolve to host.address
, allowing you to pass host.address
as the organisation.
Thanks, I'll try it out
On Thu, Apr 28, 2022, 23:52 Adrian Soomro @.***> wrote:
I see, where is the comment resource located?
The way to get to a cloud one is as follows
const url =
https://${organisation}.atlassian.net/rest/api/2/issue/${project}-${ticketNumber}/comment
I assume (correct me if I'm wrong) that the API is running on a URL that'd look something like https://host.address/rest/api/2/ if that's the case, you could edit the hosts file on the build agent and add an entry where host.address.atlassian.net would resolve to host.address, allowing you to pass host.address as the organisation.
— Reply to this email directly, view it on GitHub https://github.com/adrian-soomro/jira-commenter/issues/15#issuecomment-1112643753, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK3RM4YIHDFJRPIZSZE6LC3VHL27RANCNFSM5URVOUMA . You are receiving this because you authored the thread.Message ID: @.***>
Hi
Tried that.
Added entry in hosts file, so myjiraonprem.atlassian.net is valid
The problem is that token not supported on jira on prem.
Oath or basic authentication only
Suggestions?
Dan
On Fri, Apr 29, 2022, 16:08 Dan Morgenstern @.***> wrote:
Thanks, I'll try it out
On Thu, Apr 28, 2022, 23:52 Adrian Soomro @.***> wrote:
I see, where is the comment resource located?
The way to get to a cloud one is as follows
const url =
https://${organisation}.atlassian.net/rest/api/2/issue/${project}-${ticketNumber}/comment
I assume (correct me if I'm wrong) that the API is running on a URL that'd look something like https://host.address/rest/api/2/ if that's the case, you could edit the hosts file on the build agent and add an entry where host.address.atlassian.net would resolve to host.address, allowing you to pass host.address as the organisation.
— Reply to this email directly, view it on GitHub https://github.com/adrian-soomro/jira-commenter/issues/15#issuecomment-1112643753, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK3RM4YIHDFJRPIZSZE6LC3VHL27RANCNFSM5URVOUMA . You are receiving this because you authored the thread.Message ID: @.***>
If I understand this correctly, using the basic flow auth has the same flow as authing using an API token.
Based on on-prem auth header construction docs vs how we construct the auth header
I'd try substituting the accessToken
with your account's password and emailAddress
with your account's username (if they differ)
Thanks
On Sat, May 14, 2022, 01:47 Adrian Soomro @.***> wrote:
If I understand this correctly, using the basic flow auth has the same flow as authing using an API token. Based on on-prem auth header construction docs https://developer.atlassian.com/server/jira/platform/basic-authentication/#construct-the-authorization-header vs how we construct the auth header https://github.com/adrian-soomro/jira-commenter/blob/main/buildandreleasetask/commenter.ts#L49 I'd try substituting the accessToken with your account's password and emailAddress with your account's username (if they differ)
— Reply to this email directly, view it on GitHub https://github.com/adrian-soomro/jira-commenter/issues/15#issuecomment-1126559727, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK3RM42L7NHDHBBABCNS3ADVJ3LWHANCNFSM5URVOUMA . You are receiving this because you authored the thread.Message ID: @.***>
Did that work?
no
On Wed, May 18, 2022 at 12:18 AM Adrian Soomro @.***> wrote:
Did that work?
— Reply to this email directly, view it on GitHub https://github.com/adrian-soomro/jira-commenter/issues/15#issuecomment-1129326778, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK3RM4ZLSANNOJ6VRCNPFT3VKQEKJANCNFSM5URVOUMA . You are receiving this because you authored the thread.Message ID: @.***>
Is there anything useful in the logs?
It still demands email. Username not valid
Please. Try it via jira on prem
On Sun, May 22, 2022, 18:36 Adrian Soomro @.***> wrote:
Is there anything useful in the logs?
— Reply to this email directly, view it on GitHub https://github.com/adrian-soomro/jira-commenter/issues/15#issuecomment-1133921584, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK3RM46MD7CAUDDIRYEEGT3VLJIBHANCNFSM5URVOUMA . You are receiving this because you authored the thread.Message ID: @.***>
hi can it work with jira server? how to connect? thanx