2

I have a Jenkins Pipeline which uses Terraform and create a compute environment in GCP. There are like 5 questions in the build i.e.

1) GCP Project Name
2) Number of RHEL Servers
3) RHEL Server names
4) Number of CentOS Servers
5) CentOS Server names

This is a standard build job and users cannot build servers if not using this build.

The problem is that when a user comes back to request more servers, they have to fill up all the details again. They have to remember all the values they passed previously.

So the questions is: How do I make this user friendly without creating a separate build job for each GCP project and hard coding the values.

1 Answer 1

2

Depending on how long you keep builds for, the Rebuild option in the left hand sidebar will allow you rebuild a previous run of the job with the parameters intact.

Simply find a previous build of the job that that particular user kicked off last time, click into it, then choose Rebuild from the sidebar.

Again this will only work if Jenkins keeps enough builds. We save two weeks for a particular job and I have a coworker who saves a link directly to x build of the job, then once he rebuilds updates his link to the new one, etc. This way he can just open the link he has saved, click Rebuild, and he's good to go as long as he's inside that two week window.

I believe you can even choose to Keep this build forever for a couple of your "template" builds, making them more easily accessible.

2
  • Is there a way to tell Jenkins to keep a build for x number of days instead of saying how many builds to keep?
    – Asdfg
    Commented Jul 19, 2018 at 19:23
  • @Asdfg yep! You can pick either days or number of builds on the config page.
    – Alex
    Commented Jul 19, 2018 at 19:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.