From 35c2d18ecb68149329dae1287c44cbe0cc5cccb0 Mon Sep 17 00:00:00 2001
From: chausman <chausman@nrao.edu>
Date: Thu, 15 Jun 2023 10:53:29 -0600
Subject: [PATCH] don't forget production deploys too

---
 .gitlab-ci.yml             | 14 +++++++-------
 ci/bin/generate-go-yaml.py |  2 +-
 ci/bin/generate-yaml.py    |  2 +-
 ci/build.template.yml      |  2 +-
 ci/push.template.yml       |  2 +-
 ci/unit-test.template.yml  |  2 +-
 6 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e2624f30c..d3621d005 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -84,7 +84,7 @@ build-pex-base image:
       variables:
         # override DEPLOY_ENV
         DEPLOY_ENV: "test"
-    - if: '$CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+$/'
+    - if: '$CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+$/ || $CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$/'
       variables:
         DEPLOY_ENV: "prod"
 
@@ -116,7 +116,7 @@ build cache:
           variables:
             IMAGE_TAG: $CI_COMMIT_TAG
             VERSION: $CI_COMMIT_TAG
-        - if: '$CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+$/'
+        - if: '$CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+$/ || $CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$/'
           variables:
             IMAGE_TAG: $CI_COMMIT_TAG
             VERSION: $CI_COMMIT_TAG
@@ -307,7 +307,7 @@ pex generate yaml:
          variables:
            # override DEPLOY_ENV
            DEPLOY_ENV: "test"
-       - if: '$CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+$/'
+       - if: '$CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+$/ || $CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$/'
          variables:
            DEPLOY_ENV: "prod"
    artifacts:
@@ -330,7 +330,7 @@ pex child pipeline:
          variables:
            # override DEPLOY_ENV
            DEPLOY_ENV: "test"
-       - if: '$CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+$/'
+       - if: '$CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+$/ || $CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$/'
          variables:
            DEPLOY_ENV: "prod"
 
@@ -351,7 +351,7 @@ go generate yaml:
          variables:
            # override DEPLOY_ENV
            DEPLOY_ENV: "test"
-       - if: '$CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+$/'
+       - if: '$CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+$/ || $CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$/'
          variables:
            DEPLOY_ENV: "prod"
    artifacts:
@@ -374,7 +374,7 @@ go child pipeline:
          variables:
            # override DEPLOY_ENV
            DEPLOY_ENV: "test"
-       - if: '$CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+$/'
+       - if: '$CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+$/ || $CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$/'
          variables:
            DEPLOY_ENV: "prod"
 
@@ -400,7 +400,7 @@ deploy:
             DL_HOST: https://dl-dsoc-test.nrao.edu
             # override ENV_HOST
             ENV_HOST: ws-test.nrao.edu
-        - if: '$CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+$/'
+        - if: '$CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+$/ || $CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$/'
           variables:
             IMAGE_TAG: $CI_COMMIT_TAG
             # override DEPLOY_ENV
diff --git a/ci/bin/generate-go-yaml.py b/ci/bin/generate-go-yaml.py
index 970c09377..90bd95cd7 100755
--- a/ci/bin/generate-go-yaml.py
+++ b/ci/bin/generate-go-yaml.py
@@ -129,7 +129,7 @@ def main(argv):
         if deploy_env == "test":
             rule = "$CI_COMMIT_TAG =~ /^end-of-sprint-[0-9]+/ || $CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+-rc[0-9]+/ || $CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+\.[0.9]+-rc[0-9]+/"
         if deploy_env == "prod":
-            rule = "$CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+$/"
+            rule = "$CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+$/ || $CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$/"
 
         write_global_rule(rule=rule)
         go_changes = get_list_of_go_modules()
diff --git a/ci/bin/generate-yaml.py b/ci/bin/generate-yaml.py
index 7207229df..418d9066f 100755
--- a/ci/bin/generate-yaml.py
+++ b/ci/bin/generate-yaml.py
@@ -124,7 +124,7 @@ def main(argv):
         if deploy_env == "test":
             rule = "$CI_COMMIT_TAG =~ /^end-of-sprint-[0-9]+/ || $CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+-rc[0-9]+/ || $CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+\.[0.9]+-rc[0-9]+/"
         if deploy_env == "prod":
-            rule = "$CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+$/"
+            rule = "$CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+$/ || $CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$/"
 
         write_global_rule(rule=rule)
         pex_changes = get_list_of_pexables()
diff --git a/ci/build.template.yml b/ci/build.template.yml
index 49919673c..9dc7a6a7d 100644
--- a/ci/build.template.yml
+++ b/ci/build.template.yml
@@ -33,7 +33,7 @@
             VERSION: $CI_COMMIT_TAG
             # override DEPLOY_ENV
             DEPLOY_ENV: "test"
-        - if: '$CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+$/'
+        - if: '$CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+$/ || $CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$/'
           variables:
             IMAGE_TAG: $CI_COMMIT_TAG
             VERSION: $CI_COMMIT_TAG
diff --git a/ci/push.template.yml b/ci/push.template.yml
index 98c844346..e43e610fa 100644
--- a/ci/push.template.yml
+++ b/ci/push.template.yml
@@ -12,7 +12,7 @@
         - if: '$CI_COMMIT_TAG =~ /^end-of-sprint-[0-9]+/ || $CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+-rc[0-9]+/ || $CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+\.[0.9]+-rc[0-9]+/'
           variables:
             IMAGE_TAG: $CI_COMMIT_TAG
-        - if: '$CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+$/'
+        - if: '$CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+$/ || $CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$/'
           variables:
             IMAGE_TAG: $CI_COMMIT_TAG
     dependencies: []
diff --git a/ci/unit-test.template.yml b/ci/unit-test.template.yml
index e7c104d99..e67de8c0e 100644
--- a/ci/unit-test.template.yml
+++ b/ci/unit-test.template.yml
@@ -17,7 +17,7 @@
         - if: '$CI_COMMIT_TAG =~ /^end-of-sprint-[0-9]+/ || $CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+-rc[0-9]+/ || $CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+\.[0.9]+-rc[0-9]+/'
           variables:
             IMAGE_TAG: $CI_COMMIT_TAG
-        - if: '$CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+$/'
+        - if: '$CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+$/ || $CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$/'
           variables:
             IMAGE_TAG: $CI_COMMIT_TAG
     dependencies: []
-- 
GitLab