Skip to main content

How to create a key-value Choice Parameter?

Comments

2 comments

  • Jussi Hallila

    Note that if values have duplicate values the descriptions don't differ either. This doesn't really achieve proper key-value parameter.

    0
  • Pramod Nair

    I been trying to use extensible choice parameter to get the list of instance that is available in my AWS account so that I can pass the same to reboot or other day2 activities and thus automating.

    Within Extensible Choice Parameter I used System groovy Choice parameter and wrote below groovy script to get the details :

    ls = "aws ec2 describe-instances --query Reservations[*].Instances[*].{Instance:InstanceId} --region ap-south-1 --output text".execute().text
    def list = ls.readLines()
    return list

    While running this I am not getting any details or list of instances also there is no error in jenkins, while if I am using this script on my server shell it gives me the list. Can you please help me with what could be the reason for this.

    0

Please sign in to leave a comment.

About CloudBees Support

Our Support Engineers are available to help with any questions or problems you may have with any of our products.