How to display info directly on build page in Jenkins?

  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}).


in Jenkins Pipeline method use as

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


Alternatively to solution with groovy script plugin, you may generate information together with button with REST command using Rich Text Publisher Plugin - you just don't have to write groovy script, only markup.

It adds a custom html markup to build page after build had been executed. It allows to configure a message using file, or environment variables.

Tags:

Jenkins