Alternative to TransientProjectActionFactory for Build Pipeline

31 views
Skip to first unread message

Gustavo Henrique

unread,
Oct 4, 2016, 5:06:45 PM10/4/16
to Jenkins Developers
Which extension point can I use as alternative to TransientProjectActionFactory for jobs using the Build Pipeline Plugin?
I have an old plugin that uses:

public class ProjectAction implements Action {
 ...
}

@Extension
public class ProjectActionFactory extends TransientProjectActionFactory {
    @Override
    public Collection<? extends Action> createFor(AbstractProject project) {
        return Arrays.asList(new ProjectAction(project));
    }
}

My jobMain.jelly doesn't works for jobs using Pipeline.

Daniel Beck

unread,
Oct 4, 2016, 5:15:09 PM10/4/16
to jenkin...@googlegroups.com
Isn't Build Pipeline Plugin just a view on top of independent jobs (connected by build causes, triggers, etc.)?

If so, there's nothing special about such a job. Maybe TransientActionFactory if there's Build Pipeline specific configuration such as a JobProperty, and check for that before creating actions (or in your actions, depending on how caching works exactly).
> --
> 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/a3a39902-0bc0-4b3b-92e6-fc1ad8140cbc%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Jesse Glick

unread,
Oct 4, 2016, 5:18:10 PM10/4/16
to Jenkins Dev
On Tue, Oct 4, 2016 at 5:15 PM, Daniel Beck <m...@beckweb.net> wrote:
> Isn't Build Pipeline Plugin just a view on top of independent jobs (connected by build causes, triggers, etc.)?

I think Gustavo was referring to the Pipeline plugin suite, not the
Build Pipeline plugin.

The answer: use `TransientActionFactory<Run>` rather than
`TransientProjectActionFactory`. I guess you missed

https://github.com/jenkinsci/jenkins/blob/163a97728f005865844df8dd015dcfdd5c30d356/core/src/main/java/hudson/model/TransientProjectActionFactory.java#L53
Reply all
Reply to author
Forward
0 new messages