Update build configurations for stable-3.0

Change-Id: Ic6b4876213a4aeebdbd549249da2f44d69507e21
diff --git a/jenkins/gerrit-bazel-test.sh b/jenkins/gerrit-bazel-test.sh
index 0beb6c2..1cdb166 100755
--- a/jenkins/gerrit-bazel-test.sh
+++ b/jenkins/gerrit-bazel-test.sh
@@ -18,14 +18,14 @@
   bazel test --test_env=GERRIT_NOTEDB=OFF $BAZEL_OPTS //...
 fi
 
-if [ "{branch}" == "master" ] || [ "{branch}" == "stable-2.16" ] || [ "{branch}" == "stable-2.15" ]
+if [ "{branch}" == "master" ] || [ "{branch}" == "stable-3.0" ] || [ "{branch}" == "stable-2.16" ] || [ "{branch}" == "stable-2.15" ]
 then
   echo 'Test in NoteDb mode'
   echo '----------------------------------------------'
   bazel test --test_env=GERRIT_NOTEDB=ON $BAZEL_OPTS //...
 fi
 
-if [ "{branch}" == "master" ] || [ "{branch}" == "stable-2.16" ] || [ "{branch}" == "stable-2.15" ] || [ "{branch}" == "stable-2.14" ]
+if [ "{branch}" == "master" ] || [ "{branch}" == "stable-3.0" ] || [ "{branch}" == "stable-2.16" ] || [ "{branch}" == "stable-2.15" ] || [ "{branch}" == "stable-2.14" ]
 then
   echo 'Test PolyGerrit locally'
   echo '----------------------------------------------'
diff --git a/jenkins/gerrit-bazel-verifier-test.sh b/jenkins/gerrit-bazel-verifier-test.sh
index 7fabf0a..96d3167 100755
--- a/jenkins/gerrit-bazel-verifier-test.sh
+++ b/jenkins/gerrit-bazel-verifier-test.sh
@@ -27,7 +27,7 @@
   bazel test $GERRIT_NOTEDB $BAZEL_OPTS //...
 fi
 
-if [[ "$TARGET_BRANCH" == "master" || "$TARGET_BRANCH" == "stable-2.16" || "$TARGET_BRANCH" == "stable-2.15" || "$TARGET_BRANCH" == "stable-2.14" ]]
+if [[ "$TARGET_BRANCH" == "master" || "$TARGET_BRANCH" == "stable-3.0" || "$TARGET_BRANCH" == "stable-2.16" || "$TARGET_BRANCH" == "stable-2.15" || "$TARGET_BRANCH" == "stable-2.14" ]]
 then
   if [[ "$MODE" == *"polygerrit"* ]]
   then
diff --git a/jenkins/gerrit-buck-bazel-template.yaml b/jenkins/gerrit-buck-bazel-template.yaml
index 57ef8d1..de4f943 100644
--- a/jenkins/gerrit-buck-bazel-template.yaml
+++ b/jenkins/gerrit-buck-bazel-template.yaml
@@ -78,7 +78,7 @@
              - job-extended-read
     dsl: |
       retries = 3
-      type = '{branch}' in ['stable-2.16', 'stable-2.15', 'stable-2.14','master'] ? 'bazel' : 'buck'
+      type = '{branch}' in ['master', 'stable-3.0', 'stable-2.16', 'stable-2.15', 'stable-2.14'] ? 'bazel' : 'buck'
       parallel (
         {{ retry ( retries ) {{ build( "Gerrit-$type-{branch}" ) }} }}
       )
@@ -183,6 +183,7 @@
     name: Gerrit-bazel
     branch:
       - master
+      - stable-3.0
       - stable-2.16
       - stable-2.15
       - stable-2.14
@@ -193,6 +194,7 @@
     name: Gerrit-build-flow
     branch:
       - master
+      - stable-3.0
       - stable-2.16
       - stable-2.15
       - stable-2.14
diff --git a/jenkins/gerrit-mvn-build-plugin.sh b/jenkins/gerrit-mvn-build-plugin.sh
index 5669a1c..e5c717a 100644
--- a/jenkins/gerrit-mvn-build-plugin.sh
+++ b/jenkins/gerrit-mvn-build-plugin.sh
@@ -1,7 +1,7 @@
 #!/bin/bash -e
 
 
-if [ "{branch}" == "master" ] || [ "{branch}" == "stable-2.16" ] || [ "{branch}" == "stable-2.15" ] || [ "{branch}" == "stable-2.14" ]
+if [ "{branch}" == "master" ] || [ "{branch}" == "stable-3.0" ] || [ "{branch}" == "stable-2.16" ] || [ "{branch}" == "stable-2.15" ] || [ "{branch}" == "stable-2.14" ]
 then
   git read-tree -u --prefix=gerrit gerrit/{branch}
   . set-java.sh 8
diff --git a/jenkins/gerrit-verifier-change.groovy b/jenkins/gerrit-verifier-change.groovy
index 3530e26..befb351 100644
--- a/jenkins/gerrit-verifier-change.groovy
+++ b/jenkins/gerrit-verifier-change.groovy
@@ -30,7 +30,7 @@
   }
 
   static String addVerifiedTag = ciTag("addVerified")
-  static Set<String> codeStyleBranches = ["master", "stable-2.16", "stable-2.15", "stable-2.14"]
+  static Set<String> codeStyleBranches = ["master", "stable-3.0", "stable-2.16", "stable-2.15", "stable-2.14"]
   static resTicks = [ 'ABORTED':'\u26aa', 'SUCCESS':'\u2705', 'FAILURE':'\u274c' ]
 }
 
@@ -307,7 +307,7 @@
   println "Building Change " + changeUrl
   build.setDescription("""<a href='$changeUrl' target='_blank'>Change #$changeNum</a>""")
 
-  if(branch == "master") {
+  if(branch == "master" || branch == "stable-3.0") {
     modes = ["notedb"]
   }
   else if(branch == "stable-2.15" || branch == "stable-2.16") {
@@ -316,7 +316,7 @@
     modes = ["reviewdb"]
   }
 
-  if(branch == "master" || branch == "stable-2.16" || branch == "stable-2.15" || branch == "stable-2.14") {
+  if(branch == "master" || branch == "stable-3.0" || branch == "stable-2.16" || branch == "stable-2.15" || branch == "stable-2.14") {
     def changedFiles = gerrit.getChangedFiles(changeNum, sha1)
     def polygerritFiles = changedFiles.findAll { it.startsWith("polygerrit-ui") }
 
diff --git a/jenkins/gerrit-verifier.yaml b/jenkins/gerrit-verifier.yaml
index 71fa98f..854b876 100644
--- a/jenkins/gerrit-verifier.yaml
+++ b/jenkins/gerrit-verifier.yaml
@@ -172,7 +172,7 @@
       - shell: |
          #!/bin/bash -xe
          cd gerrit
-         if ([ "$TARGET_BRANCH" == "master" ] || [ "$TARGET_BRANCH" == "stable-2.16" ] || [ "$TARGET_BRANCH" == "stable-2.15" ]) && git show --diff-filter=AM --name-only --pretty="" HEAD | grep polygerrit-ui
+         if ([ "$TARGET_BRANCH" == "master" ] || [ "$TARGET_BRANCH" == "stable-3.0" ] || [ "$TARGET_BRANCH" == "stable-2.16" ] || [ "$TARGET_BRANCH" == "stable-2.15" ]) && git show --diff-filter=AM --name-only --pretty="" HEAD | grep polygerrit-ui
          then
            echo 'Running PolyGerrit lint check...'
            . set-java.sh 8
@@ -182,7 +182,7 @@
       - shell: |
          #!/bin/bash -xe
          cd gerrit
-         if ([ "$TARGET_BRANCH" == "master" ] || [ "$TARGET_BRANCH" == "stable-2.16" ] || [ "$TARGET_BRANCH" == "stable-2.15" ]) && git show --diff-filter=AM --name-only --pretty="" HEAD | grep polygerrit-ui
+         if ([ "$TARGET_BRANCH" == "master" ] || [ "$TARGET_BRANCH" == "stable-3.0" ] || [ "$TARGET_BRANCH" == "stable-2.16" ] || [ "$TARGET_BRANCH" == "stable-2.15" ]) && git show --diff-filter=AM --name-only --pretty="" HEAD | grep polygerrit-ui
          then
            echo 'Running PolyGerrit template test...'
            . set-java.sh 8