From 89547a83722257e911ba4abedb8d2b747a192f23 Mon Sep 17 00:00:00 2001 From: Ioannis Karasavvaidis Date: Wed, 9 Oct 2024 10:40:22 +0100 Subject: [PATCH] feat(workflow): add random hash generation for console password in test-legacy-upgrade - Added a step to generate a random hash for the console password using /dev/urandom. - Updated the params.json creation to use the generated hash instead of a fixed secret. - Ensured the hash is printed for debugging purposes. --- .github/workflows/test-legacy-upgrade.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-legacy-upgrade.yaml b/.github/workflows/test-legacy-upgrade.yaml index d45a1324..5ae01258 100644 --- a/.github/workflows/test-legacy-upgrade.yaml +++ b/.github/workflows/test-legacy-upgrade.yaml @@ -1,6 +1,7 @@ --- name: Upgrade PE with legacy compilers on: + push: pull_request: paths: - .github/workflows/**/* @@ -97,7 +98,9 @@ jobs: compiler=$(yq '.groups[].targets[] | select(.vars.role == "compiler") | .name' spec/fixtures/litmus_inventory.yaml | head -n 1) legacy_compiler=$(yq '.groups[].targets[] | select(.vars.role == "compiler") | .name' spec/fixtures/litmus_inventory.yaml | sed -n 2p) replica=$(yq '.groups[].targets[] | select(.vars.role == "replica") | .name' spec/fixtures/litmus_inventory.yaml) - echo -n '{ "download_mode": "direct", "primary_host": "'$primary'", "replica_host": "'$replica'", "legacy_compilers": ["'$legacy_compiler'"], "compiler_hosts": ["'$compiler'"], "version": "2023.7.0", "console_password": "'${{ secrets.CONSOLE_PASSWORD }}'" }' > params.json + hash_random=$(LC_ALL=C tr -dc \'A-Za-z0-9!"#$%&\'\\\'\'()*+,-./:;<=>?@[\]^_`{|}~\' params.json - name: Install PE with legacy compilers timeout-minutes: 120 run: |