Separate CI and presubmit artifacts

Store artifacts for presubmit builds in a separate directory based on
the build ID to avoid overwrting CI builds with the same kernel version.

BUG=b/204367125
TEST=presubmit
RELEASE_NOTE=None

Change-Id: I67b93a523c16b97bce7699224c9fee64137a4c22
Reviewed-on: https://cos-review.googlesource.com/c/third_party/kernel/+/28480
Reviewed-by: Meena Shanmugam <meenashanmugam@google.com>
Tested-by: Oleksandr Tymoshenko <ovt@google.com>
diff --git a/google/kokoro/build.sh b/google/kokoro/build.sh
index d10c2b3..0a46115 100644
--- a/google/kokoro/build.sh
+++ b/google/kokoro/build.sh
@@ -44,7 +44,16 @@
   fi
 done
 
-GCS_DIR=${GCS_PATH}/${KERNEL_VERSION}
+if [[ "${KOKORO_JOB_TYPE}" = CONTINUOUS_INTEGRATION ]]; then
+  GCS_DIR="${GCS_PATH}/${KERNEL_VERSION}"
+elif [[ "${KOKORO_JOB_TYPE}" = "PRESUBMIT_GERRIT_ON_BORG" ]]; then
+  # store presubmit artifacts into dedicated folder
+  # so they could be used in further tests/qualification
+  GCS_DIR="${GCS_PATH}/presubmit/${KOKORO_BUILD_ID}"
+else
+  echo "Unknown Kokoro job type: '${KOKORO_JOB_TYPE}'"
+  exit 1
+fi
 
 for arch in 'x86' 'arm64'
 do