From 89b40a5d8d6e37fabee7a436a6b1d494c9b2e1bf Mon Sep 17 00:00:00 2001 From: Henri Sara Date: Thu, 7 Sep 2017 11:01:37 +0300 Subject: [PATCH] Update build report scripts for 8.2 (#9939) --- scripts/GenerateBuildTestAndStagingReport.py | 20 +++------ scripts/GeneratePostPublishReport.py | 47 +++++++++++--------- scripts/GeneratePublishReportPart1.py | 12 ++--- 3 files changed, 37 insertions(+), 42 deletions(-) diff --git a/scripts/GenerateBuildTestAndStagingReport.py b/scripts/GenerateBuildTestAndStagingReport.py index f87b72ce3f..fb8874543e 100644 --- a/scripts/GenerateBuildTestAndStagingReport.py +++ b/scripts/GenerateBuildTestAndStagingReport.py @@ -3,7 +3,6 @@ import argparse, requests, json, subprocess, re, pickle parser = argparse.ArgumentParser() parser.add_argument("version", type=str, help="Vaadin version that was just built") -parser.add_argument("deployUrl", type=str, help="Base url of the deployment server") parser.add_argument("teamcityUser", type=str, help="Teamcity username to use") parser.add_argument("teamcityPassword", type=str, help="Password for given teamcity username") @@ -53,18 +52,6 @@ def getTestStatusHtml(): else: return createTableRow(traffic_light.format(color="red"), "Test status: there are " + str(test_failures_json["count"]) + " failing tests, check the build report".format(buildResultUrl)) -def getDemoValidationStatusHtml(): - status = pickle.load(open("result/demo_validation_status.pickle", "rb")) - if status["error"]: - return createTableRow(traffic_light.format(color="red"), getHtmlList(status["messages"])) - else: - return createTableRow(traffic_light.format(color="green"), getHtmlList(status["messages"])) - -def getDemoLinksHtml(): - demos_html = "Try demos" - link_list = list(map(lambda demo: "{demoName}".format(url=args.deployUrl, demoName=demo, version=args.version), demos)) - return demos_html + getHtmlList(link_list) + "Note that the deployed framework8-demo WARs have a suffix -0..-4." - def getApiDiffHtml(): apidiff_html = "Check API diff" modules = [ @@ -152,17 +139,20 @@ except subprocess.CalledProcessError as e: content += getStagingContentsHtml(args.stagingRepoUrl, allowedArtifacts) content += createTableRow("", "

Manual checks before publishing

") -# try demos -content += createTableRow("", getDemoLinksHtml()) + +content += createTableRow("", "If changing between branches or phases (stable, maintenance, alpha, beta, rc), check the phase change checklist") # link to release notes content += createTableRow("", "Check release notes".format(args.teamcityUrl, args.buildTypeId, args.buildId)) + # link to api diff content += createTableRow("", getApiDiffHtml()) # check that GitHub issues are in the correct status content += createTableRow("", "Check that closed GitHub issues have correct milestone") +content += createTableRow("", "Check demos from docker image:
zcat < demo-validation-{version}.tgz |docker load && docker run --rm -p 8080:8080 demo-validation:{version} || docker rmi demo-validation:{version}
".format(version=args.version)) + content += createTableRow("", "

Preparations before publishing

") # link to build dependencies tab to initiate publish step content += createTableRow("", "

Start Publish Release from dependencies tab

".format(args.teamcityUrl, args.buildId, args.buildTypeId)) diff --git a/scripts/GeneratePostPublishReport.py b/scripts/GeneratePostPublishReport.py index bc19185b5c..4ebcbfd626 100644 --- a/scripts/GeneratePostPublishReport.py +++ b/scripts/GeneratePostPublishReport.py @@ -18,16 +18,26 @@ def checkUrlStatus(url): return r.status_code == 200 def createTableRow(*columns): - html = "" - for column in columns: - html += "" + column + "" - return html + "" + html = "" + for column in columns: + html += "" + column + "" + return html + "" traffic_light = "" def getTrafficLight(b): return traffic_light.format(color="green") if b else traffic_light.format(color="red") +def checkArchetypeMetaData(archetypeMetadataUrl, version): + archetype_metadata_request = requests.get(archetypeMetadataUrl) + if archetype_metadata_request.status_code != 200: + return createTableRow(traffic_light.format(color="black"), "Check archetype metadata: unable to retrieve metadata from {url}".format(url=archetypeMetadataUrl)) + else: + if "version=\"{version}\"".format(version=version) in archetype_metadata_request.content: + return createTableRow(traffic_light.format(color="green"), "Check archetype metadata: metadata is correct for {url}".format(url=archetypeMetadataUrl)) + else: + return createTableRow(traffic_light.format(color="red"), "Check archetype metadata: metadata seems to be incorrect for {url}".format(url=archetypeMetadataUrl)) + content = "" tagOk = checkUrlStatus("https://github.com/vaadin/framework/releases/tag/{ver}".format(ver=args.version)) @@ -37,23 +47,16 @@ content += createTableRow(getTrafficLight(tagOk), "Tag ok on github.com") content += createTableRow("", "Tag and pin build".format(url=buildResultUrl)) # Traffic light for archetype metadata -# TODO check all three metadata files, based on pre-release or not -archetypeMetadataUrl = "" -if not prerelease: - archetypeMetadataUrl = "http://vaadin.com/download/eclipse-maven-archetypes.xml" -else: - archetypeMetadataUrl ="http://vaadin.com/download/maven-archetypes-prerelease.xml" - -archetype_metadata_request = requests.get(archetypeMetadataUrl) -if archetype_metadata_request.status_code != 200: - content += createTableRow(traffic_light.format(color="black"), "Check archetype metadata: unable to retrieve metadata".format(url=archetypeMetadataUrl)) -else: - if "version=\"{version}\"".format(version=args.version) in archetype_metadata_request.content: - content += createTableRow(traffic_light.format(color="green"), "Check archetype metadata: metadata is correct".format(url=archetypeMetadataUrl)) - else: - content += createTableRow(traffic_light.format(color="red"), "Check archetype metadata: metadata is incorrect".format(url=archetypeMetadataUrl)) - -# TODO GitHub milestones +content += checkArchetypeMetaData("http://vaadin.com/download/eclipse-maven-archetypes.xml", args.version) +if prerelease: + content += checkArchetypeMetaData("http://vaadin.com/download/maven-archetypes-prerelease.xml", args.version) +content += createTableRow("", "Optionally check that old Eclipse metadata still refers to Vaadin 7") +content += createTableRow("", "Note that archetype metadata checks do not verify that the relevant sections are not commented out when changing from pre-release to stable and back!") + +# GitHub milestones +content += createTableRow("", "Create new milestone in GitHub") + +content += createTableRow("", "Build and deploy new sampler if necessary") # Inform marketing and PO content += createTableRow("", "Inform marketing and PO about the release") @@ -67,4 +70,4 @@ content += createTableRow("", "Create milestone for next version in GitHub" -content += """ - -""".format(version=args.version) +#content += """ +# +#""".format(version=args.version) if not prerelease: content += '' +content += "" + # close GitHub milestone content += "" -- 2.39.5
Verify uploaded to test.vaadin.com
Verify uploaded to test.vaadin.com
Verify API version list updated
Run the generated tag_repositories.sh script
Close GitHub Milestone