I'm trying to setup my company's first CI/CD pipeline, to build & deploy docker containers in gke, it has been a a great learning curve so far, however I'm stuck with error in Jenkinsfile

/var/lib/jenkins/workspace/PipelineJobName/dir_command@tmp/durable-f390eb74/script.sh: 1: /var/lib/jenkins/workspace/PipelineJobName/dir_command@tmp/durable-f390eb74/script.sh: Git: not found

please note that entire pipeline job is successful with this error being reported at the end to make it look like job failed. following is my relevant jenkinsfile.

stage("staging deployment")
    sh 'mkdir -p ice_setup'
      sh 'git add .'
      sh "git commit -m '${COMMIT_MSG}'"
      sh "git push origin ${AI_LABS_REPO_BRANCH}"

Jenkins version 2.176.3

any help is greatly appreciated.

  • I have resolved it, it was unintentional but i have used sh in place of echo. it was my mistake, but keeping this question alive since it may help others. – cross_handle Nov 3 '20 at 3:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.