Skip to content

Commit 89547a8

Browse files
committed
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.
1 parent 9a9703e commit 89547a8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/test-legacy-upgrade.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
name: Upgrade PE with legacy compilers
33
on:
4+
push:
45
pull_request:
56
paths:
67
- .github/workflows/**/*
@@ -97,7 +98,9 @@ jobs:
9798
compiler=$(yq '.groups[].targets[] | select(.vars.role == "compiler") | .name' spec/fixtures/litmus_inventory.yaml | head -n 1)
9899
legacy_compiler=$(yq '.groups[].targets[] | select(.vars.role == "compiler") | .name' spec/fixtures/litmus_inventory.yaml | sed -n 2p)
99100
replica=$(yq '.groups[].targets[] | select(.vars.role == "replica") | .name' spec/fixtures/litmus_inventory.yaml)
100-
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
101+
hash_random=$(LC_ALL=C tr -dc \'A-Za-z0-9!"#$%&\'\\\'\'()*+,-./:;<=>?@[\]^_`{|}~\' </dev/urandom | head -c 30; echo)
102+
echo $hash_random
103+
echo -n '{ "download_mode": "direct", "primary_host": "'$primary'", "replica_host": "'$replica'", "legacy_compilers": ["'$legacy_compiler'"], "compiler_hosts": ["'$compiler'"], "version": "2023.7.0", "console_password": "'$hash_random'" }' > params.json
101104
- name: Install PE with legacy compilers
102105
timeout-minutes: 120
103106
run: |

0 commit comments

Comments
 (0)