From fbccf94bda7852f86ea5bb417c8271b6ffb2ff85 Mon Sep 17 00:00:00 2001 From: Julien Date: Mon, 12 Dec 2016 22:41:38 +0800 Subject: Add support to dedicated file monitor docker build Add a new type of template for projects whose docker image only relevant with Dockerfile or file in the same path and any other code changes will not affect the docker img. Add daisy into new type of template. Change-Id: Ib2c9f0aab74e8b226a1b5c6cb4cf9c6a213b4186 Signed-off-by: Julien-zte --- jjb/releng/opnfv-docker.yml | 42 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) (limited to 'jjb') diff --git a/jjb/releng/opnfv-docker.yml b/jjb/releng/opnfv-docker.yml index 7a4c9af51..4813a8877 100644 --- a/jjb/releng/opnfv-docker.yml +++ b/jjb/releng/opnfv-docker.yml @@ -45,6 +45,18 @@ - '{project}-docker-build-push-{stream}' +- project: + + name: opnfv-monitor-docker # projects which only monitor dedicated file or path + + project: + # projects with jobs for master + - 'daisy': + <<: *master + + jobs: + - '{project}-docker-build-push-monitor-{stream}' + ######################## # job templates ######################## @@ -53,7 +65,7 @@ disabled: '{obj:disabled}' - parameters: + parameters: ¶meters - project-parameter: project: '{project}' - 'opnfv-build-ubuntu-defaults' @@ -70,13 +82,13 @@ default: "" description: "Release version, e.g. 1.0, 2.0, 3.0" - scm: + scm: &scm - git-scm: credentials-id: '{ssh-credentials}' refspec: '' branch: '{branch}' - builders: + builders: &builders - shell: !include-raw-escape: ./opnfv-docker.sh @@ -84,3 +96,27 @@ - pollscm: cron: "*/30 * * * *" +- job-template: + name: '{project}-docker-build-push-monitor-{stream}' + disabled: '{obj:disabled}' + parameters: *parameters + scm: *scm + builders: *builders + + # trigger only matching the file name + triggers: + - gerrit: + trigger-on: + - change-merged-event + - comment-added-contains-event: + comment-contains-value: 'remerge' + projects: + - project-compare-type: 'ANT' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + file-paths: + - compare-type: ANT + pattern: 'docker/**' + -- cgit 1.2.3-korg