New job for Fuel Plugin Build
[releng.git] / jjb / genesis / genesis-fuel.yml
index fb7a76a..f99fa93 100644 (file)
     installer: 'fuel'
 
     jobs:
-        - 'genesis-fuel-verify-{stream}'
+        - 'genesis-fuel-verify-build-{stream}'
         - 'genesis-fuel-merge-{stream}'
         - 'genesis-fuel-daily-{stream}'
         - 'genesis-fuel-build-{stream}'
         - 'genesis-fuel-deploy-{stream}'
-        - 'genesis-fuel-deploy-virtual-master'
         - 'genesis-fuel-deploy-runner-{stream}'
+        - 'genesis-fuel-lab-reconfig-{stream}'
+        - 'genesis-fuel-verify-deploy-virtual-{stream}'
 
     # stream:    branch with - in place of / (eg. stable-arno)
     # branch:    branch (eg. stable/arno)
@@ -33,7 +34,7 @@
 ########################
 
 - job-template:
-    name: 'genesis-fuel-verify-{stream}'
+    name: 'genesis-fuel-verify-build-{stream}'
 
     project-type: freestyle
 
                     branch-pattern: '**/{branch}'
                 file-paths:
                   - compare-type: ANT
-                    pattern: 'common/**'
+                    pattern: 'common/ci/**'
                   - compare-type: ANT
-                    pattern: '{installer}/**'
+                    pattern: 'common/manifests/**'
+                  - compare-type: ANT
+                    pattern: 'common/puppet-opnfv/**'
+                  - compare-type: ANT
+                    pattern: 'common/tools/**'
+                  - compare-type: ANT
+                    pattern: '{installer}/build/**'
+                  - compare-type: ANT
+                    pattern: '{installer}/ci/**'
+                  - compare-type: ANT
+                    pattern: '{installer}/deploy/**'
+                  - compare-type: ANT
+                    pattern: '{installer}/include/**'
+                  - compare-type: ANT
+                    pattern: '{installer}/prototypes/**'
+                forbidden-file-paths:
+                  - compare-type: ANT
+                    pattern: 'common/docs/**'
+                  - compare-type: ANT
+                    pattern: '{installer}/docs/**'
 
     builders:
-        - shell:
-            echo "Verify disabled"
-
-#- 'fuel-build'
-#- 'fuel-workspace-cleanup'
+        - 'fuel-build'
+        - 'fuel-workspace-cleanup'
 
 - job-template:
     name: 'genesis-fuel-merge-{stream}'
               - project-compare-type: 'ANT'
                 project-pattern: 'genesis'
                 branches:
-                    - branch-compare-type: 'ANT'
-                      branch-pattern: '**/{branch}'
+                  - branch-compare-type: 'ANT'
+                    branch-pattern: '**/{branch}'
                 file-paths:
                   - compare-type: ANT
-                    pattern: 'common/**'
+                    pattern: 'common/ci/**'
                   - compare-type: ANT
-                    pattern: '{installer}/**'
+                    pattern: 'common/manifests/**'
+                  - compare-type: ANT
+                    pattern: 'common/puppet-opnfv/**'
+                  - compare-type: ANT
+                    pattern: 'common/tools/**'
+                  - compare-type: ANT
+                    pattern: '{installer}/build/**'
+                  - compare-type: ANT
+                    pattern: '{installer}/ci/**'
+                  - compare-type: ANT
+                    pattern: '{installer}/deploy/**'
+                  - compare-type: ANT
+                    pattern: '{installer}/include/**'
+                  - compare-type: ANT
+                    pattern: '{installer}/prototypes/**'
+                forbidden-file-paths:
+                  - compare-type: ANT
+                    pattern: 'common/docs/**'
+                  - compare-type: ANT
+                    pattern: '{installer}/docs/**'
 
     builders:
-        - shell:
-            echo "Merge Job Disabled"
-
-#- 'fuel-build'
-#- 'fuel-workspace-cleanup'
+        - 'fuel-build'
+        - 'fuel-workspace-cleanup'
 
 - job-template:
     name: 'genesis-fuel-daily-{stream}'
             git-revision: true
             block: true
         - trigger-builds:
-          - project: 'genesis-fuel-deploy-runner-{stream}'
+          - project: 'genesis-fuel-lab-reconfig-{stream}'
             git-revision: true
             block: true
         - trigger-builds:
-          - project: 'functest-opnfv-jump-1'
+          - project: 'genesis-fuel-deploy-{stream}'
+            git-revision: true
             block: true
         - trigger-builds:
-          - project: 'yardstick-opnfv-jump-1'
+          - project: 'functest-fuel-{stream}'
+            block: true
+            block-thresholds:
+                build-step-failure-threshold: 'never'
+                failure-threshold: 'never'
+                unstable-threshold: 'FAILURE'
+        - trigger-builds:
+          - project: 'yardstick-fuel-{stream}'
+            block: true
+            block-thresholds:
+                build-step-failure-threshold: 'never'
+                failure-threshold: 'never'
+                unstable-threshold: 'FAILURE'
+
+- job-template:
+    name: 'genesis-fuel-deploy-runner-{stream}'
+
+    project-type: freestyle
+
+    disabled: false
+
+    node: master
+
+    logrotate:
+        daysToKeep: 30
+        numToKeep: 10
+        artifactDaysToKeep: -1
+        artifactNumToKeep: -1
+
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - foreman-parameter:
+            installer: '{installer}'
+            gs-pathname: '{gs-pathname}'
+        - string:
+            name: GIT_BASE
+            default: ssh://gerrit.opnfv.org:29418/$PROJECT
+            description: "Used for overriding the GIT URL coming from parameters macro."
+
+    scm:
+        - git-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: ''
+            branch: '{branch}'
+
+    properties:
+        - build-blocker:
+            use-build-blocker: true
+            blocking-jobs:
+                - "genesis-foreman-daily.*"
+                - "genesis-foreman-deploy-runner-{stream}"
+                - "genesis-fuel-daily.*"
+
+    builders:
+        - 'fuel-lab-reconfig'
+        - trigger-builds:
+          - project: 'genesis-fuel-deploy-{stream}'
+            git-revision: true
             block: true
 
 - job-template:
         - 'fuel-upload-artifact'
         - 'fuel-workspace-cleanup'
 
+    publishers:
+        - email:
+            recipients: jonas.bjurel@ericsson.com stefan.k.berg@ericsson.com
+
 - job-template:
     name: 'genesis-fuel-deploy-{stream}'
 
         - string:
             name: GIT_BASE
             default: ssh://gerrit.opnfv.org:29418/$PROJECT
-            description: "POD1 has some issues with cloning using https so that's why GIT_BASE is overriden here again."
+            description: "POD2 has some issues with cloning using https so that's why GIT_BASE is overriden here again."
 
     scm:
         - git-scm:
 
     builders:
         - 'fuel-download-artifact'
-        - 'fuel-deploy-{stream}'
+        - 'fuel-opendaylight-plugin-build'
+        - 'fuel-deploy'
+
+    publishers:
+        - email:
+            recipients: jonas.bjurel@ericsson.com stefan.k.berg@ericsson.com
 
 - job-template:
-    name: 'genesis-fuel-deploy-runner-{stream}'
+    name: 'genesis-fuel-lab-reconfig-{stream}'
 
     project-type: freestyle
 
             refspec: ''
             branch: '{branch}'
 
+    properties:
+        - build-blocker:
+            use-build-blocker: true
+            blocking-jobs:
+                - "genesis-foreman-daily.*"
+
     builders:
         - 'fuel-lab-reconfig'
-        - trigger-builds:
-          - project: 'genesis-fuel-deploy-{stream}'
-            git-revision: true
-            block: true
 
 - job-template:
-    name: 'genesis-fuel-deploy-virtual-master'
+    name: 'genesis-fuel-verify-deploy-virtual-{stream}'
 
     project-type: freestyle
 
-    disabled: false
+    disabled: true
 
     node: ericsson-build
 
         - git-scm:
             credentials-id: '{ssh-credentials}'
             refspec: ''
-            branch: master
+            branch: 'master'
 
     logrotate:
         daysToKeep: 30
             echo "Done!"
 
 - builder:
-    name: 'fuel-deploy-master'
+    name: 'fuel-opendaylight-plugin-build'
     builders:
         - shell: |
             #!/bin/bash
             set -o nounset
             set -o pipefail
 
-            # source the file so we get OPNFV vars
-            source latest.properties
-
-            # echo the info about artifact that is used during the deployment
-            echo "Using $(echo $OPNFV_ARTIFACT_URL | cut -d'/' -f4) for deployment"
-
-            # create TMPDIR if it doesn't exist
-            export TMPDIR=$HOME/tmpdir
-            [[ -d $TMPDIR ]] || mkdir -p $TMPDIR
-
-            # change permissions down to TMPDIR
-            chmod a+x $HOME
-            chmod a+x $TMPDIR
-
-            # set TOPDIR, CONFDIR
-            export TOPDIR=$WORKSPACE/fuel/prototypes/auto-deploy
-            export CONFDIR=$WORKSPACE/fuel/deploy/baremetal/conf/linux_foundation_lab/pod2/multinode
-
-            # cleanup first
-            sudo $WORKSPACE/common/ci/clean.sh -base_config $WORKSPACE/foreman/ci/inventory/lf_pod2_ksgen_settings.yml
-
             # log info to console
-            echo "Starting the deployment using $INSTALLER. This could take some time..."
+            echo "Starting the build of Fuel Opendaylight Plugin. This could take some time..."
             echo "--------------------------------------------------------"
             echo
 
-            # start the deployment
-            echo "Issuing command"
-            echo "sudo TMPDIR=${TMPDIR} ${TOPDIR}/deploy/deploy.sh ${WORKSPACE}/opnfv.iso ${CONFDIR}/dea.yaml ${CONFDIR}/dha.yaml"
-            sudo TMPDIR=${TMPDIR} ${TOPDIR}/deploy/deploy.sh ${WORKSPACE}/opnfv.iso ${CONFDIR}/dea.yaml ${CONFDIR}/dha.yaml
+            export ODL_PLUGIN_BRANCH="juno/lithium-sr1"
+
+            cd $WORKSPACE
+            git clone https://github.com/stackforge/fuel-plugin-opendaylight
+
+            pushd $WORKSPACE/fuel-plugin-opendaylight
+            git checkout $ODL_PLUGIN_BRANCH
+            popd
+
+            fpb --build fuel-plugin-opendaylight/
 
             echo
             echo "--------------------------------------------------------"
             echo "Done!"
 
 - builder:
-    name: 'fuel-deploy-stable-arno'
+    name: 'fuel-deploy'
     builders:
         - shell: |
             #!/bin/bash
             echo "Using $(echo $OPNFV_ARTIFACT_URL | cut -d'/' -f4) for deployment"
 
             # create TMPDIR if it doesn't exist
-            export TMPDIR=$HOME/tmp/$JOB_NAME
+            export TMPDIR=$HOME/tmpdir
             [[ -d $TMPDIR ]] || mkdir -p $TMPDIR
 
             # change permissions down to TMPDIR
             chmod a+x $HOME
             chmod a+x $TMPDIR
 
-            # set CONFDIR
-            export CONFDIR=$WORKSPACE/fuel/deploy/baremetal/conf/linux_foundation_lab/pod2/ha
+            # set CONFDIR, BRIDGE
+            export CONFDIR=$WORKSPACE/fuel/deploy/templates/hardware_environment/conf/linux_foundation_lab/pod2
+            export BRIDGE=pxebr
+            export PLUGIN=$WORKSPACE/fuel-plugin-opendaylight
 
             # cleanup first
             sudo $WORKSPACE/common/ci/clean.sh -base_config $WORKSPACE/foreman/ci/inventory/lf_pod2_ksgen_settings.yml
 
+            # prepare for Fuel Deployment
+            sudo $WORKSPACE/common/ci/setup.sh
+
             # log info to console
             echo "Starting the deployment using $INSTALLER. This could take some time..."
             echo "--------------------------------------------------------"
 
             # start the deployment
             echo "Issuing command"
-            echo "sudo $WORKSPACE/fuel/ci/deploy.sh $WORKSPACE/opnfv.iso ${CONFDIR}/dea.yaml ${CONFDIR}/dha.yaml -s $TMPDIR"
+            echo "sudo $WORKSPACE/fuel/ci/deploy.sh -iso $WORKSPACE/opnfv.iso -dea $CONFDIR/dea.yaml -dha $CONFDIR/dha.yaml -s $TMPDIR -b $BRIDGE -p $PLUGIN"
+            sudo $WORKSPACE/fuel/ci/deploy.sh -iso $WORKSPACE/opnfv.iso -dea $CONFDIR/dea.yaml -dha $CONFDIR/dha.yaml -s $TMPDIR -b $BRIDGE -p $PLUGIN
 
-            sudo $WORKSPACE/fuel/ci/deploy.sh $WORKSPACE/opnfv.iso ${CONFDIR}/dea.yaml ${CONFDIR}/dha.yaml -s $TMPDIR
             echo
             echo "--------------------------------------------------------"
             echo "Done!"
             done
 
             if [ "$ping_flag" -eq 1 ]; then
-              echo "Slave is pingable, now wait 60 seconds for services to start"
-              sleep 60
+              echo "Slave is pingable, now wait 180 seconds for services to start"
+              sleep 180
             else
               echo "Slave did not come back up after reboot: please check opnfv-jump-2"
               exit 1
 - trigger:
     name: 'fuel-master'
     triggers:
-        - timed: '0 21 * * *'
+        - timed: '0 3 * * *'
 
 - trigger:
     name: 'fuel-stable-arno'
     triggers:
-        - timed: '0 3 * * *'
+        - timed: '0 7 * * *'