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 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. args = parser.parse_args()
  11. content = """<html>
  12. <head></head>
  13. <body>
  14. <table>
  15. """
  16. content += "<tr><td>Try demos<ul>"
  17. for demo in demos:
  18. content += "<li><a href='{url}/{demoName}-{version}'>{demoName}</a></li>\n".format(url=args.deployUrl, demoName=demo, version=args.version)
  19. content += "</ul></td></tr>\n<tr><td>Try archetype demos<ul>"
  20. for archetype in archetypes:
  21. content += "<li><a href='{url}/{context}'>{demo}</a></li>\n".format(url=args.deployUrl, demo=archetype, context=getDeploymentContext(archetype, args.version))
  22. content += """</ul></td></tr>
  23. <tr><td><a href="{repoUrl}">Staging repository</a></td></tr>
  24. <tr><td>Eclipse Ivy Settings:<br><pre>""".format(repoUrl=args.stagingRepo)
  25. content += cgi.escape(""" <ibiblio name="vaadin-staging" usepoms="true" m2compatible="true"
  26. root="{repoUrl}" />""".format(repoUrl=args.stagingRepo))
  27. content += """</pre>
  28. </td></tr>
  29. <tr><td><a href="https://dev.vaadin.com/milestone/Vaadin {version}">Trac Milestone</a></td></tr>
  30. <tr><td><a href="https://dev.vaadin.com/admin/ticket/versions">Add version {version} to Trac</td></tr>
  31. <tr><td><a href="{url}">Staging result page (See test results, pin and tag build and dependencies)</a></td></tr>
  32. </table>
  33. </body>
  34. </html>""".format(url=args.buildResultUrl, repoUrl=args.stagingRepo, version=args.version)
  35. f = open("result/report.html", 'w')
  36. f.write(content)