Merge "Add job to auto-update new built packer images"
[releng/builder.git] / jjb / releng-jobs.yaml
index ba5479ee141cd44e51899a3dbef5041c59c69998..15005dc954967ee55794ec4958feab43b5160eaf 100644 (file)
@@ -8,17 +8,21 @@
           rtd-token: e9fa62bd60a39c22de631791309ccacc37a9929e
       - gerrit-jenkins-cfg-merge:
           jenkins-silos: releng sandbox
+      - gerrit-jenkins-cfg-verify:
+          jenkins-silos: releng sandbox
       - gerrit-jenkins-sandbox-cleanup
       - gerrit-jjb-deploy-job
       - 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.
@@ -29,7 +33,7 @@
     build-node: centos7-builder-2c-2g
     archive-artifacts: '**/*.log'
     build-timeout: 30
-    jjb-version: 2.8.0
+    jjb-version: 2.9.1
 
 - project:
     name: builder-openstack
           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: