Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins plugin shows on Plugin page but does not show on configuration page

I am creating a hello world plugin for Jenkins by following Tutorial: Create a Jenkins Plugin to integrate Jenkins and Nexus Repository. After I followed the steps, I can run Jenkins and test the plugin.

It shows on Installed Plugin Page.

enter image description here

Then I go to Configuration page and expect to see Hello World Builder section like the below image, but there is not. enter image description here

What steps did I miss? Is there anything I have to do before having that plugin show up on the configuration page?

Update This is the project layout, I haven't modified anything on it yet. enter image description here

like image 799
Anonymous Avatar asked Nov 10 '22 09:11

Anonymous


1 Answers

What command did you use to generate the plugin skeleton?

FYI, from the tutorial above, mvn -cpu is deprecated.

To generate the plugin skeleton, use:

mvn hpi:create

or

mvn -U org.jenkins-ci.tools:maven-hpi-plugin:create from the Jenkins Plugin tutorial

I'm going to include each step for what worked for me:

  1. mvn hpi:create, then enter groupId (press enter to use default: org.jenkins-ci.plugins) and artifactId (name of the plugin)
  2. cd new-plugin-name
  3. mvn eclipse:eclipse
  4. mvn package
  5. mvn hpi:run (default port is 8080, but you can set your own with Dport option (i.e. mvn hpi:run -Dport=9999, use this if port 8080 is in use - otherwise mvn hpi:run will fail)
  6. Open browser and enter URL "localhost:8080" (or 9999)
  7. You should the page below. Click the link and that'll take you to Jenkins home page enter image description here
  8. Click 'Manage Jenkins' > Configure System. Scroll down near the bottom of the page and you should see the Hello World Builder section enter image description here
  9. Go back to Jenkins home page and click New Item
  10. Give the project any name, select Freestyle Project, click OK.
  11. Scroll down to the Build section and click 'Add build step' > Say hello world
  12. Enter a name (i.e. TestName), save the project, then run a build ('Build Now')
  13. Click on the latest build under 'Build History' > Console Output.

enter image description here

like image 91
lkisac Avatar answered Nov 15 '22 06:11

lkisac