I’m using Extended Choice Parameters named Tasks in a job and the parameter type is Multi Select ( for example with these values: Start, Go, End), now how can I access the selected options ?
Meaning I want to create conditional step with Boolean condition so in case Start option was selected do X and another one in case Go option was selected do Y,
The question is what should be the Token of the Conditional step ?
(I prefer not using script in order to get selected values.)
Assuming you are using the Conditional BuildStep plugin, you should be able to use the "Strings Match" condition to setup your conditional steps. See the screenshots below for an example:
If multiple options can be selected, you can still setup the job as describe above. The only thing you need to change is the type of condition. Instead of using String match, use Regular expression match. This way you can run multiple build steps if you have a composite value.
Related
I have a choice parameter with values say:
A
B
BOTH
In above,
if i select "A", there should be one input box which should appear in the job parameter page to take value for A alone
if i select "B", there should be one input box which should appear in the job parameter page to take value for B alone
if i select "BOTH", there should be two input boxes which should appear in the job parameter page to take value for A & B values.
In the declarative script, i should print the values entered in the input boxes respectively. How to achieve this?
Similar but not the same question was answered here Parameterized Jenkins job with dependent parameter
Here is how you can parameterize your job:
Add an active choices parameter
Add an active choices reactive reference parameter
2.1. and choose Choice Type and Referenced parameters as follows
Implement pipeline script
Build with parameters and enter values into input fields
Here is the build output
Requirement:
I want to run multiple test cases in a single Jenkins job.
All those test cases are run one by one on the same Node.
User should be able to specify execution order of those test cases.
What I've tried
I tried checkbox. But order of checkbox candiates are fixed. Uses can select which test case
they want to run, but cannot adjust the order.
I tried String parameter. I put the candidate test case names in "description" and users can
copy and paste them into the input box, split by comma. But it seems to be crude. Is it
possible to add some, for example cutomized Groovy code to control the prediction. Whenever
a user types first letters of a test case after a comma, candidate test case names are
listed in a drop down list?
Or, does Jenkins provide a "select add" and "select remove" box pair? For example a left select box lists all candidate, and user select one and double click, or click "add" button, then the item is added to the right select box. And if user select an item in right box and click "remove" button, the item moves back to the right select box.
No matter which method is used, I just want to impelement such "select and adjust order" feature. How can I do it?
Is there a Way of Hiding name before build with active choice reactive parameter? (in this case ID1, ID2 and ID3), I have configured a choice parameter and three active choice reactive parameters to enter some values in case that "values" option is selected. But I don´t want to show them in Jenkins UI if "no values" options is selected.
This is how I have it configured. (Adding just ID1 but the others 2 -ID2 and ID3- are the same)
this is my first post!
We want to create an airtable integration: when an ID in a certain column is an ODD number, so we will automatically update the STATUS for another column. Have googled and searched but perhaps couldn't find the right answer, especially for the Search Formula field. Appreciate any help for this!
Huge Thanks!
Within your Airtable table, you can create a new formula field called "Is Odd." The formula within that field would then be IF(MOD({ID}, 2) = 1, "True", "False"). If the ID field mod 2 is equal to 1, then the field is odd, otherwise, it is not.
You could just use this Airtable formula logic to assign a status. Change "True" and "False" to whatever your status values are. You can then group, filter and sort your records based on the values in that field. For more info on Airtable formulas: https://support.airtable.com/hc/en-us/articles/203255215-Formula-Field-Reference
If you really need to continue with Zapier, you have a couple of different options for how to proceed. One way would be to use the "Path" helper step to split your workflow. Zapier should follow Path A if the Is Odd field of the record is equal to the string True and Path B if the field is equal to the string False. Down each path, you can then use the Update Record Airtable action to update the record with the correct status. The "Path" step requires a "Professional" account with Zapier.
The other option requires a "Pro" account (which is cheaper than a Professional account). You can create two different Zaps, one for Odd IDs and one for Even IDs. Use the Filter helper step in Zapier to then only execute the Odd Zap if Is Odd is equal to the string True and the Even Zap if Is Odd is equal to the string False. Each Zap can then use the Update Record Airtable action to update the record with the correct status.
I definitely recommend using functions within Airtable to manage this. No reason to include a third party if you don't have to!
I have a label field in JIRA called 'assets'. As labels can be manually added its easy to add a 'wrong label', thus we have a set of defined valid labels.
valid labels = (one, two, three)
The JQL I currently use is: "assets" NOT IN (one, two, three)
This works fine if ie. assets = (red, blue) etc. but if the asset fild contains one of the valid labels it does not show. ie. asset = (one, blue) is not shown, but in fact I would like it to show.
How can I create a JQL that checks that all labels in a field is contained in a set?
Unfortunately, there is no way to do that with just standard JQL.
You can accomplish this using the Script Runner add-on though. It allows you to implement your own custom JQL function in Groovy using the JIRA Java API, so you can add whatever logic you desire.
Some interesting links:
Script Runner add-on
Custom JQL functions