jenkinsjenkins-pipelinejenkins-groovysap-project-piper

Jenkins neo.sh not found error while using SAP Project Piper Library


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.


Solution

  • 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