-
Bug
-
Resolution: Unresolved
-
Minor
-
Jenkins 2.98
I am trying to fetch a list of branches from git in the active choice reactive reference parameter.I am using the run groovy script option.
But the script is ran twice when I check the tomcat logs.
Because of which the drop down is rendered twice.
Please find the below script
def html= ''' <div style="padding-top:-2em;margin-left:1em;"> <select id="module" style="height:2.2em;width:10.8em" name="value"> <option value="">Select...</option> ''' def cmd = ["/bin/bash", "-c","sudo sh /home/centos/JenkinScripts/dynamicChoices/getBranchesFromGit.sh https://KGJenkins@bitbucket.org/vtakru/escloudadmin.git"] def sout = new StringBuffer() def serr = new StringBuffer() // Run the command println "running "+cmd def proc = cmd.execute() proc.consumeProcessOutput ( sout, serr ) proc.waitFor() def options="" sout.tokenize().each{ branch-> if(branch.contains("refs/heads/")){ branch=branch.minus("refs/heads/") println "Branch "+branch options+="<option value=$branch>$branch</option>" } } html+=options return html
Please help me with this issue
What version of AC are you working with. Can you please, report if this issue is present in the most recent AC plugin v2.1. Thank you.