title: Error running gcloud scripts in a pipeline in jenkins
body: <p>I create an application of Jenkins in Kubernetes using the marketplace click-to-deploy from the Google cloud platform when I want to use the GCloud command after installing the Gcloud plugin appears the Log message:</p>
  
  <p>This is the <strong>pipeline</strong>.</p>
  
  <pre><code>def project = 'my-project'
  def appName = 'my_app-name'
  def zone = 'us-east1-d'
  def feSvcName = "${appName}"
  def imageTag = "gcr.io/${project}/${appName}:${env.BRANCH_NAME}.${env.BUILD_NUMBER}"
  
  pipeline {
    agent  any
      stages {
        stage('Test') {
          steps {  
            sh " echo Test is not avalaible"
          }
        }
      stage('Build and push image with Container Builder') {
        steps {
          container('gcloud') {
            sh "cd .."
            sh "PYTHONUNBUFFERED=1 gcloud builds submit -t ${imageTag} ."
          }
        }
      }
      stage('Deploy Development') {
        // Canary branch
        when { branch 'develop' }
        steps {
          container('kubectl') {
            sh ("echo BRANCH develop is not avalaible")
  
          }
        }
      }
      stage('Deploy Test') {
        // Canary branch
        when { branch 'develop' }
        steps {
          container('kubectl') {
            sh ("echo BRANCH develop is not avalaible")
  
          }
        }
      }
      stage('Deploy Production') {
        // Production branchh
        when { branch 'master' }
        steps {
          container('kubectl') {
            sh ("echo BRANCH Master is not avalaible")
  
          }
        }
      }
  
    }
  }
  </code></pre>
  
  <p><strong>LOG</strong></p>
  
  <pre><code> &gt; git rev-parse --is-inside-work-tree # timeout=10
  Setting origin to https://source.developers.google.com/p/test-jalfonso/r/hello-app
   &gt; git config remote.origin.url https://source.developers.google.com/p/test-jalfonso/r/hello-app # timeout=10
  Fetching origin...
  Fetching upstream changes from origin
   &gt; git --version # timeout=10
   &gt; git config --get remote.origin.url # timeout=10
  using GIT_ASKPASS to set credentials test-jalfonso
   &gt; git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/*
  Seen branch in repository origin/master
  Seen branch in repository origin/test
  Seen 2 remote branches
  Obtained Jenkinsfile from 3e1b0fd042813f25f4761bec13a50646d7a3fccf
  Running in Durability level: MAX_SURVIVABILITY
  [Pipeline] Start of Pipeline
  [Pipeline] node
  Running on Jenkins in /var/jenkins_home/workspace/test-jalfonso_test@2
  [Pipeline] {
  [Pipeline] stage
  [Pipeline] { (Declarative: Checkout SCM)
  [Pipeline] checkout
  using credential source:test-jalfonso
  Cloning the remote Git repository
  Cloning with configured refspecs honoured and without tags
  Cloning repository https://source.developers.google.com/p/test-jalfonso/r/hello-app
   &gt; git init /var/jenkins_home/workspace/test-jalfonso_test@2 # timeout=10
  Fetching upstream changes from https://source.developers.google.com/p/test-jalfonso/r/hello-app
   &gt; git --version # timeout=10
  using GIT_ASKPASS to set credentials test-jalfonso
   &gt; git fetch --no-tags --progress https://source.developers.google.com/p/test-jalfonso/r/hello-app +refs/heads/*:refs/remotes/origin/*
   &gt; git config remote.origin.url https://source.developers.google.com/p/test-jalfonso/r/hello-app # timeout=10
   &gt; git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
   &gt; git config remote.origin.url https://source.developers.google.com/p/test-jalfonso/r/hello-app # timeout=10
  Fetching without tags
  Fetching upstream changes from https://source.developers.google.com/p/test-jalfonso/r/hello-app
  using GIT_ASKPASS to set credentials test-jalfonso
   &gt; git fetch --no-tags --progress https://source.developers.google.com/p/test-jalfonso/r/hello-app +refs/heads/*:refs/remotes/origin/*
  Checking out Revision 3e1b0fd042813f25f4761bec13a50646d7a3fccf (test)
   &gt; git config core.sparsecheckout # timeout=10
   &gt; git checkout -f 3e1b0fd042813f25f4761bec13a50646d7a3fccf
  Commit message: "test"
  &gt; git rev-list --no-walk f0d84e4bb46eff9acd4a79f93013f8eca20370c9 # timeout=10
  [Pipeline] }
  [Pipeline] // stage
  [Pipeline] withEnv
  [Pipeline] {
  [Pipeline] stage
  [Pipeline] { (Test)
  [Pipeline] sh
  + echo Test is not avalaible
  Test is not avalaible
  [Pipeline] }
  [Pipeline] // stage
  [Pipeline] stage
  [Pipeline] { (Build and push image with Container Builder)
  [Pipeline] sh
  + echo Not available
  Not available
  [Pipeline] sh
  + gcloud builds submit -t gcr.io/my-project/my-app-name:master.23 .
  /var/jenkins_home/workspace/test_master@tmp/durable-1d490c65/script.sh: 1: /var/jenkins_home/workspace/test_master@tmp/durable-1d490c65/script.sh: gcloud: not found
  [Pipeline] }
  [Pipeline] // stage
  [Pipeline] stage
  [Pipeline] { (Deploy Development)
  Stage "Deploy Development" skipped due to earlier failure(s)
  [Pipeline] }
  [Pipeline] // stage
  [Pipeline] stage
  [Pipeline] { (Deploy Test)
  Stage "Deploy Test" skipped due to earlier failure(s)
  [Pipeline] }
  [Pipeline] // stage
  [Pipeline] stage
  [Pipeline] { (Deploy Production)
  Stage "Deploy Production" skipped due to earlier failure(s)
  [Pipeline] }
  [Pipeline] // stage
  [Pipeline] }
  [Pipeline] // withEnv
  [Pipeline] }
  [Pipeline] // node
  [Pipeline] End of Pipeline
  ERROR: script returned exit code 127
  Finished: FAILURE
  
  </code></pre>
  
  <p>I tried to search the folder installation of the SDK of Google but I can't found any, I don't know if is an issue of the Deploy.
  I expected just upload my Dockerfile to the source repository but if I use a script with Gcloud appears this log, I installed all the plugins for Google auth, SDK, Kubernetes and I configure the Kubernetes in the Jenkins Config, I export the keys from Google Cloud.</p>