title: jenkins pipeline using gcloud is not working
body: <p>I'm trying to set up jenkins pipeline using gcloud but I'm getting the following error:</p>
  
  <blockquote>
    <p>gcloud auth activate-service-account --key-file
    ./service-account-creds.json WARNING: Could not setup log file in
    /.config/gcloud/logs, (Error: Could not create directory
    [/.config/gcloud/logs/2019.02.07]: Permission denied.</p>
  </blockquote>
  
  <p>the code:</p>
  
  <pre><code>stages {
          stage('build') {
              steps {
                  withCredentials([file(credentialsId: 'google-container-registry', variable: 'GOOGLE_AUTH')]) {
                      script {
                          docker.image('google/cloud-sdk:latest').inside {
                              sh "echo ${GOOGLE_AUTH} &gt; gcp-key.json"
                              sh 'gcloud auth activate-service-account --key-file ./service-account-creds.json'
                          }
                      }
                  }
              }
          }
      }
  </code></pre>
  
  <p>Jenkins is running in a container using the imagen jenkins/jenkins</p>