You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

GenerateStagingReport.py 4.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. #coding=UTF-8
  2. from BuildArchetypes import archetypes, getDeploymentContext
  3. from BuildDemos import demos
  4. import argparse, cgi
  5. parser = argparse.ArgumentParser(description="Build report generator")
  6. parser.add_argument("version", type=str, help="Vaadin version that was just built")
  7. parser.add_argument("deployUrl", type=str, help="Base url of the deployment server")
  8. parser.add_argument("buildResultUrl", type=str, help="URL for the build result page")
  9. parser.add_argument("stagingRepo", type=str, help="URL for the staging repository")
  10. parser.add_argument("tbapiUrl", type=str, help="URL for the TestBench API build")
  11. parser.add_argument("frameworkRevision", type=str, default="[fill in framework repository revision]", nargs="?")
  12. parser.add_argument("screenshotRevision", type=str, default="[fill in screenshot repository revision]", nargs="?")
  13. parser.add_argument("archetypeRevision", type=str, default="[fill in maven-integration repository revision]", nargs="?")
  14. parser.add_argument("mavenPluginRevision", type=str, default="[fill in maven-plugin repository revision]", nargs="?")
  15. args = parser.parse_args()
  16. content = """<html>
  17. <head></head>
  18. <body>
  19. <table>
  20. """
  21. content += "<tr><td>Try demos<ul>"
  22. for demo in demos:
  23. content += "<li><a href='{url}/{demoName}-{version}'>{demoName}</a></li>\n".format(url=args.deployUrl, demoName=demo, version=args.version)
  24. content += "</ul></td></tr>\n<tr><td>Try archetype demos<ul>"
  25. for archetype in archetypes:
  26. content += "<li><a href='{url}/{context}'>{demo}</a></li>\n".format(url=args.deployUrl, demo=archetype, context=getDeploymentContext(archetype, args.version))
  27. content += """</ul></td></tr>
  28. <tr><td><a href="{repoUrl}">Staging repository</a></td></tr>
  29. <tr><td>Eclipse Ivy Settings:<br><pre>""".format(repoUrl=args.stagingRepo)
  30. content += cgi.escape(""" <ibiblio name="vaadin-staging" usepoms="true" m2compatible="true"
  31. root="{repoUrl}" />""".format(repoUrl=args.stagingRepo))
  32. content += """</pre>
  33. </td></tr>
  34. <tr><td><a href="https://dev.vaadin.com/milestone/Vaadin {version}">Close Trac Milestone</a></td></tr>
  35. <tr><td><a href="https://dev.vaadin.com/query?status=pending-release&component=Core+Framework&resolution=fixed&col=id&col=summary&col=component&col=milestone&col=status&col=type">Verify pending release tickets still have milestone {version}</a></td></tr>
  36. <tr><td><a href="https://dev.vaadin.com/admin/ticket/versions">Add version {version} to Trac</td></tr>
  37. <tr><td><a href="{url}">Staging result page (See test results, pin and tag build and dependencies)</a></td></tr>
  38. <tr><td>Commands to tag all repositories (warning: do not run as a single script but set variables and check before any push commands - this has not been tested yet and the change IDs are missing)</td></tr>
  39. <tr><td><pre>
  40. VERSION={version}
  41. GERRIT_USER=[fill in your gerrit username]
  42. FRAMEWORK_REVISION={frameworkRevision}
  43. SCREENSHOTS_REVISION={screenshotRevision}
  44. ARCHETYPES_REVISION={archetypeRevision}
  45. PLUGIN_REVISION={mavenPluginRevision}
  46. git clone ssh://$GERRIT_USER@dev.vaadin.com:29418/vaadin
  47. cd vaadin
  48. git tag -a -m"$VERSION" $VERSION $FRAMEWORK_REVISION
  49. git push --tags
  50. cd ..
  51. git clone ssh://$GERRIT_USER@dev.vaadin.com:29418/vaadin-screenshots
  52. cd vaadin-screenshots
  53. git tag -a -m"$VERSION" $VERSION $SCREENSHOTS_REVISION
  54. git push --tags
  55. cd ..
  56. git clone ssh://$GERRIT_USER@dev.vaadin.com:29418/maven-integration
  57. cd maven-integration
  58. git tag -a -m"$VERSION" $VERSION $ARCHETYPES_REVISION
  59. git push --tags
  60. cd ..
  61. git clone ssh://$GERRIT_USER@dev.vaadin.com:29418/maven-plugin
  62. cd maven-plugin
  63. git tag -a -m"$VERSION" $VERSION $PLUGIN_REVISION
  64. git push --tags
  65. cd ..
  66. </pre></td></tr>
  67. <tr><td><a href="{tbapi}">Build and publish TestBench API for version {version} if proceeding</a></td></tr>
  68. </table>
  69. </body>
  70. </html>""".format(url=args.buildResultUrl, repoUrl=args.stagingRepo, version=args.version, tbapi=args.tbapiUrl, frameworkRevision=args.frameworkRevision, screenshotRevision=args.screenshotRevision, archetypeRevision=args.archetypeRevision, mavenPluginRevision=args.mavenPluginRevision)
  71. f = open("result/report.html", 'w')
  72. f.write(content)