I added an Execute Shell build step in my jenkins job.
I need to start Oracle NoSQL shell and run some DDLs.
I wrote shell script.
#Run Client
java -jar /root/software/kv-3.2.5/lib/kvcli.jar -host localhost -port 5000
#Run scripts
plan remove-table -name PersonnelUni1To1FK -wait
plan remove-table -name HabitatUni1To1FK -wait
When I excecute the same from my teminal, it's working fine. Becuase after 1st command database shell started and remaining scripts ran over that shell.
But build failed in Jenkins.
Jenkins job console output:
+java -jar /root/software/kv-3.2.5/lib/kvcli.jar -host localhost -port 5000
kv-> + plan remove-table -name PersonnelUni1To1FK -wait /tmp/hudson2708562803834708095.sh: line 17: plan: command not found
Build step 'Execute shell' marked build as failure
Its trying to execute this all on my ubuntu shell not on database shell.