Skip to content

Commit 3b30e36

Browse files
committed
[MOSIP-44613] validate cre_domain_name and qabase_domain_name for esignet profile in testrigs
Add profile-conditional validation to testrigs validate-inputs job: when profile=esignet (or push-triggered, where profile is auto-detected as esignet), require cre_domain_name and qabase_domain_name to be set. Errors accumulate in the shared errors[] array before the single exit. Signed-off-by: bhumi46 <bhumi11111a@gmail.com> Signed-off-by: bhumi46 <thisisbn46@gmail.com>
1 parent 2fdb447 commit 3b30e36

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

.github/workflows/helmsman_testrigs.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ jobs:
6969
- name: Validate required variables
7070
run: |
7171
errors=()
72+
PROFILE="${{ github.event.inputs.profile }}"
7273
DOMAIN="${{ github.event.inputs.domain_name || vars.DOMAIN_NAME }}"
7374
ENV="${{ github.event.inputs.env_name || vars.ENV_NAME }}"
7475
SLACK_CH="${{ github.event.inputs.slack_channel_name || vars.SLACK_CHANNEL_NAME }}"
@@ -79,6 +80,12 @@ jobs:
7980
[ -z "$SLACK_CH" ] && errors+=("slack_channel_name is empty — set vars.SLACK_CHANNEL_NAME under Environment '${{ github.ref_name }}'")
8081
[ -z "$DB_PORT" ] && errors+=("db_port is empty — set vars.DB_PORT under Environment '${{ github.ref_name }}'")
8182
[ -z "$ESIGNET_DB_PORT" ] && errors+=("esignet_db_port is empty — set vars.ESIGNET_DB_PORT under Environment '${{ github.ref_name }}'")
83+
if [ -z "$PROFILE" ] || [ "$PROFILE" = "esignet" ]; then
84+
CRE_DOMAIN="${{ github.event.inputs.cre_domain_name || vars.CRE_DOMAIN_NAME }}"
85+
QABASE_DOMAIN="${{ github.event.inputs.qabase_domain_name || vars.QABASE_DOMAIN_NAME }}"
86+
[ -z "$CRE_DOMAIN" ] && errors+=("cre_domain_name is empty — set vars.CRE_DOMAIN_NAME under Environment '${{ github.ref_name }}'")
87+
[ -z "$QABASE_DOMAIN" ] && errors+=("qabase_domain_name is empty — set vars.QABASE_DOMAIN_NAME under Environment '${{ github.ref_name }}'")
88+
fi
8289
if [ ${#errors[@]} -gt 0 ]; then
8390
echo "❌ Required variables missing:"
8491
printf ' - %s\n' "${errors[@]}"
@@ -90,6 +97,10 @@ jobs:
9097
echo "✓ slack_channel_name = $SLACK_CH"
9198
echo "✓ db_port = $DB_PORT"
9299
echo "✓ esignet_db_port = $ESIGNET_DB_PORT"
100+
if [ -z "$PROFILE" ] || [ "$PROFILE" = "esignet" ]; then
101+
echo "✓ cre_domain_name = $CRE_DOMAIN (esignet profile)"
102+
echo "✓ qabase_domain_name = $QABASE_DOMAIN (esignet profile)"
103+
fi
93104
94105
deploy:
95106
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)