From d2efea08e65ca8ff7d1395af33bf44eb50ba0ab5 Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Mon, 24 Oct 2022 14:37:27 -0400 Subject: [PATCH] ci: Add check for no_log statement (#1096) Since e966e92 we're using the `no_log` variable to control the no_log statement value. This job will check if the no_log statements are correctly set. Signed-off-by: Dimitri Savineau --- .github/workflows/ci.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6f07fbd2..b131f581 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -82,3 +82,18 @@ jobs: - name: Install helm chart run: | helm install --wait my-awx-operator --namespace awx --create-namespace ./charts/awx-operator + no-log: + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Check no_log statements + run: | + set +e + no_log=$(grep -nr ' no_log:' roles | grep -v '"{{ no_log }}"') + if [ -n "${no_log}" ]; then + echo 'Please update the following no_log statement(s) with the "{{ no_log }}" value' + echo "${no_log}" + exit 1 + fi