Unpacking C:\Program Files (x86)\demo-1.0\bin\postinstallation.bat Unpacking C:\Program Files (x86)\demo-1.0\bin\demo.txt Unpacking C:\Program Files (x86)\demo-1.0\bin\logo.ico Unpacking C:\Program Files (x86)\demo-1.0\lib\libdummy.soĬreating directory C:\Program Files (x86)\demo-1.0\bin Unpacking C:\Program Files (x86)\demo-1.0\docs\readme.txt Unpacking C:\Program Files (x86)\demo-1.0\docs\readme.html Unpacking C:\Program Files (x86)\demo-1.0\docs\license.txt I hope the log I found is the right one:Ĭreating directory C:\Program Files (x86)\demo-1.0Ĭreating directory C:\Program Files (x86)\demo-1.0\docsĬreating directory C:\Program Files (x86)\demo-1.0\lib As a note, DataCenter should be added as parameter of the scriptler, in the UI Parameters section.Ĭredits for the solution go to CloudBees.1- I have never used BitRock Installer before.so bear with me. If you need more parameters, you can separate them with comma.īecause DataCenter is a referenced parameter and automatically transmitted to the scriptler, $DataCenter variable from inside the SQL query will be mapped with its value. The most important thing to note here is that referencedParameters: 'DataCenter' was not inside the script block, but at the "root" level. Sql = Sql.newInstance("jdbc:sqlserver://SQLServerHere connectionDataHere", ".SQLServerDriver")ĮnvTypes = sql.rows("exec. The groovy code for oovy might look like this: import The groovy code for oovy for demo purposes is (but might be retrieved from a DB, as an alternative): return That being said, if you still want to go on and use Scriptler plugin and CascadeChoiceParameter, the code might look like this: properties([ One thing to keep in mind: Scriptlers are not secure, you should not use them: !. Pipeline with params configured in UI - behaves ok (environment types loading on data center change): ScriptlerScriptId:'oovy',Įxpected result: Second drop-down list populates when data center changes Actual result: Nothing happens when data center changes It's not working for me to use something other than properties section - I've tried using activeChoiceParameter inside pipeline section, but I get an error ' Build parameters definitions cannot have blocks line (.)', which is a known issue (see first example link below).Įxamples I've used: Jenkinsfile Active Choice Parameter Active Choices Reactive Reference Parameter in jenkins pipeline properties([ If I define the 2 parameters from the Jenkins interface - so not through the DSL pipeline - under Configure section, everything works as expected. The issue is with for second parameter - the value is not sent to the ScriptletScript when first drop-down value changes. How should I link the referenced parameter to the scriptlet script I'm using - what do I have to send ? The problem is that when changing selection on data center, nothing happens for environment types list, which is a CascadeChoiceParameter with referencedParameters: 'DataCenter'. The data center is of type ChoiceParameter the list is retrieved from a database when the data center changes in the drop-down list, the environment types should populate accordingly, also from the database, through a ScriptlerScript. a data center (can have multiple environment types).I'm declaring 2 parameters in properties section of a Jenkins pipeline:
0 Comments
Leave a Reply. |