diff options
author | Henri Sara <henri.sara@gmail.com> | 2017-09-07 11:01:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-07 11:01:37 +0300 |
commit | 89b40a5d8d6e37fabee7a436a6b1d494c9b2e1bf (patch) | |
tree | 3d2bee8954080bc3c5ce511428dee8e8c62ce54b /scripts | |
parent | 2618df9617c778bb66de81bec392f44be52a7d45 (diff) | |
download | vaadin-framework-89b40a5d8d6e37fabee7a436a6b1d494c9b2e1bf.tar.gz vaadin-framework-89b40a5d8d6e37fabee7a436a6b1d494c9b2e1bf.zip |
Update build report scripts for 8.2 (#9939)
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/GenerateBuildTestAndStagingReport.py | 20 | ||||
-rw-r--r-- | scripts/GeneratePostPublishReport.py | 47 | ||||
-rw-r--r-- | 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, <a href={}>check the build report</a>".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: "<a href='{url}/{demoName}-{version}'>{demoName}</a>".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("", "<h2>Manual checks before publishing</h2>") -# 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("", "<a href=\"http://{}/repository/download/{}/{}:id/release-notes/release-notes.html\">Check release notes</a>".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("", "<a href=\"https://github.com/vaadin/framework/issues?q=is%3Aclosed+sort%3Aupdated-desc\">Check that closed GitHub issues have correct milestone</a>") +content += createTableRow("", "Check demos from docker image:<br><pre>zcat < demo-validation-{version}.tgz |docker load && docker run --rm -p 8080:8080 demo-validation:{version} || docker rmi demo-validation:{version}</pre>".format(version=args.version)) + content += createTableRow("", "<h2>Preparations before publishing</h2>") # link to build dependencies tab to initiate publish step content += createTableRow("", "<a href=\"http://{}/viewLog.html?buildId={}&buildTypeId={}&tab=dependencies\"><h2>Start Publish Release from dependencies tab</h2></a>".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 = "<tr>" - for column in columns: - html += "<td>" + column + "</td>" - return html + "</tr>" + html = "<tr>" + for column in columns: + html += "<td>" + column + "</td>" + return html + "</tr>" traffic_light = "<svg width=\"20px\" height=\"20px\" style=\"padding-right:5px\"><circle cx=\"10\" cy=\"10\" r=\"10\" fill=\"{color}\"/></svg>" 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: <a href='{url}'>unable to retrieve metadata from {url}</a>".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: <a href='{url}'>metadata is correct for {url}</a>".format(url=archetypeMetadataUrl)) + 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)) + content = "<html><head></head><body><table>" 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("", "<a href=\"{url}\">Tag and pin build</a>".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"), "<a href='{url}'>Check archetype metadata: unable to retrieve metadata</a>".format(url=archetypeMetadataUrl)) -else: - if "version=\"{version}\"".format(version=args.version) in archetype_metadata_request.content: - content += createTableRow(traffic_light.format(color="green"), "<a href='{url}'>Check archetype metadata: metadata is correct</a>".format(url=archetypeMetadataUrl)) - else: - content += createTableRow(traffic_light.format(color="red"), "<a href='{url}'>Check archetype metadata: metadata is incorrect</a>".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 <a href=\"http://vaadin.com/download/maven-archetypes.xml\">old Eclipse metadata</a> 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("", "<a href=\"https://github.com/vaadin/framework/milestones\">Create new milestone in GitHub</a>") + +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("", "<a href=\"https://github.com/vaadin/framework/rel content += "</table></body></html>" with open("result/report.html", "wb") as f: - f.write(content) + f.write(content) diff --git a/scripts/GeneratePublishReportPart1.py b/scripts/GeneratePublishReportPart1.py index ec510a95be..b6d3cc55c3 100644 --- a/scripts/GeneratePublishReportPart1.py +++ b/scripts/GeneratePublishReportPart1.py @@ -14,8 +14,8 @@ metadataChecks = { 'https://vaadin.com/download/VERSIONS_7': '^7\..*', 'https://vaadin.com/download/release/7.7/LATEST': '^7\..*', 'https://vaadin.com/download/LATEST': '^6\..*', - 'https://vaadin.com/download/LATEST8': '^{ver}' - # 'https://vaadin.com/download/PRERELEASES': '^{ver}' + 'https://vaadin.com/download/LATEST8': '^8\.1\..*', + 'https://vaadin.com/download/PRERELEASES': '^{ver}' } parser = argparse.ArgumentParser(description="Post-publish report generator") @@ -79,13 +79,15 @@ else: content += "<tr><td></td><td><a href=\"https://github.com/vaadin/framework/milestones\">Create milestone for next version in GitHub</a></td></tr>" -content += """ -<tr><td></td><td><a href="http://test.vaadin.com/{version}/run/LabelModes?restartApplication">Verify uploaded to test.vaadin.com</a></td></tr> -""".format(version=args.version) +#content += """ +#<tr><td></td><td><a href="http://test.vaadin.com/{version}/run/LabelModes?restartApplication">Verify uploaded to test.vaadin.com</a></td></tr> +#""".format(version=args.version) if not prerelease: content += '<tr><td></td><td><a href="http://vaadin.com/api">Verify API version list updated</a></td></tr>' +content += "<tr><td></td><td>Run the generated tag_repositories.sh script</td></tr>" + # close GitHub milestone content += "<tr><td></td><td><a href=\"https://github.com/vaadin/framework/milestones\">Close GitHub Milestone</a></td></tr>" |