[ 
https://issues.apache.org/jira/browse/BEAM-5863?focusedWorklogId=437841&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-437841
 ]

ASF GitHub Bot logged work on BEAM-5863:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 27/May/20 15:14
            Start Date: 27/May/20 15:14
    Worklog Time Spent: 10m 
      Work Description: kamilwu commented on a change in pull request #11816:
URL: https://github.com/apache/beam/pull/11816#discussion_r431219888



##########
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:
       To be honest, I don't know if this is possible. We're using ghprb plugin 
to integrate Github with Jenkins, and comments from this issue 
(https://github.com/jenkinsci/ghprb-plugin/issues/651) claim this feature 
(triggering on merging to master) is outside the scope of the plugin. That's 
why I decided to create a cron job (Website_Publish is based on a cron job too).
   
   Do you want me to continue searching for a trigger-on-merge solution? 




----------------------------------------------------------------
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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 437841)
    Time Spent: 40m  (was: 0.5h)

> Automate Community Metrics infrastructure deployment
> ----------------------------------------------------
>
>                 Key: BEAM-5863
>                 URL: https://issues.apache.org/jira/browse/BEAM-5863
>             Project: Beam
>          Issue Type: Sub-task
>          Components: community-metrics, project-management
>            Reporter: Scott Wegner
>            Assignee: Kamil Wasilewski
>            Priority: P3
>              Labels: community-metrics
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Currently the deployment process for the production Community Metrics stack 
> is manual (documented 
> [here|https://cwiki.apache.org/confluence/display/BEAM/Community+Metrics]). 
> If we end up having to deploy more than a few times a year, it would be nice 
> to automate these steps.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to