Adding text to a build page initiated by the remote Jenkins API

I have a Jenkins build system to run a project. Build starts through the functionality of the remote Jenkins API. When a commit is made to the project, we send an HTTP request assembly trigger for the Jenkins process, which runs on our local server; with a parameter that indicates the revision of the trunk project folder in the SVN repository that we want to check and build.

We also send the SVN username and commit message for revision as an optional http parameter. So the url is as follows:

http://server:8080/job/ProjectName/buildWithParameters?description=[commit message]&REVISION=[revision number] 

I would like to display this description parameter somewhere on the assembly page, but I did not find an obvious way to do this by running the assembly from a remote API.

Do I need to specify the parameter something specific or the plugin needed for this function?

+2
source share
2 answers

One way to add a description is to add a description of the assembly. Jenkins displays a short text description below each assembly in the assembly list to the left of the project page.

You can use the Setter description plugin to set the assembly description from your assembly.

Or you can set the assembly description from POST to http://server:8080/job/ProjectName/latestBuild/submitDescription using the POST data: description="YOUR_DESCRIPTION_HERE" . LastBuild current can be replaced with a specific build number, if you have one.

+3
source

Source: https://habr.com/ru/post/982448/


All Articles