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

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

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



##########
File path: .test-infra/metrics/build_and_publish_containers.sh
##########
@@ -36,8 +33,8 @@ fi
 
 echo
 echo ===========Start==========
-CONTAINER_VERSION_NAME=$1
-DO_PUSH=$2
+DO_PUSH=$1
+CONTAINER_VERSION_NAME=${2:-latest}

Review comment:
       will latest overwrite container image version? If not, we should add 
cleanup script for old versions.

##########
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:
       Is there a reason to detect timee vs automatic job trigger by commit to 
master with relevant folder?




----------------------------------------------------------------
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: 437471)
    Time Spent: 0.5h  (was: 20m)

> 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: 0.5h
>  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