login Signup

what is the ectool runProcedure syntax for supplying values to a credential parameter

Credential parameters have both username and password fields under a single parameter name. How does that work when executing ectool runProcedure?

Specific use case is trying to script the creation of multiple configurations for the EC-JBoss plugin's createConfiguration procedure

Ex: ectool runProcedure EC-JBoss- createConfiguration --actualParameter config="My Test Config" --actualParameter credential=????? -- actualParameter jboss_url="abc123" ...etc.

avatar image By david 131 asked Feb 15 at 06:08 PM
more ▼
(comments are locked)
10|750 characters needed characters left

2 answers: sort voted first

Great question.

For ectool, this syntax worked for me:

 $   echo "123456" | ectool runProcedure PROJ --procedureName PROC  --credential foo=user1 --actualParameter cred1=foo
 user1 password: 

A few explanations:

  • the password is queried as you can see from the "user1 password line" so to avoid the interaction I pass the password to the command ("123456" in my example). I also tried the --password option but it did not help

  • "foo" is a temporary credential name to which I pass the user ("user1")

  • "cred1" is the name of my credential parameter (in my procedure) to which I pass my temporary "foo"

I also just published an example written in DSL at https://github.com/electric-cloud/DSL-Samples/blob/master/createConfiguration.groovy

avatar image By lrochette 5.9k answered Feb 18 at 06:14 PM
more ▼
(comments are locked)
10|750 characters needed characters left

Hi Laurent,

I keep getting the same error when I try to run a procedure with ectool adding --credential argument.

My code: --credential cred="username" --actualParameter "cred1=cred" "username" password: pass

After running this it prompts for username password: I provide the password and I get: ectool error [InvalidName]: Actual parameter name is required and must be between 1 and 255 characters

avatar image By zamorasu 0 answered Apr 25 at 03:28 PM
more ▼
(comments are locked)
avatar image lrochette Apr 25 at 06:47 PM

there is no way that I know to pass the password as a parameter. I was able to do it only with the "echo" trick I show above

Have you tried this way?

10|750 characters needed characters left
Your answer
toggle preview:

Up to 8 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.