Adopt gatling-gerrit-test job to the gerrit-ci environment

Add DOCKER_HOST environment variable. Replace GERRIT_CREDENTIALS_ID
environment variable with actual credentials id

Feature: Issue 13397
Change-Id: Ieb7d6981abfc48786316ffda461593d8ffc0bf7d
diff --git a/jenkins/gatlingTestPipeline.groovy b/jenkins/gatlingTestPipeline.groovy
index a743281..a4f15c4 100644
--- a/jenkins/gatlingTestPipeline.groovy
+++ b/jenkins/gatlingTestPipeline.groovy
@@ -30,8 +30,11 @@
         }
         stages{
             stage("Setup single-master aws stack") {
+                environment {
+                    DOCKER_HOST = sh(script: """/sbin/ip route|awk '/default/ {print "tcp://"\$3":2375"}'""", , returnStdout: true).trim()
+                }
                 steps {
-                    withCredentials([usernamePassword(usernameVariable: "GS_GIT_USER", passwordVariable: "GS_GIT_PASS", credentialsId: env.GERRIT_CREDENTIALS_ID)]) {
+                    withCredentials([usernamePassword(usernameVariable: "GS_GIT_USER", passwordVariable: "GS_GIT_PASS", credentialsId: "gerrit.googlesource.com")]) {
                         sh 'echo "machine gerrit.googlesource.com login $GS_GIT_USER password $GS_GIT_PASS">> ~/.netrc'
                         sh 'chmod 600 ~/.netrc'
                         sh 'rm -rf aws-gerrit'
@@ -66,6 +69,7 @@
 
                                 writeFile(file:"setup.env", text: setupData)
                             }
+                            sh 'echo "Docker host: $DOCKER_HOST"'
                             sh "make AWS_REGION=${AWS_REGION} AWS_PREFIX=${AWS_PREFIX} create-all"
                          }
                      }