title: Jenkins: how to run shell script
body: <p>Jenkins could not run shell script. I've installed Jenkins on my kubernetes cluster. 
  Here is the part of build console output:</p>
  
  <pre><code>    Start building Frontend and Backend Docker images
  [Pipeline] }
  [Pipeline] container
  [Pipeline] {
  [Pipeline] container
  [Pipeline] {
  [Pipeline] echo
  Building Bmf Frontend Image
  [Pipeline] sh
  [Pipeline] echo
  Buildinging Bmf Backend Images
  [Pipeline] sh
  + chmod +x build.sh
  [Pipeline] // stage
  [Pipeline] }
  [Pipeline] sh
  + chmod +x build.sh
  [Pipeline] sh
  + ./build.sh --build_bmf_frontend
  build.sh - Script for building the  Web Application, Docker image and Helm chart
  Usage: ./build.sh &lt;options&gt;
  --build_bmf_frontend    : [optional] Build Bmf Frontend image
  --build_bmf_backend     : [optional] Build Bmf Backend image
  --push_bmf_frontend     : [optional] Push Bmf Frontend image
  --push_bmf_backend      : [optional] Push Bmf Backend image
  --delete_frontend       : [optional] Delete Bmf Frontend image
  --delete_backend        : [optional] Delete Bmf Backend image
  --deploy_stage          : [optional] Deploy to Stage Server
  --deploy_production     : [optional] Deploy to Production Server
  --registry reg          : [optional] A custom docker registry
  --docker_usr user       : [optional] Docker registry username
  --docker_psw pass       : [optional] Docker registry password
  --tag tag               : [optional] A custom app version
  -h | --help             : Show this usage
  [Pipeline] }
  [Pipeline] // container
  [Pipeline] }
  [Pipeline] // stage
  [Pipeline] }
  </code></pre>
  
  <p>The job is executed on kubernetes worker provisioned from template Kubernetes Pod Template.</p>
  
  <p>Here is my Jenkinsfile command:</p>
  
  <pre><code>stage('Build BMF Frontend') {
            steps {
              container('jnlp') {
              echo 'Building Bmf Frontend Image'
              sh "chmod +x build.sh"
              sh "./build.sh --build_bmf_frontend"
            }
            }
          }
  </code></pre>
  
  <p>Below is a screenshot of my Jenkins workspace;</p>
  
  <p><img src="https://i.stack.imgur.com/XBXPo.png" alt="This is my workspace"></p>