Skip to content

Commit a3bc14b

Browse files
Adding test case for windows 2025
Update strategyMatrix.py Update Makefile Update Makefile Update Makefile Update strategyMatrix.py Reapply "added log statements for testing" This reverts commit 1542662. cat strategy matrix cat strategy matrix upgrade version Update strategyMatrix.py Revert "Reapply "added log statements for testing"" This reverts commit 59a115a. Update strategyMatrix.py Update strategyMatrix.py Revert "added log statements for testing" This reverts commit 30bffc6. added log statements for testing Update windows-server-2025.yml test commit
1 parent 1776a92 commit a3bc14b

File tree

4 files changed

+36
-6
lines changed

4 files changed

+36
-6
lines changed

versions/Makefile

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,36 @@
11
.PHONY: generateMatrices
22
generateMatrices:
3+
@echo "Installing Python dependencies..."
34
pip3 install -r requirements.txt
5+
6+
@echo "Generating strategy matrix..."
47
python3 strategyMatrix.py > strategyMatrix.json
5-
# work only with missing packages either in prod or staging
8+
9+
@echo "Printing jq version..."
10+
jq --version
11+
12+
@echo "Validating strategyMatrix.json..."
13+
python3 -c "import json; json.load(open('strategyMatrix.json'))" || { echo 'Invalid JSON in strategyMatrix.json'; exit 1; }
14+
15+
@echo "Pretty Printing strategyMatrix.json..."
16+
jq '.' strategyMatrix.json
17+
18+
@echo "Work only with missing packages either in prod or staging..."
619
cat strategyMatrix.json | jq 'map(select(.isProduction == false or .isStaging == false))' -c > prodAndStagingMatrix.json
20+
21+
@echo "Generating SLES matrix..."
722
cat prodAndStagingMatrix.json | jq 'map(select(.osDistro == "sles"))' -c > slesMatrix.json
23+
24+
@echo "Generating Linux and Windows matrix..."
825
cat prodAndStagingMatrix.json | jq 'map(select(.osDistro != "sles"))' -c > linuxAndWindowsMatrix.json
26+
27+
@echo "Generating Windows matrix..."
928
cat prodAndStagingMatrix.json | jq 'map(select(.osDistro == "windows-server"))' -c > windowsMatrix.json
29+
30+
1031
# used to generate proper schemas in schema.linux.py
32+
@echo "Generating staging matrix..."
1133
cat strategyMatrix.json | jq 'map(select(.isStaging == false))' -c > stagingMatrix.json
34+
35+
@echo "Generating production matrix..."
1236
cat strategyMatrix.json | jq 'map(select(.isProduction == false))' -c > productionMatrix.json

versions/common.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
fbVersion: 3.2.7
1+
fbVersion: 3.2.10
22

33
# This file, together with each distro file are processed and merged incrementally to
44
# build all the information required to download and test each package. Each package ends

versions/strategyMatrix.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,15 +186,16 @@ def list_distro_files():
186186
return [
187187
filename
188188
for filename in os.listdir(".")
189-
if (filename.endswith(".yml") or filename.endswith(".yaml"))
189+
if ((filename.endswith(".yml") or filename.endswith(".yaml")) and filename.startswith("windows-"))
190190
and filename != "common.yml"
191191
]
192192
except Exception as e:
193193
print(f"Error while reading distribution package files: {e}")
194+
# should not this be exit as running the job with empty one has no outcome?
194195
return []
195196

196197

197-
def generate_matrix():
198+
def generate_matrix():
198199
return [
199200
add_package_details(package_data)
200201
for distro_file in list_distro_files()
@@ -214,7 +215,7 @@ def add_availability_flags(matrix):
214215
pkg["isStaging"] = True if response.status_code == 200 else False
215216

216217

217-
if __name__ == "__main__":
218+
if __name__ == "__main__":
218219
matrix = generate_matrix()
219220
add_availability_flags(matrix)
220-
print(json.dumps(matrix))
221+
print(json.dumps(matrix, indent=2))

versions/windows-server-2025.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
osDistro: windows-server
2+
osVersion: 2025
3+
packages:
4+
- arch: win64
5+
ami: ami-03eac6ae588965b06

0 commit comments

Comments
 (0)