How to create projectAction

9 views
Skip to first unread message

selva vignesh

unread,
May 15, 2019, 10:05:34 AM5/15/19
to Jenkins Developers
Hi All,
  I have create Build Level Action and its successfully working. I want to create Project Level Action so that i have created ProjectAction and done what ever i want.
But when Jenkins load, creating no project action bar for all Post,Pre Action i have create.
Can anyone please let me know how to done this one.
Thanks in Advance.

Ullrich Hafner

unread,
May 15, 2019, 10:13:27 AM5/15/19
to Jenkins Developers
You need to implement LastBuildAction and then override this method in your existing action:

@Override
    public Collection<? extends Action> getProjectActions() {
        return Collections.singleton(new AggregatedTrendAction(owner.getParent()));
    }

Example:
--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/a1a2249f-9cc1-4ef4-97aa-83024387ae9e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Markus Winter

unread,
May 15, 2019, 10:15:45 AM5/15/19
to jenkin...@googlegroups.com
Create your own TransientActionFactory to inject the action to all projects.

selva vignesh

unread,
May 16, 2019, 1:42:22 AM5/16/19
to jenkin...@googlegroups.com
Yes... I have transiantAction Factory. Problem is I have 2 post Action so i have called the Project Action class on both. So both Action Url are shown in UI.
I want to make it this only one for Project
Thanks

Reply all
Reply to author
Forward
0 new messages