File tree Expand file tree Collapse file tree 5 files changed +37
-9
lines changed Expand file tree Collapse file tree 5 files changed +37
-9
lines changed Original file line number Diff line number Diff line change 1
1
.PHONY : generateMatrices
2
2
generateMatrices :
3
+ @echo " Installing Python dependencies..."
3
4
pip3 install -r requirements.txt
5
+
6
+ @echo "Generating strategy matrix..."
4
7
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..."
6
19
cat strategyMatrix.json | jq 'map(select(.isProduction == false or .isStaging == false))' -c > prodAndStagingMatrix.json
20
+
21
+ @echo "Generating SLES matrix..."
7
22
cat prodAndStagingMatrix.json | jq 'map(select(.osDistro == "sles"))' -c > slesMatrix.json
23
+
24
+ @echo "Generating Linux and Windows matrix..."
8
25
cat prodAndStagingMatrix.json | jq 'map(select(.osDistro != "sles"))' -c > linuxAndWindowsMatrix.json
26
+
27
+ @echo "Generating Windows matrix..."
9
28
cat prodAndStagingMatrix.json | jq 'map(select(.osDistro == "windows-server"))' -c > windowsMatrix.json
29
+
30
+
10
31
# used to generate proper schemas in schema.linux.py
32
+ @echo "Generating staging matrix..."
11
33
cat strategyMatrix.json | jq 'map(select(.isStaging == false))' -c > stagingMatrix.json
34
+
35
+ @echo "Generating production matrix..."
12
36
cat strategyMatrix.json | jq 'map(select(.isProduction == false))' -c > productionMatrix.json
Original file line number Diff line number Diff line change 1
- fbVersion : 3.2.7
1
+ fbVersion : 3.2.10
2
2
3
3
# This file, together with each distro file are processed and merged incrementally to
4
4
# build all the information required to download and test each package. Each package ends
Original file line number Diff line number Diff line change @@ -186,15 +186,16 @@ def list_distro_files():
186
186
return [
187
187
filename
188
188
for filename in os .listdir ("." )
189
- if (filename .endswith ( ".yml" ) or filename . endswith ( ".yaml " ))
189
+ if (filename .startswith ( "windows-server-2025 " ))
190
190
and filename != "common.yml"
191
191
]
192
192
except Exception as e :
193
193
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?
194
195
return []
195
196
196
197
197
- def generate_matrix ():
198
+ def generate_matrix ():
198
199
return [
199
200
add_package_details (package_data )
200
201
for distro_file in list_distro_files ()
@@ -214,7 +215,7 @@ def add_availability_flags(matrix):
214
215
pkg ["isStaging" ] = True if response .status_code == 200 else False
215
216
216
217
217
- if __name__ == "__main__" :
218
+ if __name__ == "__main__" :
218
219
matrix = generate_matrix ()
219
220
add_availability_flags (matrix )
220
- print (json .dumps (matrix ))
221
+ print (json .dumps (matrix , indent = 2 ))
Original file line number Diff line number Diff line change @@ -2,6 +2,4 @@ osDistro: windows-server
2
2
osVersion : 2022
3
3
packages :
4
4
- arch : win64
5
- ami : ami-00087f5bc76de01b4
6
- - arch : win32
7
- ami : ami-00087f5bc76de01b4
5
+ ami : ami-06fbbb433da1a5bf7
Original file line number Diff line number Diff line change
1
+ osDistro : windows-server
2
+ osVersion : 2025
3
+ packages :
4
+ - arch : win64
5
+ ami : ami-03eac6ae588965b06
You can’t perform that action at this time.
0 commit comments