Gerrit review tool wrapper updates 60/131360/3
authorVijay Venkatesh Kumar <vv770d@att.com>
Mon, 3 Oct 2022 18:10:44 +0000 (18:10 +0000)
committerVijay Venkatesh Kumar <vv770d@att.com>
Mon, 3 Oct 2022 18:42:13 +0000 (18:42 +0000)
"-G" added to pulls all required parameters from the environment
+ support for arguments to be passed for OGR at individual project level

Change-Id: I223c70385827426b924187bec75960b31bf31163
Signed-off-by: Vijay Venkatesh Kumar <vv770d@att.com>
Issue-ID: DCAEGEN2-3293
Signed-off-by: Vijay Venkatesh Kumar <vv770d@att.com>
shell/onap-gerrit-review-wrapper.sh

index 0195b80..26a8dfb 100755 (executable)
 # limitations under the License.
 # ============LICENSE_END=========================================================
 
+# Note that all arguments passed to this script are passed on to
+# onap-gerrit-review (OGR) tool
+
+# You can invoke this script with the -E flag to give a non-blocking report.
+# You can also pass in arguments to turn off certain messages using the -m option, such as:
+# -m text-before-copyright -m misnamed-license-txt
+
+# These options can be included in project job templates where the wrapper script
+# is being invoked under pre-build-script hooks
+
 set -eu
 echo "--> onap-gerrit-review-wrapper.sh"
 
@@ -32,7 +42,4 @@ rm -Rf /tmp/ogr
 export PATH=$PATH:/tmp/ogr/onap-gerrit-review/bin
 
 # Execute OGR
-onap-gerrit-review -S git pull "https://gerrit.onap.org/r/$GERRIT_PROJECT" "$GERRIT_REFSPEC"
-# Use -E flag for non-blocking report
-# onap-gerrit-review -S -E git pull "https://gerrit.onap.org/r/$GERRIT_PROJECT" "$GERRIT_REFSPEC"
-
+onap-gerrit-review -S -G "$@"