Browse Source

align the python script for releasing with 8.14 (#12437)

Also update the failed build checking.
tags/8.15.0
Zhe Sun 2 years ago
parent
commit
9ef5665b9c
No account linked to committer's email address

+ 3
- 1
scripts/GenerateBuildTestAndStagingReport.py View File

return createTableRow(traffic_light.format(color="black"), "Test status: unable to retrieve status of tests") return createTableRow(traffic_light.format(color="black"), "Test status: unable to retrieve status of tests")
else: else:
test_failures_json = test_failures_request.json() test_failures_json = test_failures_request.json()
if test_failures_json["count"] == 0:
# nowadays the responds doesn't contain count keyword when the build is successful
# while count word can be found when build fails
if "count" not in test_failures_json:
return createTableRow(traffic_light.format(color="green"), "Test status: all tests passing") return createTableRow(traffic_light.format(color="green"), "Test status: all tests passing")
else: else:
return createTableRow(traffic_light.format(color="red"), "Test status: there are " + str(test_failures_json["count"]) + " failing tests, <a href={}>check the build report</a>".format(buildResultUrl)) return createTableRow(traffic_light.format(color="red"), "Test status: there are " + str(test_failures_json["count"]) + " failing tests, <a href={}>check the build report</a>".format(buildResultUrl))

+ 2
- 2
scripts/GeneratePostPublishReport.py View File

if archetype_metadata_request.status_code != 200: if archetype_metadata_request.status_code != 200:
return createTableRow(traffic_light.format(color="black"), "Check archetype metadata: <a href='{url}'>unable to retrieve metadata from {url}</a>".format(url=archetypeMetadataUrl)) return createTableRow(traffic_light.format(color="black"), "Check archetype metadata: <a href='{url}'>unable to retrieve metadata from {url}</a>".format(url=archetypeMetadataUrl))
else: else:
if "version=\"{version}\"".format(version=version) in archetype_metadata_request.content:
if "version=\"{version}\"".format(version=version) in archetype_metadata_request.text:
return createTableRow(traffic_light.format(color="green"), "Check archetype metadata: <a href='{url}'>metadata is correct for {url}</a>".format(url=archetypeMetadataUrl)) return createTableRow(traffic_light.format(color="green"), "Check archetype metadata: <a href='{url}'>metadata is correct for {url}</a>".format(url=archetypeMetadataUrl))
else: else:
return createTableRow(traffic_light.format(color="red"), "Check archetype metadata: <a href='{url}'>metadata seems to be incorrect for {url}</a>".format(url=archetypeMetadataUrl)) return createTableRow(traffic_light.format(color="red"), "Check archetype metadata: <a href='{url}'>metadata seems to be incorrect for {url}</a>".format(url=archetypeMetadataUrl))


content += "</table></body></html>" content += "</table></body></html>"


with open("result/report.html", "wb") as f:
with open("result/report.html", "w") as f:
f.write(content) f.write(content)

Loading…
Cancel
Save