Fix: picking AP Models as per input for manual triggers (#910)

* Fix: picking AP Models as per input for manual triggers

Signed-off-by: anil-tegala <anil.tegala@candelatech.com>
---------
This commit is contained in:
Anil Kumar Tegala
2024-04-07 12:18:38 +05:30
committed by GitHub
parent 8c3fb5e7b8
commit 674b951cb4
3 changed files with 17 additions and 12 deletions

View File

@@ -90,6 +90,8 @@ jobs:
AP_MODELS="${{ github.event.inputs.ap_models || 'edgecore_eap104,cig_wf186w,edgecore_eap111' }}"
elif [[ "$DOW" -eq "4" ]]; then
AP_MODELS="${{ github.event.inputs.ap_models || 'edgecore_eap102,cig_wf196' }}"
else
AP_MODELS="${{ github.event.inputs.ap_models || 'cig_wf188n,edgecore_oap101-6e,hfcl_ion4xe' }}"
fi
echo "List of AP models to test - $AP_MODELS"
AP_MODELS=$(echo $AP_MODELS | sed "s/,/\",\"/g" | sed 's/^/[\"/g' | sed 's/$/\"]/g')

View File

@@ -69,6 +69,7 @@ jobs:
echo "marker_expression=$(echo ${{ github.event.inputs.marker_expression || 'ow_sanity_lf' }})" >> $GITHUB_OUTPUT
echo "existing_controller=$(echo ${{ github.event.inputs.existing_controller || 'qa01' }})" >> $GITHUB_OUTPUT
# Schedule runs at - 11 hours UTC
DOW=$(date +%u)
@@ -90,6 +91,8 @@ jobs:
AP_MODELS="${{ github.event.inputs.ap_models || 'cig_wf188n,edgecore_oap101-6e,edgecore_eap104,cig_wf186w,edgecore_eap111' }}"
elif [[ "$DOW" -eq "5" ]]; then
AP_MODELS="${{ github.event.inputs.ap_models || 'hfcl_ion4xe' }}"
else
AP_MODELS="${{ github.event.inputs.ap_models || 'edgecore_eap102,cig_wf196,edgecore_eap101,yuncore_fap655,yuncore_ax820,edgecore_eap111' }}"
fi
echo "List of AP models to test - $AP_MODELS"

View File

@@ -73,7 +73,7 @@ jobs:
marker_expressions=${MARKER_EXPRESSIONS}
EOF
# Schedule runs in two slots. slot 1 - 11 hours UTC
# choose AP models as per the day and slot if the scheduled run gets triggered else provided.
DOW=$(date +%u)
TOD=$(date +%H)
SLOT=$(( 10#$TOD % 24)) # 11 - slot 1
@@ -82,17 +82,17 @@ jobs:
echo "Current time is $TOD hours, which is $(( 10#$TOD % 24)) in cron notation"
echo "Current slot is $SLOT"
if [[ "$SLOT" -eq "11" ]]; then
echo "Choosing slot 1 since time of the day is $SLOT hours"
if [[ "$DOW" -eq "4" ]]; then
AP_MODELS="${{ github.event.inputs.ap_models || 'hfcl_ion4xe' }}"
elif [[ "$DOW" -eq "5" ]]; then
AP_MODELS="${{ github.event.inputs.ap_models || 'cig_wf188n,edgecore_oap101-6e,edgecore_eap104' }}"
elif [[ "$DOW" -eq "6" ]]; then
AP_MODELS="${{ github.event.inputs.ap_models || 'edgecore_eap102,cig_wf196,yuncore_fap655' }}"
elif [[ "$DOW" -eq "7" ]]; then
AP_MODELS="${{ github.event.inputs.ap_models || 'edgecore_eap101,yuncore_ax820,edgecore_eap111' }}"
fi
# choose AP models as per the day if the scheduled run gets triggered else input provided.
if [[ "$DOW" -eq "4" ]]; then
AP_MODELS="${{ github.event.inputs.ap_models || 'hfcl_ion4xe' }}"
elif [[ "$DOW" -eq "5" ]]; then
AP_MODELS="${{ github.event.inputs.ap_models || 'cig_wf188n,edgecore_oap101-6e,edgecore_eap104' }}"
elif [[ "$DOW" -eq "6" ]]; then
AP_MODELS="${{ github.event.inputs.ap_models || 'edgecore_eap102,cig_wf196,yuncore_fap655' }}"
elif [[ "$DOW" -eq "7" ]]; then
AP_MODELS="${{ github.event.inputs.ap_models || 'edgecore_eap101,yuncore_ax820,edgecore_eap111' }}"
else
AP_MODELS="${{ github.event.inputs.ap_models || 'cig_wf188n,edgecore_oap101-6e,edgecore_eap104' }}"
fi
AP_MODELS=$(echo $AP_MODELS | sed "s/,/\",\"/g" | sed 's/^/[\"/g' | sed 's/$/\"]/g')