[SDFAB-872] Allow to use local maven cache via env variable

If USE_LOCAL_SNAPSHOT_ARTIFACTS=true while we are building from source code, it will use the 
snapshot artifacts in local maven cache rather than fetching from remote repositories. It is not 
effective when we are not building from source code.

Change-Id: I10cbaac0601eff40b1a7cb7c45c532bb17914c0d
diff --git a/publish-local.sh b/publish-local.sh
new file mode 100755
index 0000000..66e0e6f
--- /dev/null
+++ b/publish-local.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+#
+# Copyright 2022-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# This script is run inside a container (minideb:buster) with ONOS codebase sitting in ONOS_ROOT env var
+set -eu -o pipefail
+
+# install dependencies required by the onos-publish script
+apt-get update && apt-get install -y curl build-essential python python-pip
+pip install requests
+curl -L -o bazelisk https://github.com/bazelbuild/bazelisk/releases/download/v1.5.0/bazelisk-linux-amd64
+chmod +x bazelisk && mv bazelisk /usr/bin/bazel
+
+#shellcheck source=/dev/null
+source "${ONOS_ROOT}"/tools/dev/bash_profile
+
+cd "${ONOS_ROOT}"
+onos-publish -l