From de98281e5c37598454c79c7673fb11ada13eea33 Mon Sep 17 00:00:00 2001 From: Aleksi Hietanen Date: Thu, 3 Nov 2016 09:26:11 +0200 Subject: Improve GenerateBuildTestAndStagingReport - Filters out testbench from @since check - Adds links to staging repositories - Adds direct links to apidiffs for each module Change-Id: I4b83b68dc1d0ab94252fb23303e3fcc4a2a041bc --- scripts/GenerateBuildTestAndStagingReport.py | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/scripts/GenerateBuildTestAndStagingReport.py b/scripts/GenerateBuildTestAndStagingReport.py index dadc4d0ac0..32e2c9dde7 100644 --- a/scripts/GenerateBuildTestAndStagingReport.py +++ b/scripts/GenerateBuildTestAndStagingReport.py @@ -54,6 +54,20 @@ def getDemoLinksHtml(): demos_html += "
  • {demoName}
  • ".format(url=args.deployUrl, demoName=demo, version=args.version) return demos_html + "" +def getApiDiffHtml(): + apidiff_html = "Check API diff" + apidiff_html += "" + def getDirs(url): page = requests.get(url) files = re.findall('(.*)', page.text) @@ -87,9 +101,9 @@ def checkStagingContents(url, allowedArtifacts): def getStagingContentsHtml(repoUrl, allowedArtifacts, name): if checkStagingContents(repoUrl, allowedArtifacts): - return createTableRow(traffic_light.format(color="green"), "No extra artifacts found in the {} staging repository".format(name)) + return createTableRow(traffic_light.format(color="green"), "No extra artifacts found in the {} staging repository. Link to the repository.".format(name, repoUrl)) else: - return createTableRow(traffic_light.format(color="red"), "Extra artifacts found in the {} staging repository".format(name)) + return createTableRow(traffic_light.format(color="red"), "Extra artifacts found in the {} staging repository. Link to the repository.".format(name, repoUrl)) def completeArtifactName(artifactId, version): return 'com/vaadin/' + artifactId + '/' + version @@ -115,7 +129,7 @@ content += getTestStatusHtml() try: p1 = subprocess.Popen(['find', '.', '-name', '*.java'], stdout=subprocess.PIPE) p2 = subprocess.Popen(['xargs', 'egrep', '-n', '@since ?$'], stdin=p1.stdout, stdout=subprocess.PIPE) - missing = subprocess.check_output(['egrep', '-v', '/(test|tests|target)/'], stdin=p2.stdout) + missing = subprocess.check_output(['egrep', '-v', '/(testbench|test|tests|target)/'], stdin=p2.stdout) content += createTableRow(traffic_light.format(color="red"), "Empty @since:
    %s
    " % (missing)) except subprocess.CalledProcessError as e: @@ -136,7 +150,7 @@ content += createTableRow("", getDemoLinksHtml()) # link to release notes content += createTableRow("", "Check release notes".format(args.buildId)) # link to api diff -content += createTableRow("", "Check API diff".format(args.buildId)) +content += createTableRow("", getApiDiffHtml()) # closed fixed tickets without a milestone content += createTableRow("", "Closed fixed tickets without milestone {version}".format(version=args.version)) @@ -149,7 +163,7 @@ content += createTableRow("", "Preparations before publishing") # create milestone for next release -content += createTableRow("", "Create milestone for nex release") +content += createTableRow("", "Create milestone for next release") # close trac milestone content += createTableRow("", "Close Trac Milestone".format(version=args.version)) # verify pending release tickets still have milestone -- cgit v1.2.3