On Friday, April 28, 2017 at 7:54:42 PM UTC+5:30, Ramanathan Muthaiah wrote:
>
> Hello,
>
> Am using parameters( [ . . . ] ) inside the pipeline script to define the
> values for the various parameters. These params are used while invoking
> packer tool.
>
> properties([
> parameters([
> string(name: 'region', defaultValue: 'us-west-2',
> description: ''),
> text(defaultValue: '"us-west-2, us-west-1"', description: '', name:
> 'ami_regions')
> ])
> ])
>
>
> For the packer tool, among other variables, I need to pass multiple region
> names, like this,
>
> packer -var ami_regions="us-west-2, us-west-1" . . .
>
> Am able to access them like, ${params.ami_regions} but then the double
> quote is missing and the input to packer cmd is partial i.e. us-west-1 is
> missed out.
>
> Does anybody know why is this ? And, is there a better way to handle this,
> via some groovy script embedded within the pipeline ?
>
Solution:
Retaining the same config values in the "properties" (step ?), I was able
to get over this problem with only minor change to this:
text(defaultValue: 'us-west-2,us-west-1', description: 'AWS regions to copy
AMI', name: 'ami_regions')
Removed the single blank space between the two values and double quotes at
the start and end.
/Ram
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/723f2c5d-4738-481f-89db-32333198522f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.