]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
(GH-380) - Litmus, move inventory location
authorPaula Muir <paula@puppet.com>
Thu, 8 Apr 2021 09:21:07 +0000 (10:21 +0100)
committerPaula Muir <paula@puppet.com>
Thu, 8 Apr 2021 09:21:07 +0000 (10:21 +0100)
.github/workflows/nightly.yml
.github/workflows/pr_test.yml

index 0c1fd28b9cdfbbfebd4ce363c282b51922b6d272..66bafc7b0bfcc276d3db5f08f70659babb4f54e3 100644 (file)
@@ -128,7 +128,14 @@ jobs:
         echo
         echo ::endgroup::
         echo ::group::=== INVENTORY ===
-        sed -e 's/password: .*/password: "[redacted]"/' < inventory.yaml || true
+        if [ -f 'spec/fixtures/litmus_inventory.yaml' ];
+        then
+          FILE='spec/fixtures/litmus_inventory.yaml'
+        elif [ -f 'inventory.yaml' ];
+        then
+          FILE='inventory.yaml'
+        fi
+        sed -e 's/password: .*/password: "[redacted]"/' < $FILE || true
         echo ::endgroup::
 
     - name: Install agent
@@ -163,7 +170,7 @@ jobs:
       if: ${{ always() }}
       continue-on-error: true
       run: |
-        if [ -f inventory.yaml ]; then
+        if [[ -f inventory.yaml || -f spec/fixtures/litmus_inventory.yaml ]]; then
           buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:tear_down' -- bundle exec rake 'litmus:tear_down'
           echo ::group::=== REQUEST ===
           cat request.json || true
index 207dfcadd509fe93e569877350723bd0d3cbcd89..dd2de2866c70d5740d1d5ddb6255f1bf24faad4e 100644 (file)
@@ -126,7 +126,14 @@ jobs:
         echo
         echo ::endgroup::
         echo ::group::=== INVENTORY ===
-        sed -e 's/password: .*/password: "[redacted]"/' < inventory.yaml || true
+        if [ -f 'spec/fixtures/litmus_inventory.yaml' ];
+        then
+          FILE='spec/fixtures/litmus_inventory.yaml'
+        elif [ -f 'inventory.yaml' ];
+        then
+          FILE='inventory.yaml'
+        fi
+        sed -e 's/password: .*/password: "[redacted]"/' < $FILE || true
         echo ::endgroup::
 
     - name: Install agent
@@ -161,7 +168,7 @@ jobs:
       if: ${{ always() }}
       continue-on-error: true
       run: |
-        if [ -f inventory.yaml ]; then
+        if [[ -f inventory.yaml || -f spec/fixtures/litmus_inventory.yaml ]]; then
           buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:tear_down' -- bundle exec rake 'litmus:tear_down'
           echo ::group::=== REQUEST ===
           cat request.json || true