You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/09/01 13:24:36 UTC

[GitHub] [beam] kamilwu commented on a change in pull request #12685: [BEAM-10807] Add scheduled mail with metrics report

kamilwu commented on a change in pull request #12685:
URL: https://github.com/apache/beam/pull/12685#discussion_r481134344



##########
File path: .test-infra/jenkins/build.gradle
##########
@@ -20,3 +20,32 @@ plugins {
   id 'org.apache.beam.module'
 }
 applyGroovyNature()
+applyPythonNature()
+
+pythonVersion = '3.8'
+
+task generateMetricsReport {
+  dependsOn setupVirtualenv
+  def metricsReportFilename = "beam-metrics_report.html"
+  def generateMetricsReportDir = "${rootDir}/.test-infra/jenkins/metrics_report"
+  def generateMetricsReportPath = "${generateMetricsReportDir}/${metricsReportFilename}"
+  def toxConfigFilePath = "${rootDir}/.test-infra/jenkins/metrics_report/tox.ini"
+
+  def influxDb = project.findProperty('influxDb')
+  def influxHost = project.findProperty('influxHost')
+  def influxPort = project.findProperty('influxPort')
+
+  doLast {
+    exec {
+      executable 'sh'
+      args '-c', ". ${envdir}/bin/activate && tox -e py38-test -c ${toxConfigFilePath}"
+    }
+    exec {
+      executable 'sh'
+      args '-c', ". ${envdir}/bin/activate && tox -e py38-generate-report -c ${toxConfigFilePath} -- --influx-db=${influxDb} --influx-host=${influxHost} --influx-port=${influxPort} --output-file=${generateMetricsReportPath}"
+    }
+    logger.info('Create metrics report file {}', generateMetricsReportPath)
+  }
+  outputs.file "${generateMetricsReportPath}"
+}
+build.dependsOn generateMetricsReport

Review comment:
       Your report would be generated every time someone builds the whole project (by executing `./gradlew build`). I think this is not what we wanted. Could you remove this line?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org