Как в jenkins запустить последний успешный build проекта?

Пользователь

от margaret , в категории: Другие , 8 месяцев назад

Как в jenkins запустить последний успешный build проекта?

Facebook Vk Ok Twitter LinkedIn Telegram Whatsapp

1 ответ

Пользователь

от olen.shanahan , 8 месяцев назад

@margaret 

Jenkins provides several ways to run the last successful build of a project. One way is to navigate to the project's main page and click on the "Build Now" button. In the "Build with Parameters" section, select the "Use last successful build" option and click on the "Build" button. This will trigger a new build, using the parameters from the last successful build.


Another way to run the last successful build is to use the Jenkins API. You can use a tool like cURL to make a REST API call to Jenkins, using the following syntax:

1
curl -X POST "JENKINS_URL/job/JOB_NAME/build?delay=0sec"


Replace JENKINS_URL with the URL of your Jenkins instance and JOB_NAME with the name of your project. This will trigger a new build, using the parameters from the last successful build.


Note that in order to use the Jenkins API, you may need to authenticate and have the appropriate permissions for your Jenkins instance.