From: Alexandru Avadanii Date: Wed, 15 Apr 2020 19:11:34 +0000 (+0200) Subject: validation: Only run tagged docker build once X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=ci-management.git;a=commitdiff_plain;h=d75743b4b5b8bd7117a804af950d4b39e35bea04 validation: Only run tagged docker build once Previously, we used to manually change the release tag for the Docker container image(s) built for the validation project, let the build run once, then create another change that disabled the job to prevent further (useless) rebuilds happening each night. Instead of triggering the docker build job for the release (tag) using cron, switch to triggering the job based on gerrit merge events affecting the ci-management repository and only if the said merge event affects the 'validation-docker.yaml' configuration file (the one where the release tag is defined/updated). Change-Id: Ia4493b558ee7d1319c42a04690aa1c7580eb3731 Signed-off-by: Alexandru Avadanii --- diff --git a/jjb/akraino-templates/akraino-validation-templates.yaml b/jjb/akraino-templates/akraino-validation-templates.yaml index 8a64fed..33fb9be 100644 --- a/jjb/akraino-templates/akraino-validation-templates.yaml +++ b/jjb/akraino-templates/akraino-validation-templates.yaml @@ -23,9 +23,7 @@ - 'validation-docker-.*' block-level: 'NODE' - triggers: - # Build nigtly at 12:10 AM - - timed: '10 0 * * *' + triggers: '{obj:triggers}' builders: - multijob: diff --git a/jjb/validation/validation-docker.yaml b/jjb/validation/validation-docker.yaml index c8fffa6..539ed75 100644 --- a/jjb/validation/validation-docker.yaml +++ b/jjb/validation/validation-docker.yaml @@ -7,9 +7,28 @@ - master: branch: '{stream}' disabled: false + triggers: + # Build nigtly at 12:10 AM + - timed: '10 0 * * *' - 3.0.0: branch: 'master' disabled: false + triggers: + - gerrit: + server-name: '{gerrit-server-name}' + trigger-on: + - change-merged-event + - comment-added-contains-event: + comment-contains-value: remerge$ + projects: + - project-compare-type: ANT + project-pattern: 'ci-management' + branches: + - branch-compare-type: ANT + branch-pattern: '**/master' + file-paths: + - compare-type: REG_EXP + pattern: 'jjb/validation/validation-docker.yaml' arch_tag: - 'amd64':