Ardagan commented on a change in pull request #11816:
URL: https://github.com/apache/beam/pull/11816#discussion_r431267893



##########
File path: .test-infra/metrics/build.gradle
##########
@@ -50,9 +51,49 @@ dockerCompose {
 
 dockerCompose.isRequiredBy(testMetricsStack)
 
-task preCommit { dependsOn testMetricsStack }
+task validateConfiguration(type: Exec) {
+  commandLine 'sh', '-c', 'kubectl apply --dry-run=true -Rf kubernetes'
+}
+
+task preCommit {
+  dependsOn validateConfiguration
+  dependsOn testMetricsStack
+}
+
+task buildAndPublishContainers(type: Exec) {
+  commandLine './build_and_publish_containers.sh', 'true'
+}
+
+// Applies new configuration to all resources labeled with `app=beammetrics`
+// and forces Kubernetes to re-pull images.
+task applyConfiguration() {
+  doLast {
+    assert grgit : 'Cannot use outside of git repository'
+
+    def git = grgit.open()
+    def commitedChanges = git.log(paths: ['.test-infra/metrics']).findAll {
+      it.dateTime > ZonedDateTime.now().minusHours(6)

Review comment:
       Postcommit job builder already [triggers on 
commit](https://github.com/apache/beam/blob/master/.test-infra/jenkins/CommonJobProperties.groovy#L206)
 but it also triggers periodically. It actually makes sense to attempt 
deployment periodically in case trigger fails. Lets keep it as is.




----------------------------------------------------------------
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:
[email protected]


Reply via email to