Project and Portfolio Management Practitioners Forum
cancel

Setting env in PPM deployment module

Highlighted
davecal
Regular Contributor.

Setting env in PPM deployment module

Hi Guys,

Im trying to automate some simple steps below

ssh server

root su – user

sh 

. `fin_env uat uat -s sh` 

cd $ERP/bin

But I cant set the environment, PPM just stops at sh command

This is what my object type looks like

ksc_connect_dest_server

sh

. `fin_env [DEST_ENV.DB_CONNECT_STRING] [DEST_ENV.DB_CONNECT_STRING] -s sh`


cd $ERP/bin

any ideas how i can set the env?

Thanks Dave

 

3 REPLIES
Dennis Handly
Acclaimed Contributor.

Re: Setting env in PPM deployment module

What do you expect that sh to do?  You need to provide a script to execute.

Jim Esler
Acclaimed Contributor.

Re: Setting env in PPM deployment module

To expand a bit on the reply from Dennis: PPM executes a single command and waits for it to complete. An sh command that does not have a command specified as a parameter does not complete. Instead, it prompts for a command line to be entered interactively. Your sh command line is waiting for a command to be entered while PPM is waiting for the sh command to complete.

We have used a couple of methods to execute commands. One is to place the commands on the sh command as Dennis suggested. Another is to write a series of commands of commands to a file and execute the file. Scripts can also be created with the special commands ksc_begin_script and ksc_end_script.

Dennis Handly
Acclaimed Contributor.

Re: Setting env in PPM deployment module

>One is to place the commands on the sh command

 

This can be done with:

sh -c "comman1; comman2; ..."

Or with a here doc:

sh <<EOF

command1

command2

EOF

 

>is to write a series of commands of commands to a file and execute the file.

 

That's the most obvious way.