Merge "Add job to auto-update new built packer images"
[releng/builder.git] / jjb / releng-jobs.yaml
index f07f229d5ca47717323ae2112ab8eaefefaca325..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
-      - builder-openstack-cron
       - 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.
     build-node: centos7-builder-2c-2g
     archive-artifacts: '**/*.log'
     build-timeout: 30
-    jjb-version: 2.0.6
-    jenkins-urls: >
-      https://jenkins.opendaylight.org/releng
-      https://jenkins.opendaylight.org/sandbox
+    jjb-version: 2.9.1
 
 - project:
-    name: packer-jobs
-    # packer jobs templates are defined in global-jjb
+    name: builder-openstack
     jobs:
-      - '{project-name}-packer-jobs'
+      - gerrit-openstack-cron
+
     project: 'releng/builder'
     project-name: builder
-    branch: master
-    archive-artifacts: '**/*.log'
-    build-node: centos7-builder-2c-1g
-
-    platforms:
-      - centos
-      - ubuntu-14.04
-      - ubuntu-16.04
-
-    templates:
-      - devstack
-      - devstack-pre-pip-ocata:
-          build-timeout: 75
-      - devstack-pre-pip-pike:
-          build-timeout: 75
-      - gbp
-      - mininet-ovs-2.5:
-          build-timeout: 60
-      - mininet-ovs-2.6:
-          build-timeout: 75
-
-    exclude:
-      - platforms: centos
-        templates: gbp
-      - platforms: centos
-        templates: mininet-ovs-2.5
-      - platforms: centos
-        templates: mininet-ovs-2.6
-      - platforms: ubuntu-14.04
-        templates: devstack-pre-pip-ocata
-      - platforms: ubuntu-14.04
-        templates: devstack-pre-pip-pike
-      - platforms: ubuntu-14.04
-        templates: devstack
-      - platforms: ubuntu-14.04
-        templates: mininet-ovs-2.5
-      - platforms: ubuntu-14.04
-        templates: mininet-ovs-2.6
-      - platforms: ubuntu-16.04
-        templates: devstack-pre-pip-ocata
-      - platforms: ubuntu-16.04
-        templates: devstack-pre-pip-pike
-      - platforms: ubuntu-16.04
-        templates: devstack
+    build-node: centos7-builder-2c-2g
+
+    jenkins-urls: >
+        https://jenkins.opendaylight.org/releng
+        https://jenkins.opendaylight.org/sandbox
+    openstack-cloud: vex
 
 - job-template:
     name: builder-check-poms
 
 
 - job-template:
-    name: builder-openstack-cron
+    name: 'builder-update-image-list'
     project-type: freestyle
-    node: '{build-node}'
-    concurrent: true
+    node: centos7-builder-2c-1g
 
     properties:
-      - lf-infra-properties:
+      - opendaylight-infra-properties:
           build-days-to-keep: 7
 
     parameters:
-      - lf-infra-parameters:
+      - opendaylight-infra-parameters:
+          os-cloud: vex
           project: '{project}'
-          stream: '{stream}'
           branch: '{branch}'
-          lftools-version: '{lftools-version}'
-      - string:
-          name: OS_CLOUD
-          default: '{os-cloud}'
-          description: Artifacts to archive to the logs server.
-      - string:
-          name: ARCHIVE_ARTIFACTS
-          default: '{archive-artifacts}'
-          description: Artifacts to archive to the logs server.
-      - string:
-          name: JENKINS_URLS
-          default: '{jenkins-urls}'
-          description: 'Space separated list of Jenkins URLs to check for active builds'
+          refspec: 'refs/heads/{branch}'
+          artifacts: '{archive-artifacts}'
 
     scm:
       - git-scm:
           branch: '{branch}'
 
     wrappers:
-      - lf-infra-wrappers:
+      - opendaylight-infra-wrappers:
           build-timeout: '{build-timeout}'
-          jenkins-ssh-credential: '{jenkins-ssh-credential}'
       # Listed after to override openstack-infra-wrappers clouds.yaml definition
       - config-file-provider:
           files:
             - file-id: clouds-yaml
               target: '$HOME/.config/openstack/clouds.yaml'
-            - file-id: npmrc
-              target: '$HOME/.npmrc'
-            - file-id: pipconf
-              target: '$HOME/.config/pip/pip.conf'
 
     triggers:
-      - timed: '0,30 * * * *'
+      # Update image list every Monday to Friday at 11:00 UTC
+      - timed: '0 11 * * 1-5'
 
     builders:
-      - odl-openstack-install
-      # Servers
-      - odl-openstack-cleanup-stale-stacks
-      - odl-openstack-cleanup-stale-nodes
-      - odl-openstack-cleanup-orphaned-nodes
-      # Volumes
-      - odl-openstack-cleanup-stale-volumes
-      # Images
-      - odl-openstack-check-image-protection
-      - odl-openstack-cleanup-old-images
+      - shell: !include-raw-escape: opendaylight-infra-update-image-list.sh
+      - lf-infra-push-gerrit-patch:
+          project: '{project}'
+          gerrit-user: 'jenkins-$SILO'
+          gerrit-host: 'git.opendaylight.org'
+          gerrit-topic: 'releng-update-cloud-image-list'
+          gerrit-commit-message: 'Update cloud image list docs'
+          reviewers-email: 'jluhrsen@gmail.com'
 
     publishers:
+      - email-notification:
+          email-recipients: '{email-recipients}'
+          email-prefix: '[releng]'
       - lf-infra-publish
 
+
 - job-template:
-    name: 'builder-update-image-list'
+    name: 'builder-update-images'
     project-type: freestyle
     node: centos7-builder-2c-1g
 
               target: '$HOME/.config/openstack/clouds.yaml'
 
     triggers:
-      # Update image list every Monday to Friday at 11:00 UTC
-      - timed: '0 11 * * 1-5'
+      # Update images the day after packer images are built every month on 2nd
+      - timed: '00 H 2 * *'
 
     builders:
-      - shell: !include-raw-escape: opendaylight-infra-update-image-list.sh
+      - 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-image-list'
-          gerrit-commit-message: 'Update cloud image list docs'
-          reviewers-email: 'jluhrsen@redhat.com'
+          gerrit-topic: 'releng-update-cloud-images'
+          gerrit-commit-message: 'Update image to the latest'
+          reviewers-email: 'jenkins-releng@opendaylight.org'
 
     publishers:
       - email-notification: