Jenkins plugin for triggering build from Dashboard with input argument? - jenkins

We have a project with more than 100k regression tests and therefore we'd like to have the alternative to manually trigger and check if a Test Suite(s) have been broken due to a specific change instead of running all tests.
I have a build project configured in a way that everything is in place and it expects only parameter value to be appended i.e. -DwildcardSuites=<Suite Name Pattern>.
Is there a Jenkins plugin that would allow entering an input text to be appended to the Goals and options and that corresponds to the specific Suite pattern we'd like to run?

Extensible Choice? https://wiki.jenkins-ci.org/display/JENKINS/Extensible+Choice+Parameter+plugin
There are a few similar plugins, they tend to have one or more of "Choice", "Active" and "Dynamic" in the name.

Related

Jenkins - Running concurrent jobs with "circular" parameter

I'd like to run several builds concurrently in Jenkins for the same job. I run at maximum 3 builds concurrently. I want each build to run with a parameter that must be unique from a pool for parameters. For instance, pool=[1, 2, 3]: The 1st build picks "1", 2nd picks "2" and the 3rd picks "3".
I must ensure that different builds can't pick the same parameter.
After building, the parameter is available again.
How can I do it?
Alternative: How can I count the number of builds running in this project and pass it as parameter?
At first, select the checkbox button named build-concurrently-if-neccesary to ensure the same job could build concurrently. you'd better read the help-html seriously before
The isolated environments for building different jobs make that data could not be shared each other in a simple way.
Here is a solution that trigger the buildWithParameters link by jenkins rest api to control the pool in the program procedure of your own.
add a string-parameter in job's config.
post the string parameter to http://$JENKINS_SERVER_URL/job/$JOB_NAME/buildWithParameters
Maybe it's the most convenient way if no available plugin found.
I found a plugin in github and asked the author to publish it. It works well and solves my problem.
Jenkins Parameter Pool Plugin

Jenkins same parameters on multiple jobs

we have many Jenkins Test Jobs dependening on one library. Every Job has multiple parameters (always identical).
Now the problem is that if we change or add an parameter in the library, we have to touch every single jenkins job configuration.
Is there a way to configure the parameters of multiple jobs in a central place? Like defining the parameters in a file and refering to that? or is there jenkins plugin for that use case?
Thanks,
Marco
You can edit parameters (and much more) of multiple jobs in one place with Configuration Slicing Plugin:
Job Parameters (aka "This build is parameterized") can be configured across multiple jobs at one time through the "Parameters" link. To indicate which parameter you are configuring, note the "JobName[ParameterName]" syntax.
Not sure if this can help if you use some advanced parameters like File parameter, Dynamic parameter etc.
Use Build Flow plugin
You can run same or multiple jobs many times with different configuration.
Use Multijob Plugin and parameterized plugin
You can pass different parameter by using these plugins

Queue build on specific agent based on custom parameter

I have a build definition with a custom process parameter. If set to true, I'd like the build to queue up on a specific agent, essentially overriding any agent name that's set in the definition. I'd rather not use tags because I don't think they'll be used properly, plus this seems more dynamic in nature. I'm thinking this could be done in the build process template somehow. Just not sure how to accomplish it.
You can customize the build process template to look at your custom workflow argument, and change the value of the AgentSettings.Name prior to the Run On Agent activity.

Is there a way to set multiple parameters with one choice in jenkins

I am trying to manage a jenkins build where a user may select to build either from master, or a specific branch. There are several variables that need to be set depending on what the user chooses. I've spent all day trying to find any reasonable way of doing this, and the best thing I've come up with is offering the user two dropdowns populated with low level parameter values.
I think you can just set up two jobs by using different branch, that will be better, since different branch might will has different datamodel, setup a different schema for each of them will make more sense.
You could use the environment script plugin and execute a shell script to define and populate your build variables.
Have a look at the Extensible Choice Parameter Plugin. The global choice parameter might be exactly what you want.
You make a single choice parameter and than add "Inject environment variables" step specifying MyBuildConfig\${ChosenParameter}.prop in Properties File Path. Create such a file for each of the choice options. Finally, specify additional variables you want to set together with particular chosen parameter in each of the created files.

Get result of a build step in Hudson/Jenkins to re-use it in another one

My question may be silly but I've been trying several ways and I still can't do what I want, i.e.:
use the scp target of Ant to target a remote machine and execute
a script there
this script creates a dynamic list of files
get this list of files (only their names) back in Hudson to use it in the next build step (another scp from Ant)
I tried to use environment variables but they are interpreted by Hudson so I'm stuck here...
Globally my question would be: how to get a result from an Ant build step ?
Thanks for your ideas,
Emmanuel
You may find File parameter useful. This allows you to create an input file, pass it to build. You may need to write script/ant script to process the file though.
In the long term you may evaluate a Hudson farm. This will allow to create tasks that span multiple machines , pass results around. (https://wiki.jenkins-ci.org/display/JENKINS/Plugins)
You can get the ID(s) of the job that triggered your job via the API and fetch their status.

Resources