Allow staging images only on OOM staging branch 32/90532/1
authorGary Wu <gary.wu@futurewei.com>
Wed, 26 Jun 2019 15:08:11 +0000 (08:08 -0700)
committerGary Wu <gary.wu@futurewei.com>
Wed, 26 Jun 2019 15:08:11 +0000 (08:08 -0700)
Issue-ID: INT-1055
Signed-off-by: Gary Wu <gary.wu@futurewei.com>
Change-Id: Idde622a1b4160f6f87b42e0252d902b5f3dd84d4

jjb/oom/oom-helm.yaml

index 5a7d377..1388620 100644 (file)
         #!/bin/bash
         set -e -o pipefail
         cd kubernetes/
-        if grep -r -n -E ':\s*onap/.*:.*(STAGING|SNAPSHOT|latest).*'; then
-          echo "[ERROR] Only release images are allowed in helm charts."
-          exit 1
+        if [ "$GERRIT_BRANCH" != "staging" ]; then
+          if grep -r -n -E ':\s*onap/.*:.*(STAGING|SNAPSHOT|latest).*'; then
+            echo "[ERROR] Only release images are allowed in helm charts."
+            exit 1
+          fi
         fi
         make all
     subproject_build_script: |
         #!/bin/bash
         cd kubernetes/
-        if grep -r -n -E ':\s*onap/.*:.*(STAGING|SNAPSHOT|latest).*'; then
-          echo "[ERROR] Only release images are allowed in helm charts."
-          exit 1
+        if [ "$GERRIT_BRANCH" != "staging" ]; then
+          if grep -r -n -E ':\s*onap/.*:.*(STAGING|SNAPSHOT|latest).*'; then
+            echo "[ERROR] Only release images are allowed in helm charts."
+            exit 1
+          fi
         fi
         make common
         make {subproject}