Add link on job and build page

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Add link on job and build page

sanghamitra-2
Hi All, I am newbie to Hudson. I am writing plugin to add link on the job page (just above permalinks section). I am unable to figure out what extensionpoint should I use so as to render the link? I cannot add link in job description, as some part of link will be created at run time. link will be something like "http://abc" + "job_name" + "xyz" where job_name is created at run time. Also I am unable to get name of my project in my java code. How will I get that? Any help will be highly appreciated. Thanks in advance. Sanghamitra
Reply | Threaded
Open this post in threaded view
|

Re: Add link on job and build page

stormcloud-3
The easiest solution to this is just to edit the description on the main page. The description can contain HTML markup, so if you want to add a link you can - no plug-in required  ;-)

This is what I usually do.

2009/7/8 sanghamitra <[hidden email]>
Hi All, I am newbie to Hudson. I am writing plugin to add link on the job page (just above permalinks section). I am unable to figure out what extensionpoint should I use so as to render the link? I cannot add link in job description, as some part of link will be created at run time. link will be something like "http://abc" + "job_name" + "xyz" where job_name is created at run time. Also I am unable to get name of my project in my java code. How will I get that? Any help will be highly appreciated. Thanks in advance. Sanghamitra

View this message in context: Add link on job and build page
Sent from the Hudson users mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: Add link on job and build page

sanghamitra-2
In reply to this post by sanghamitra-2

I cannot use the method you suggested. Any other pointers?

sanghamitra wrote
Hi All, I am newbie to Hudson. I am writing plugin to add link on the job page (just above permalinks section). I am unable to figure out what extensionpoint should I use so as to render the link? I cannot add link in job description, as some part of link will be created at run time. link will be something like "http://abc" + "job_name" + "xyz" where job_name is created at run time. Also I am unable to get name of my project in my java code. How will I get that? Any help will be highly appreciated. Thanks in advance. Sanghamitra
Reply | Threaded
Open this post in threaded view
|

Re: Add link on job and build page

Michael Donohue
You can't figure out how to make a link in the description, or you got it to work and it is not a satisfactory solution?

-Michael

On Wed, Jul 8, 2009 at 9:28 AM, sanghamitra <[hidden email]> wrote:


I cannot use the method you suggested. Any other pointers?


sanghamitra wrote:
>
> Hi All, I am newbie to Hudson. I am writing plugin to add link on the job
> page (just above permalinks section). I am unable to figure out what
> extensionpoint should I use so as to render the link? I cannot add link in
> job description, as some part of link will be created at run time. link
> will be something like "http://abc" + "job_name" + "xyz" where job_name is
> created at run time. Also I am unable to get name of my project in my java
> code. How will I get that? Any help will be highly appreciated. Thanks in
> advance. Sanghamitra
>
>

--
View this message in context: http://www.nabble.com/Add-link-on-job-and-build-page-tp24390878p24391556.html
Sent from the Hudson users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]




--
-Michael
415 412 1848
Reply | Threaded
Open this post in threaded view
|

Re: Add link on job and build page

sanghamitra-2
I have figured out link in description, but that is not what i want. I want to know what extension point should I use so that my "run time hyper link " gets rendered on job page just above permalink section. This link will be created after user save the job configuration page.
Thanks,
Sanghamitra
Michael Donohue wrote
You can't figure out how to make a link in the description, or you got it to
work and it is not a satisfactory solution?
-Michael

On Wed, Jul 8, 2009 at 9:28 AM, sanghamitra <sanghus@gmail.com> wrote:

>
>
> I cannot use the method you suggested. Any other pointers?
>
>
> sanghamitra wrote:
> >
> > Hi All, I am newbie to Hudson. I am writing plugin to add link on the job
> > page (just above permalinks section). I am unable to figure out what
> > extensionpoint should I use so as to render the link? I cannot add link
> in
> > job description, as some part of link will be created at run time. link
> > will be something like "http://abc" + "job_name" + "xyz" where job_name
> is
> > created at run time. Also I am unable to get name of my project in my
> java
> > code. How will I get that? Any help will be highly appreciated. Thanks in
> > advance. Sanghamitra
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Add-link-on-job-and-build-page-tp24390878p24391556.html
> Sent from the Hudson users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@hudson.dev.java.net
> For additional commands, e-mail: users-help@hudson.dev.java.net
>
>


--
-Michael
415 412 1848
Reply | Threaded
Open this post in threaded view
|

Re: Add link on job and build page

stormcloud-3
Stupid question, and it might be a bit off topic, but why do you want to do it this way?

I ask because I've the embedded-hyperlink-in-a-description method. It works perfectly, it's easy to maintain, Hudson security allows a flexible set of user to change it, and it was quick to set up.

Have I messed something, or is this an experiment in setting up plug-ins?

I'm curious



2009/7/8 sanghamitra <[hidden email]>

I have figured out link in description, but that is not what i want. I want
to know what extension point should I use so that my "run time hyper link "
gets rendered on job page just above permalink section. This link will be
created after user save the job configuration page.
Thanks,
Sanghamitra

Michael Donohue wrote:
>
> You can't figure out how to make a link in the description, or you got it
> to
> work and it is not a satisfactory solution?
> -Michael
>
> On Wed, Jul 8, 2009 at 9:28 AM, sanghamitra <[hidden email]> wrote:
>
>>
>>
>> I cannot use the method you suggested. Any other pointers?
>>
>>
>> sanghamitra wrote:
>> >
>> > Hi All, I am newbie to Hudson. I am writing plugin to add link on the
>> job
>> > page (just above permalinks section). I am unable to figure out what
>> > extensionpoint should I use so as to render the link? I cannot add link
>> in
>> > job description, as some part of link will be created at run time. link
>> > will be something like "http://abc" + "job_name" + "xyz" where job_name
>> is
>> > created at run time. Also I am unable to get name of my project in my
>> java
>> > code. How will I get that? Any help will be highly appreciated. Thanks
>> in
>> > advance. Sanghamitra
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Add-link-on-job-and-build-page-tp24390878p24391556.html
>> Sent from the Hudson users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
>
> --
> -Michael
> 415 412 1848
>
>

--
View this message in context: http://www.nabble.com/Add-link-on-job-and-build-page-tp24390878p24393142.html
Sent from the Hudson users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Add link on job and build page

sanghamitra-2
This is because the link is generated at run time and link contains some part of project name.(explained below)
For eg.
Name of my job is always of format abc-pqr
So link would
Link would be "http://something/"+pqr i.e "http://something/pqr"
If this is possible in description of a project,I would be interested in knowing that.

Thanks,
Sanghamitra

stormcloud-3 wrote
Stupid question, and it might be a bit off topic, but why do you want to do
it this way?

I ask because I've the embedded-hyperlink-in-a-description method. It works
perfectly, it's easy to maintain, Hudson security allows a flexible set of
user to change it, and it was quick to set up.

Have I messed something, or is this an experiment in setting up plug-ins?

I'm curious



2009/7/8 sanghamitra <sanghus@gmail.com>

>
> I have figured out link in description, but that is not what i want. I want
> to know what extension point should I use so that my "run time hyper link "
> gets rendered on job page just above permalink section. This link will be
> created after user save the job configuration page.
> Thanks,
> Sanghamitra
>
> Michael Donohue wrote:
> >
> > You can't figure out how to make a link in the description, or you got it
> > to
> > work and it is not a satisfactory solution?
> > -Michael
> >
> > On Wed, Jul 8, 2009 at 9:28 AM, sanghamitra <sanghus@gmail.com> wrote:
> >
> >>
> >>
> >> I cannot use the method you suggested. Any other pointers?
> >>
> >>
> >> sanghamitra wrote:
> >> >
> >> > Hi All, I am newbie to Hudson. I am writing plugin to add link on the
> >> job
> >> > page (just above permalinks section). I am unable to figure out what
> >> > extensionpoint should I use so as to render the link? I cannot add
> link
> >> in
> >> > job description, as some part of link will be created at run time.
> link
> >> > will be something like "http://abc" + "job_name" + "xyz" where
> job_name
> >> is
> >> > created at run time. Also I am unable to get name of my project in my
> >> java
> >> > code. How will I get that? Any help will be highly appreciated. Thanks
> >> in
> >> > advance. Sanghamitra
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Add-link-on-job-and-build-page-tp24390878p24391556.html
> >> Sent from the Hudson users mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@hudson.dev.java.net
> >> For additional commands, e-mail: users-help@hudson.dev.java.net
> >>
> >>
> >
> >
> > --
> > -Michael
> > 415 412 1848
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Add-link-on-job-and-build-page-tp24390878p24393142.html
> Sent from the Hudson users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@hudson.dev.java.net
> For additional commands, e-mail: users-help@hudson.dev.java.net
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Add link on job and build page

Kohsuke Kawaguchi
Administrator
In reply to this post by sanghamitra-2
sanghamitra wrote:
> Hi All, I am newbie to Hudson. I am writing plugin to add link on the job
> page (just above permalinks section). I am unable to figure out what
> extensionpoint should I use so as to render the link?

Looking at the code, I believe you can expose "jobMain.jelly" from your
Action objects that are attached to the project. The easiest way to add
an action to a job is from BuildStep.getProjectAction().

> I cannot add link in
> job description, as some part of link will be created at run time. link will
> be something like "http://abc" + "job_name" + "xyz" where job_name is
> created at run time. Also I am unable to get name of my project in my java
> code. How will I get that? Any help will be highly appreciated. Thanks in
> advance. Sanghamitra
>


--
Kohsuke Kawaguchi
Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Add link on job and build page

sanghamitra-2
Thanks for the pointer. But I am unable to find the jobMain.jelly file. If it does not exist, do we need to create? If yes where to place it?

Thanks,
Sanghamitra
kohsuke wrote
sanghamitra wrote:
> Hi All, I am newbie to Hudson. I am writing plugin to add link on the job
> page (just above permalinks section). I am unable to figure out what
> extensionpoint should I use so as to render the link?

Looking at the code, I believe you can expose "jobMain.jelly" from your
Action objects that are attached to the project. The easiest way to add
an action to a job is from BuildStep.getProjectAction().

> I cannot add link in
> job description, as some part of link will be created at run time. link will
> be something like "http://abc" + "job_name" + "xyz" where job_name is
> created at run time. Also I am unable to get name of my project in my java
> code. How will I get that? Any help will be highly appreciated. Thanks in
> advance. Sanghamitra
>


--
Kohsuke Kawaguchi
Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/