Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-41038

extensible-choice-parameter , under a name "Release" we have some choices, need an api to fetch all the choices

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      In Jenkins plugin extensible-choice-parameter , under a name "Release" we have some choices, need an api to fetch all the choices. so that for automation we could could validat ethe choices and could have a optimized automation to send request to jenkins.

      As of now i have found a workaround - have written the below script and i am executing this on my jenkins server from my automation controller using paramiko to get the list of available choices.

      Please let me know if there is any api present to fetch the choices under different name already available ?

      filename="/var/lib/Jenkins/jp.ikedam.jenkins.plugins.extensible_choice_parameter.GlobalTextareaChoiceListProvider.xml";
      release_tag="";
      len=0;
      start=1;
      while read -r line;
      do
      if [[ $len -gt 0 && $line == "<string></string>" ]];
      then echo $release_tag; exit 0;
      elif [[ $line == "<string></string>" ]];
      then
      start=0;
      len=`expr $len + 1`;
      else if [[ $start -eq 0 ]];
      then line=${line#"<string>"};
      line=${line%"</string>"};
      release_tag+=$line;
      release_tag+=",";
      len=`expr $len + 1`
      fi
      fi
      done < "$filename"

        Attachments

          Activity

          Show
          justsanjeev Sanjeev Rohila added a comment - However i found the below documentation but id did not help me much http://javadoc.jenkins.io/plugin/extensible-choice-parameter/index.html?jp/ikedam/jenkins/plugins/extensible_choice_parameter/GlobalTextareaChoiceListProvider.DescriptorImpl.html

            People

            Assignee:
            000panther Paul Weber
            Reporter:
            justsanjeev Sanjeev Rohila
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: