Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display info directly on build page in Jenkins?

Tags:

jenkins

I would like to have the following workflow in Jenkins:

  • user clicks 'Build Now'
  • user fills out build parameters
  • user clicks 'Build'
  • information is generated (via a script) and presented to user along with 'Continue' button
  • user clicks 'Continue' button which simply triggers another job

How can this be done?

like image 271
Noel Yap Avatar asked May 30 '12 21:05

Noel Yap


People also ask

How do I configure Jenkins dashboard view?

On the Jenkins main page, click the + tab to start the new view wizard (If you do not see a +, it is likely you do not have permission to create a new view). On the create new view page, give your view a name and select the Dashboard type and click ok.

What is build pipeline view?

The Build Pipeline Plugin handles the creation of multiple automatic and/or manually triggered downstream build steps on the same project.

How do I enable pipeline view in Jenkins?

Step 4) Go to your Jenkins dashboard and create a view by clicking on the “+” button. Select the Build Pipeline View option and click OK. Step 5) Under Pipeline view configuration, locate Pipeline Flow. Under Pipeline flow, select the initial job to run.


2 Answers

  1. Use the Execute shell action to create a shell script that sets an environment variable. For example: echo "BUILD_DESCRIPTION=example" >BUILD_DESCRIPTION.setting.

  2. Use the Inject environment variables action to execute the shell script.

  3. Use the Set build description action to set the build description to the variable that was set by the shell script (eg ${BUILD_DESCRIPTION}).

like image 54
Noel Yap Avatar answered Nov 16 '22 04:11

Noel Yap


in Jenkins Pipeline method use as

script{ currentBuild.displayName = Build_Display (this will be overwrite the Job number) currentBuild.description = Build_description }

like image 30
Bj_Amit Avatar answered Nov 16 '22 04:11

Bj_Amit