Hi there –

 

I am following the Hello-World 
<https://www.jenkins.io/doc/developer/tutorial/extend/> plug-in tutorial 
and attempting to extend it.  I am following the instructions outlined in 
the documentation; however, I am unable to get the side menu to appear.

 

This is the code for HelloWorldAction:
package io.jenkins.plugins.sample;

import hudson.model.Run;
import jenkins.model.RunAction2;

public class HelloWorldAction implements RunAction2 {

    private String name;
    private transient Run run;

    public HelloWorldAction(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    @Override
    public String getIconFileName() {
        return "document.png";
    }

    @Override
    public String getDisplayName() {
        return "Greeting";
    }

    @Override
    public String getUrlName() {
        return "greeting";
    }

    @Override
    public void onAttached(Run<?, ?> r) {
        this.run = run;
    }

    @Override
    public void onLoad(Run<?, ?> r) {
        this.run = run;    
    }

    public Run getRun() {
        return run;
    }

}

Here is the index.jelly code:

 <?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:l="/lib/layout" 
xmlns:st="jelly:stapler">
    <l:layout title="Greeting">
        <l:side-panel> 
            <st:include page="sidepanel.jelly" it="${it.run}" 
optional="true" /> 
        </l:side-panel>

        <l:main-panel>
            <h1>
                Name: ${it.name}
            </h1>
        </l:main-panel>
    </l:layout>
</j:jelly> 

I don’t see the build menu on the left as the documentation describes.  I 
continue to only see the greeting.

I am brand new to Jenkins and plug-ins.  I know I have a long way to go to 
learn how to build a robust plug-in, therefore I want to make sure I 
understand why this is not working.

I appreciate your time.

 Thanks,

Bob

 

 

 

-- 
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-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/c4ba5df6-a474-4afd-9222-f4985c861197n%40googlegroups.com.

Reply via email to