-3

I am setting up a CI/CD pipeline scenario for SCP NEO environment based on the prebuilt pipeline on Project Piper. I tried to execute a pre-built library called Project Piper for Jenkins and I got the following error. The error seems neo.sh is not found. But I downloaded neo SDK and placed it in the neo-sdk folder. Also neo.sh is available inside /opt/sap/neo-sdk/neo-java-web-sdk-3.39.10/tools folder in linux.

Please see error in Jenkins

enter image description here

Please see .pipeline/config file where that location is referenced

steps: 
  mtaBui1d: 
    buildTarget: 'NEO' 
    mtaJarLocation: '/opt/sap/mta.jar' 
  neoDeploy: 
    neoHome: '/opt/sap/neo-sdk/'
    neo: 
      credentialsId: 'NEO DEPLOY'
      account: 
      host: 'hana.ondemand.com'

Docker is not used and I set-up Jenkins in ubuntu inside Vmware virtual machine. If the docker is not available, the library is capable of running locally in Jenkins server.

I am keeping neo-sdk tool in a local folder which contain neo.sh which is used to deploy application to SAP Cloud Platform. I am not writing any script my own as everything is prebuilt scripts from Project piper.

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
coolcoder
  • 27
  • 1
  • 9
  • The first error in the first screenshot seems to be `docker: not found` - looks like Docker is either not installed or not accessible to Jenkins. Sometimes it helps to look for a line beginning with `+ ` which indicates a started command and try to run the same command in a similar environment to see what might be blocking it. – V-R Feb 03 '20 at 15:20
  • @V-R Docker is not used and I set-up Jenkins in ubuntu inside Vmware virtual machine.If the docker is not available,the library is capable of running locally in Jenkins server as seen below docker: not found – coolcoder Feb 03 '20 at 15:28

2 Answers2

0

As already state in the GH issue you should extend your PATH env var to also look inside /opt/sap/neo-sdk/neo-java-web-sdk-3.39.10/tools.

You do this by executing export PATH=$PATH:/opt/sap/neo-sdk/neo-java-web-sdk-3.39.10/tools.

Or an even better way would be to symlink the neo.sh into a folder that is already on the PATH.

With echo $PATH you can display the env var and have a look which directories are already exposed.

Christopher
  • 1,103
  • 1
  • 6
  • 18
0

Issue is solved and thanks both of you for the same. I used envInjecter Plugin in Jenkins. Then go to manage jenkins->Configure->Set environment variables and set path as in enter image description here

For more detail see the comment from XP84 in this StackOverflow link

coolcoder
  • 27
  • 1
  • 9