Merge "Add job to auto-update new built packer images"
[releng/builder.git] / jjb / releng-jobs.yaml
index 071ca8bc4fea7a6c9c8006659b097525a329eb0e..15005dc954967ee55794ec4958feab43b5160eaf 100644 (file)
       - gerrit-jjb-merge:
           build-node: centos7-builder-4c-4g
           build-timeout: 90
-      - gerrit-jjb-verify
+      - gerrit-jjb-verify:
+          build-timeout: 90
       - builder-check-poms
       - builder-copy-sandbox-logs
       - gerrit-tox-verify
       # Automation for docs and jobs
       - 'builder-update-image-list'
+      - 'builder-update-images'
 
     # The following values are only specified here
     # so that code blocks look similar to other projects.
           gerrit-host: 'git.opendaylight.org'
           gerrit-topic: 'releng-update-cloud-image-list'
           gerrit-commit-message: 'Update cloud image list docs'
-          reviewers-email: 'jluhrsen@redhat.com'
+          reviewers-email: 'jluhrsen@gmail.com'
+
+    publishers:
+      - email-notification:
+          email-recipients: '{email-recipients}'
+          email-prefix: '[releng]'
+      - lf-infra-publish
+
+
+- job-template:
+    name: 'builder-update-images'
+    project-type: freestyle
+    node: centos7-builder-2c-1g
+
+    properties:
+      - opendaylight-infra-properties:
+          build-days-to-keep: 7
+
+    parameters:
+      - opendaylight-infra-parameters:
+          os-cloud: vex
+          project: '{project}'
+          branch: '{branch}'
+          refspec: 'refs/heads/{branch}'
+          artifacts: '{archive-artifacts}'
+
+    scm:
+      - git-scm:
+          branch: '{branch}'
+
+    wrappers:
+      - opendaylight-infra-wrappers:
+          build-timeout: '{build-timeout}'
+      # Listed after to override openstack-infra-wrappers clouds.yaml definition
+      - config-file-provider:
+          files:
+            - file-id: clouds-yaml
+              target: '$HOME/.config/openstack/clouds.yaml'
+
+    triggers:
+      # Update images the day after packer images are built every month on 2nd
+      - timed: '00 H 2 * *'
+
+    builders:
+      - lf-infra-pre-build
+      - shell: !include-raw-escape: opendaylight-infra-update-images.sh
+      - lf-infra-push-gerrit-patch:
+          project: '{project}'
+          gerrit-user: 'jenkins-$SILO'
+          gerrit-host: 'git.opendaylight.org'
+          gerrit-topic: 'releng-update-cloud-images'
+          gerrit-commit-message: 'Update image to the latest'
+          reviewers-email: 'jenkins-releng@opendaylight.org'
 
     publishers:
       - email-notification: