Skip to content

Commit b332dd6

Browse files
Update HA validation and configuration (#163)
1 parent e7b58ac commit b332dd6

File tree

21 files changed

+218
-60
lines changed

21 files changed

+218
-60
lines changed

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,17 @@ jobs:
4343
egress-policy: audit
4444

4545
- name: Checkout repository
46-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
46+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
4747

4848
- name: Initialize CodeQL
49-
uses: github/codeql-action/init@07bb2b932c90fc1ec97637495e4072a0966fa74c # v3.28.20
49+
uses: github/codeql-action/init@fe4161a26a8629af62121b670040955b330f9af2 # v4.31.6
5050
with:
5151
languages: ${{ matrix.language }}
5252

5353
- name: Autobuild
54-
uses: github/codeql-action/autobuild@07bb2b932c90fc1ec97637495e4072a0966fa74c # v3.28.20
54+
uses: github/codeql-action/autobuild@fe4161a26a8629af62121b670040955b330f9af2 # v4.31.6
5555

5656
- name: Perform CodeQL Analysis
57-
uses: github/codeql-action/analyze@07bb2b932c90fc1ec97637495e4072a0966fa74c # v3.28.20
57+
uses: github/codeql-action/analyze@fe4161a26a8629af62121b670040955b330f9af2 # v4.31.6
5858
with:
5959
category: "/language:${{matrix.language}}"

.github/workflows/dependency-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ jobs:
2222
egress-policy: audit
2323

2424
- name: 'Checkout Repository'
25-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2626
- name: 'Dependency Review'
2727
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0

.github/workflows/github-actions-ansible-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
egress-policy: audit
1515

1616
- name: Checkout the code
17-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
17+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
1818

1919
- name: Setup Python
2020
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 #v5.4.0

.github/workflows/github-actions-code-coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
egress-policy: audit
1515

1616
- name: Checkout the code
17-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
17+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1
1818

1919
- name: Setup Python
2020
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 #v5.4.0

.github/workflows/ossf-scoreboard.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
egress-policy: audit
3232

3333
- name: "Checkout code"
34-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
34+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
3535
with:
3636
persist-credentials: false
3737

@@ -52,6 +52,6 @@ jobs:
5252
# Upload the results to GitHub's code scanning dashboard (optional).
5353
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
5454
- name: "Upload to code-scanning"
55-
uses: github/codeql-action/upload-sarif@0499de31b99561a6d14a36a5f662c2a54f91beee # v4.31.2
55+
uses: github/codeql-action/upload-sarif@fe4161a26a8629af62121b670040955b330f9af2 # v4.31.6
5656
with:
5757
sarif_file: results.sarif

.github/workflows/trivy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
egress-policy: audit
2424

2525
- name: Checkout code
26-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2727

2828
- name: Run Trivy vulnerability scanner (file system)
2929
uses: aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # 0.29.0
@@ -36,7 +36,7 @@ jobs:
3636
output: report-fs.sarif
3737

3838
- name: Upload Trivy report (fs) GitHub Security
39-
uses: github/codeql-action/upload-sarif@07bb2b932c90fc1ec97637495e4072a0966fa74c # v3.28.20
39+
uses: github/codeql-action/upload-sarif@fe4161a26a8629af62121b670040955b330f9af2 # v4.31.6
4040
with:
4141
sarif_file: report-fs.sarif
4242
category: 'fs'

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.0
1+
1.0.1

docs/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## 1.0.1
6+
Release Date: 12-09-2025
7+
1. CI/CD Workflow Upgrades:
8+
2. HA constants, validation logic updates and validation enhancements
9+
3. SAP Automation Script Improvements
510

611
## 1.0.0
712
Release Date: 11-04-2025

requirements.txt

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
# This file is autogenerated by pip-compile with Python 3.10
33
# by the following command:
44
#
5-
# pip-compile requirements.in
5+
# pip-compile ./requirements.in
66
#
7-
ansible-compat==25.8.2
7+
ansible-compat==25.12.0
88
# via ansible-lint
99
ansible-core==2.17.14
1010
# via
1111
# -r requirements.in
1212
# ansible-compat
1313
# ansible-lint
14-
ansible-lint==25.9.2
14+
ansible-lint==25.12.0
1515
# via -r requirements.in
1616
ansible-runner==2.4.2
1717
# via -r requirements.in
18-
astroid==4.0.1
18+
astroid==4.0.2
1919
# via pylint
2020
attrs==25.4.0
2121
# via
@@ -33,35 +33,35 @@ azure-identity==1.25.1
3333
# via
3434
# -r requirements.in
3535
# azure-kusto-data
36-
azure-kusto-data==5.0.5
36+
azure-kusto-data==6.0.0
3737
# via
3838
# -r requirements.in
3939
# azure-kusto-ingest
40-
azure-kusto-ingest==5.0.5
40+
azure-kusto-ingest==6.0.0
4141
# via -r requirements.in
42-
azure-mgmt-compute==37.0.1
42+
azure-mgmt-compute==37.1.0
4343
# via -r requirements.in
4444
azure-mgmt-core==1.6.0
4545
# via
4646
# azure-mgmt-compute
4747
# azure-mgmt-network
48-
azure-mgmt-network==30.0.0
48+
azure-mgmt-network==30.1.0
4949
# via -r requirements.in
50-
azure-storage-blob==12.23.0
50+
azure-storage-blob==12.26.0
5151
# via
5252
# -r requirements.in
5353
# azure-kusto-ingest
54-
azure-storage-queue==12.12.0
54+
azure-storage-queue==12.13.0
5555
# via
5656
# -r requirements.in
5757
# azure-kusto-ingest
58-
black==25.9.0
58+
black==25.12.0
5959
# via
6060
# -r requirements.in
6161
# ansible-lint
6262
bracex==2.6
6363
# via wcmatch
64-
certifi==2025.10.5
64+
certifi==2025.11.12
6565
# via
6666
# msrest
6767
# requests
@@ -71,11 +71,11 @@ cffi==2.0.0
7171
# cryptography
7272
charset-normalizer==3.4.4
7373
# via requests
74-
click==8.3.0
74+
click==8.3.1
7575
# via
7676
# -r requirements.in
7777
# black
78-
coverage[toml]==7.11.0
78+
coverage[toml]==7.13.0
7979
# via
8080
# -r requirements.in
8181
# pytest-cov
@@ -92,16 +92,14 @@ dill==0.4.0
9292
# via pylint
9393
distro==1.9.0
9494
# via ansible-lint
95-
exceptiongroup==1.3.0
95+
exceptiongroup==1.3.1
9696
# via pytest
9797
filelock==3.20.0
9898
# via ansible-lint
9999
idna==3.11
100100
# via requests
101101
ijson==3.4.0.post0
102102
# via azure-kusto-data
103-
importlib-metadata==8.7.0
104-
# via ansible-lint
105103
iniconfig==2.3.0
106104
# via pytest
107105
isodate==0.7.2
@@ -169,7 +167,7 @@ pathspec==0.12.1
169167
# yamllint
170168
pexpect==4.9.0
171169
# via ansible-runner
172-
platformdirs==4.5.0
170+
platformdirs==4.5.1
173171
# via
174172
# black
175173
# pylint
@@ -189,9 +187,9 @@ pyjwt[crypto]==2.10.1
189187
# via
190188
# msal
191189
# pyjwt
192-
pylint==4.0.2
190+
pylint==4.0.4
193191
# via -r requirements.in
194-
pytest==8.4.2
192+
pytest==9.0.2
195193
# via
196194
# -r requirements.in
197195
# pytest-cov
@@ -206,7 +204,7 @@ python-dateutil==2.9.0.post0
206204
# via
207205
# azure-kusto-data
208206
# pandas
209-
pytokens==0.2.0
207+
pytokens==0.3.0
210208
# via black
211209
pytz==2025.2
212210
# via pandas
@@ -237,13 +235,13 @@ resolvelib==1.0.1
237235
# via ansible-core
238236
rich==14.2.0
239237
# via -r requirements.in
240-
rpds-py==0.28.0
238+
rpds-py==0.30.0
241239
# via
242240
# jsonschema
243241
# referencing
244242
ruamel-yaml==0.18.16
245243
# via ansible-lint
246-
ruamel-yaml-clib==0.2.14
244+
ruamel-yaml-clib==0.2.15
247245
# via
248246
# ansible-lint
249247
# ruamel-yaml
@@ -278,11 +276,9 @@ typing-extensions==4.15.0
278276
# referencing
279277
tzdata==2025.2
280278
# via pandas
281-
urllib3==2.5.0
279+
urllib3==2.6.1
282280
# via requests
283281
wcmatch==10.1
284282
# via ansible-lint
285283
yamllint==1.37.1
286284
# via ansible-lint
287-
zipp==3.23.0
288-
# via importlib-metadata

scripts/sap_automation_qa.sh

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,15 @@ validate_params() {
178178
log "ERROR" "Error: The following parameters cannot be empty: ${missing_params[*]}"
179179
exit 1
180180
fi
181+
182+
WORKSPACES_DIR=$(grep "^WORKSPACES_DIR:" "$VARS_FILE" | awk '{split($0,a,": "); print a[2]}' | xargs)
183+
if [[ -z "$WORKSPACES_DIR" ]]; then
184+
WORKSPACES_DIR="WORKSPACES"
185+
log "INFO" "WORKSPACES_DIR not set in vars.yaml, using default: $WORKSPACES_DIR"
186+
else
187+
log "INFO" "WORKSPACES_DIR: $WORKSPACES_DIR"
188+
fi
189+
export WORKSPACES_DIR
181190
}
182191

183192
# Extract the error message from a command's output.
@@ -403,7 +412,7 @@ run_ansible_playbook() {
403412
command="ansible-playbook ${cmd_dir}/../src/$playbook_name.yml -i $system_hosts --private-key $temp_file \
404413
-e @$VARS_FILE -e @$system_params -e '_workspace_directory=$system_config_folder' $extra_vars"
405414
else
406-
local ssh_key_dir="${cmd_dir}/../WORKSPACES/SYSTEM/$SYSTEM_CONFIG_NAME"
415+
local ssh_key_dir="${cmd_dir}/../$WORKSPACES_DIR/SYSTEM/$SYSTEM_CONFIG_NAME"
407416
local ssh_key=""
408417
local extensions=("ppk" "pem" "key" "private" "rsa" "ed25519" "ecdsa" "dsa" "")
409418

@@ -429,7 +438,7 @@ run_ansible_playbook() {
429438
fi
430439

431440
check_file_exists "$ssh_key" \
432-
"SSH key file not found in WORKSPACES/SYSTEM/$SYSTEM_CONFIG_NAME directory. Looked for files with patterns: ssh_key.*, *ssh_key*"
441+
"SSH key file not found in $WORKSPACES_DIR/SYSTEM/$SYSTEM_CONFIG_NAME directory. Looked for files with patterns: ssh_key.*, *ssh_key*"
433442

434443
chmod 600 "$ssh_key"
435444
command="ansible-playbook ${cmd_dir}/../src/$playbook_name.yml -i $system_hosts --private-key $ssh_key \
@@ -449,9 +458,9 @@ run_ansible_playbook() {
449458
--extra-vars 'ansible_ssh_pass=$(cat $temp_file)' --extra-vars @$VARS_FILE -e @$system_params \
450459
-e '_workspace_directory=$system_config_folder' $extra_vars"
451460
else
452-
local password_file="${cmd_dir}/../WORKSPACES/SYSTEM/$SYSTEM_CONFIG_NAME/password"
461+
local password_file="${cmd_dir}/../$WORKSPACES_DIR/SYSTEM/$SYSTEM_CONFIG_NAME/password"
453462
check_file_exists "$password_file" \
454-
"password file not found in WORKSPACES/SYSTEM/$SYSTEM_CONFIG_NAME directory."
463+
"password file not found in $WORKSPACES_DIR/SYSTEM/$SYSTEM_CONFIG_NAME directory."
455464
command="ansible-playbook ${cmd_dir}/../src/$playbook_name.yml -i $system_hosts \
456465
--extra-vars 'ansible_ssh_pass=$(cat $password_file)' --extra-vars @$VARS_FILE -e @$system_params \
457466
-e '_workspace_directory=$system_config_folder' $extra_vars"
@@ -509,7 +518,7 @@ main() {
509518
validate_params
510519

511520
# Check if the SYSTEM_HOSTS and SYSTEM_PARAMS directory exists inside WORKSPACES/SYSTEM folder
512-
SYSTEM_CONFIG_FOLDER="${cmd_dir}/../WORKSPACES/SYSTEM/$SYSTEM_CONFIG_NAME"
521+
SYSTEM_CONFIG_FOLDER="${cmd_dir}/../$WORKSPACES_DIR/SYSTEM/$SYSTEM_CONFIG_NAME"
513522
SYSTEM_HOSTS="$SYSTEM_CONFIG_FOLDER/hosts.yaml"
514523
SYSTEM_PARAMS="$SYSTEM_CONFIG_FOLDER/sap-parameters.yaml"
515524
TEST_TIER=$(echo "$TEST_TIER" | tr '[:upper:]' '[:lower:]')
@@ -519,9 +528,9 @@ main() {
519528
log "INFO" "Using Authentication Type: $AUTHENTICATION_TYPE."
520529

521530
check_file_exists "$SYSTEM_HOSTS" \
522-
"hosts.yaml not found in WORKSPACES/SYSTEM/$SYSTEM_CONFIG_NAME directory."
531+
"hosts.yaml not found in $WORKSPACES_DIR/SYSTEM/$SYSTEM_CONFIG_NAME directory."
523532
check_file_exists "$SYSTEM_PARAMS" \
524-
"sap-parameters.yaml not found in WORKSPACES/SYSTEM/$SYSTEM_CONFIG_NAME directory."
533+
"sap-parameters.yaml not found in $WORKSPACES_DIR/SYSTEM/$SYSTEM_CONFIG_NAME directory."
525534

526535
if [[ "$OFFLINE_MODE" == "true" ]]; then
527536
local crm_report_dir="$SYSTEM_CONFIG_FOLDER/offline_validation"

0 commit comments

Comments
 (0)