How to set the output of shell script in a variable in yaml?

166 views Asked by At

I am pretty new in yaml and I wanted to put the output value of shell script in a variable.

This below command is written in groovy language and I wanted to convert it into yaml

rpackval= sh returnstdout: true, script: "some sfdx command"

In yaml I was trying something like this

  variables:  
     rpackval:
        - shell: returnstdout: true  
  script:  
      - sfdx command

But it is giving me this syntax error!

variables config should be a hash of key value pairs.

0

There are 0 answers