Merge "fix doc-build.sh to support referring to other dirs"
authorRyota MIBU <r-mibu@cq.jp.nec.com>
Tue, 22 Dec 2015 00:51:04 +0000 (00:51 +0000)
committerGerrit Code Review <gerrit@172.30.200.206>
Tue, 22 Dec 2015 00:51:04 +0000 (00:51 +0000)
30 files changed:
.gitignore
jjb/apex/apex.yml
jjb/compass4nfv/compass4nfv.yml
jjb/fuel/fuel-build.sh
jjb/fuel/fuel-ci-jobs.yml [new file with mode: 0644]
jjb/fuel/fuel-deploy-virtual.sh
jjb/fuel/fuel-deploy.sh
jjb/fuel/fuel-download-artifact.sh
jjb/fuel/fuel-lab-reconfig.sh
jjb/fuel/fuel-project-jobs.yml [moved from jjb/fuel/fuel.yml with 50% similarity]
jjb/fuel/fuel-upload-artifact.sh
jjb/fuel/opnfv-fuel.yml [deleted file]
jjb/functest/functest-ci-jobs.yml [moved from jjb/functest/functest.yml with 77% similarity]
jjb/functest/functest-project-jobs.yml [new file with mode: 0644]
jjb/genesis/genesis-foreman.yml
jjb/genesis/genesis-fuel-att.yml
jjb/genesis/genesis-fuel-dell.yml
jjb/genesis/genesis-fuel.yml
jjb/genesis/genesis-juju.yml
jjb/joid/joid-ci-jobs.yml [new file with mode: 0644]
jjb/joid/joid-deploy.sh
jjb/joid/joid-project-jobs.yml [new file with mode: 0644]
jjb/joid/joid.yml [deleted file]
jjb/opnfv/installer-params.yml
jjb/opnfv/slave-params.yml [moved from jjb/opnfv/pod-params.yml with 81% similarity]
jjb/ovsnfv/ovsnfv.yml
jjb/vswitchperf/vswitchperf.yml
jjb/yardstick/yardstick-ci-jobs.yml [moved from jjb/yardstick/yardstick.yml with 53% similarity]
jjb/yardstick/yardstick-project-jobs.yml [new file with mode: 0644]
utils/docs-build.sh

index c23a0d6..2884629 100644 (file)
@@ -1,4 +1,5 @@
-*.swp
+*~
+.*.sw?
 /build/
 /output/
 /releng/
index 14c472b..95055cb 100644 (file)
@@ -20,7 +20,7 @@
 - job-template:
     name: 'apex-verify-{stream}'
 
-    node: opnfv-jump-1
+    node: intel-us-deploy-virtual-2
 
     parameters:
         - apex-parameter:
@@ -31,7 +31,7 @@
             branch: '{branch}'
         - string:
             name: GIT_BASE
-            default: ssh://gerrit.opnfv.org:29418/$PROJECT
+            default: https://gerrit.opnfv.org/gerrit/$PROJECT
             description: "Used for overriding the GIT URL coming from parameters macro."
 
     scm:
@@ -80,7 +80,7 @@
     #
     # This job's purpose is to update all the JJB
 
-    node: opnfv-jump-1
+    node: intel-us-deploy-virtual-2
 
     disabled: true
 
@@ -93,7 +93,7 @@
             branch: '{branch}'
         - string:
             name: GIT_BASE
-            default: ssh://gerrit.opnfv.org:29418/$PROJECT
+            default: https://gerrit.opnfv.org/gerrit/$PROJECT
             description: "Used for overriding the GIT URL coming from parameters macro."
 
     scm:
     # Required Variables:
     #     stream:    branch with - in place of / (eg. stable)
     #     branch:    branch (eg. stable)
-    node: opnfv-jump-1
+    node: intel-us-deploy-virtual-2
 
     disabled: false
 
             branch: '{branch}'
         - string:
             name: GIT_BASE
-            default: ssh://gerrit.opnfv.org:29418/$PROJECT
+            default: https://gerrit.opnfv.org/gerrit/$PROJECT
             description: "Used for overriding the GIT URL coming from parameters macro."
 
     scm:
     # Required Variables:
     #     stream:    branch with - in place of / (eg. stable)
     #     branch:    branch (eg. stable)
-    node: opnfv-jump-1
+    node: intel-us-deploy-virtual-2
 
     disabled: false
 
     # Required Variables:
     #     stream:    branch with - in place of / (eg. stable)
     #     branch:    branch (eg. stable)
-    node: opnfv-jump-1
+    node: intel-us-deploy-virtual-2
 
     disabled: false
 
         - trigger-builds:
           - project: 'apex-deploy-baremetal-{stream}'
         - trigger-builds:
-          - project: 'functest-apex-opnfv-jump-1-daily-{stream}'
+          - project: 'functest-apex-intel-us-deploy-virtual-2-daily-{stream}'
             block: true
             block-thresholds:
                 build-step-failure-threshold: 'never'
index 3645bbb..74970fc 100644 (file)
         - choice:
             name: COMPASS_OS_VERSION
             choices:
-                - 'ubuntu-trusty'
-                - 'rhel7'
+                - 'trusty'
+                - 'centos7'
 
 ########################
 # builder macros
index 00617ce..6ccfb6f 100755 (executable)
@@ -3,13 +3,41 @@ set -o errexit
 set -o nounset
 set -o pipefail
 
+cd $WORKSPACE
+
+# check to see if we already have an artifact on artifacts.opnfv.org
+# for this commit
+echo "Checking to see if we already built and stored Fuel ISO for this commit"
+
+LATEST_ISO_PROPERTIES=$WORKSPACE/latest.iso.properties
+curl -s -o $LATEST_ISO_PROPERTIES http://$GS_URL/latest.properties 2>/dev/null
+
+# get metadata of latest ISO
+LATEST_ISO_SHA1=$(grep OPNFV_GIT_SHA1 $LATEST_ISO_PROPERTIES | cut -d'=' -f2)
+LATEST_ISO_URL=$(grep OPNFV_ARTIFACT_URL $LATEST_ISO_PROPERTIES | cut -d'=' -f2)
+
+# get current SHA1
+CURRENT_SHA1=$(git rev-parse HEAD)
+
+if [[ "$CURRENT_SHA1" == "$LATEST_ISO_SHA1" ]]; then
+    echo "An ISO has already been built for this commit"
+    echo "    $LATEST_ISO_URL"
+    echo "Nothing new to build. Exiting."
+    touch $WORKSPACE/.noupload
+    exit 0
+else
+    echo "This commit has not been built yet. Proceeding with the build."
+    /bin/rm -f $LATEST_ISO_PROPERTIES
+    echo
+fi
+
 # log info to console
-echo "Starting the build of $INSTALLER. This could take some time..."
+echo "Starting the build of $INSTALLER_TYPE. This could take some time..."
 echo "--------------------------------------------------------"
 echo
 
 # create the cache directory if it doesn't exist
-[[ -d $CACHE_DIRECTORY ]] || mkdir -p $CACHE_DIRECTORY
+mkdir -p $CACHE_DIRECTORY
 
 # set OPNFV_ARTIFACT_VERSION
 if [[ "$JOB_NAME" =~ "merge" ]]; then
diff --git a/jjb/fuel/fuel-ci-jobs.yml b/jjb/fuel/fuel-ci-jobs.yml
new file mode 100644 (file)
index 0000000..fa0f666
--- /dev/null
@@ -0,0 +1,227 @@
+- project:
+
+    name: 'fuel'
+
+    project: 'fuel'
+
+    installer: 'fuel'
+
+#--------------------------------
+# BRANCH ANCHORS
+#--------------------------------
+    master: &master
+        stream: master
+        branch: '{stream}'
+        gs-pathname: ''
+    brahmaputra: &brahmaputra
+        stream: brahmaputra
+        branch: 'stable/{stream}'
+        gs-pathname: '/{stream}'
+#--------------------------------
+# POD, INSTALLER, AND BRANCH MAPPING
+#--------------------------------
+#      Current Mapping
+#--------------------------------
+#  everything runs against master branch
+#--------------------------------
+    pod:
+        - opnfv-jump-2:
+            <<: *master
+        - ericsson-pod1:
+            <<: *master
+        - ericsson-pod2:
+            <<: *master
+#--------------------------------
+#     Milestone E Mapping
+#     !!!DO NOT ENABLE!!!
+#--------------------------------
+#        brahmaputra
+#--------------------------------
+#        - opnfv-jump-2:
+#            <<: *brahmaputra
+
+# please check the triggers before enabling any of the controllers!!!
+    sdn-controller:
+        - 'nosdn':
+            disabled: false
+        - 'odl':
+            disabled: true
+        - 'onos':
+            disabled: true
+        - 'opencontrail':
+            disabled: true
+
+    jobs:
+        - 'fuel-{sdn-controller}-{pod}-daily-{stream}'
+        - 'fuel-build-{pod}-daily-{stream}'
+        - 'fuel-deploy-{pod}-daily-{stream}'
+
+########################
+# job templates
+########################
+- job-template:
+    name: 'fuel-{sdn-controller}-{pod}-daily-{stream}'
+
+    project-type: multijob
+
+    disabled: '{obj:disabled}'
+
+    concurrent: false
+
+    wrappers:
+        - build-name:
+            name: '$BUILD_NUMBER - SDN: $SDN_CONTROLLER Feature: $OPNFV_FEATURE'
+
+    triggers:
+        - 'fuel-{pod}-trigger'
+
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - '{pod}-defaults'
+        - '{installer}-defaults'
+        - string:
+            name: SDN_CONTROLLER
+            default: '{sdn-controller}'
+        - string:
+            name: OPNFV_FEATURE
+            default: 'none'
+        - fuel-ci-parameter:
+            gs-pathname: '{gs-pathname}'
+
+    scm:
+        - git-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: ''
+            branch: '{branch}'
+
+    builders:
+        - multijob:
+            name: build
+            condition: SUCCESSFUL
+            projects:
+                - name: 'fuel-build-{pod}-daily-{stream}'
+                  git-revision: true
+                  kill-phase-on: FAILURE
+        - multijob:
+            name: deploy
+            condition: SUCCESSFUL
+            projects:
+                - name: 'fuel-deploy-{pod}-daily-{stream}'
+                  current-parameters: true
+                  git-revision: true
+                  kill-phase-on: FAILURE
+        - multijob:
+            name: functest
+            condition: COMPLETED
+            projects:
+                - name: 'functest-fuel-{pod}-daily-{stream}'
+                  current-parameters: true
+                  kill-phase-on: NEVER
+        - multijob:
+            name: yardstick
+            condition: COMPLETED
+            projects:
+                - name: 'yardstick-fuel-{pod}-daily-{stream}'
+                  current-parameters: true
+                  kill-phase-on: NEVER
+
+- job-template:
+    name: 'fuel-build-{pod}-daily-{stream}'
+
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - 'ericsson-ca-build-1-defaults'
+        - '{installer}-defaults'
+        - fuel-ci-parameter:
+            gs-pathname: '{gs-pathname}'
+
+    scm:
+        - git-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: ''
+            branch: '{branch}'
+
+    wrappers:
+        - timeout:
+            timeout: 360
+            fail: true
+
+    builders:
+        - shell:
+            !include-raw ./fuel-build.sh
+        - shell:
+            !include-raw ./fuel-upload-artifact.sh
+        - shell:
+            !include-raw ./fuel-workspace-cleanup.sh
+
+    publishers:
+        - email:
+            recipients: jonas.bjurel@ericsson.com stefan.k.berg@ericsson.com
+
+- job-template:
+    name: 'fuel-deploy-{pod}-daily-{stream}'
+
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - '{pod}-defaults'
+        - '{installer}-defaults'
+        - fuel-ci-parameter:
+            gs-pathname: '{gs-pathname}'
+
+    scm:
+        - git-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: ''
+            branch: '{branch}'
+
+    wrappers:
+        - build-name:
+            name: '$BUILD_NUMBER - SDN: $SDN_CONTROLLER Feature: $OPNFV_FEATURE'
+
+    builders:
+        - shell:
+            !include-raw ./fuel-download-artifact.sh
+        - shell:
+            !include-raw ./fuel-deploy.sh
+
+    publishers:
+        - email:
+            recipients: jonas.bjurel@ericsson.com stefan.k.berg@ericsson.com
+########################
+# parameter macros
+########################
+- parameter:
+    name: fuel-ci-parameter
+    parameters:
+        - string:
+            name: BUILD_DIRECTORY
+            default: $WORKSPACE/build_output
+            description: "Directory where the build artifact will be located upon the completion of the build."
+        - string:
+            name: CACHE_DIRECTORY
+            default: $HOME/opnfv/cache/$INSTALLER_TYPE
+            description: "Directory where the cache to be used during the build is located."
+        - string:
+            name: GS_URL
+            default: artifacts.opnfv.org/$PROJECT{gs-pathname}
+            description: "URL to Google Storage."
+########################
+# trigger macros
+########################
+# trigger for opnfv-jump-2 is set to run 1 hour ahead of others
+# to prevent doing unnecessary builds
+- trigger:
+    name: 'fuel-opnfv-jump-2-trigger'
+    triggers:
+        - timed: '0 2 * * *'
+- trigger:
+    name: 'fuel-ericsson-pod1-trigger'
+    triggers:
+        - timed: '0 3 * * *'
+- trigger:
+    name: 'fuel-ericsson-pod2-trigger'
+    triggers:
+        - timed: '0 3 * * *'
index 626a650..1b64435 100755 (executable)
@@ -22,7 +22,7 @@ CONFDIR=$WORKSPACE/deploy/templates/virtual_environment_noha/conf
 BRIDGE=pxebr
 
 # log info to console
-echo "Starting the deployment for a merged change using $INSTALLER. This could take some time..."
+echo "Starting the deployment for a merged change using $INSTALLER_TYPE. This could take some time..."
 echo "--------------------------------------------------------"
 echo
 
index b617bcf..bd2db3e 100755 (executable)
@@ -11,39 +11,38 @@ echo "Using $(echo $OPNFV_ARTIFACT_URL | cut -d'/' -f3) for deployment"
 
 # create TMPDIR if it doesn't exist
 export TMPDIR=$HOME/tmpdir
-[[ -d $TMPDIR ]] || mkdir -p $TMPDIR
+mkdir -p $TMPDIR
 
 # change permissions down to TMPDIR
 chmod a+x $HOME
 chmod a+x $TMPDIR
 
-# set CONFDIR, BRIDGE
-CONFDIR=$WORKSPACE/deploy/templates/hardware_environment/conf/linux_foundation_lab/pod2
+# set BRIDGE
 BRIDGE=pxebr
 
 # clone genesis repo and checkout the SR1 tag
-echo "Cloning genesis repo"
-cd $WORKSPACE
-GIT_SSL_NO_VERIFY=true git clone https://gerrit.opnfv.org/gerrit/genesis genesis
-cd genesis
-git checkout arno.2015.2.0
+#echo "Cloning genesis repo"
+#cd $WORKSPACE
+#GIT_SSL_NO_VERIFY=true git clone https://gerrit.opnfv.org/gerrit/genesis genesis
+#cd genesis
+#git checkout arno.2015.2.0
 
 # cleanup first
-sudo $WORKSPACE/genesis/common/ci/clean.sh -base_config $WORKSPACE/genesis/foreman/ci/inventory/lf_pod2_ksgen_settings.yml
+#sudo $WORKSPACE/genesis/common/ci/clean.sh -base_config $WORKSPACE/genesis/foreman/ci/inventory/lf_pod2_ksgen_settings.yml
 
 # prepare for Fuel Deployment
-sudo $WORKSPACE/genesis/common/ci/setup.sh
+#sudo $WORKSPACE/genesis/common/ci/setup.sh
 
 # log info to console
-echo "Starting the deployment using $INSTALLER. This could take some time..."
+echo "Starting the deployment using $INSTALLER_TYPE. This could take some time..."
 echo "--------------------------------------------------------"
 echo
 
 # start the deployment
 echo "Issuing command"
-echo "sudo $WORKSPACE/ci/deploy.sh -iso $WORKSPACE/opnfv.iso -dea $CONFDIR/dea.yaml -dha $CONFDIR/dha.yaml -s $TMPDIR -b $BRIDGE -nh"
+echo "sudo $WORKSPACE/ci/deploy.sh -iso $WORKSPACE/opnfv.iso -dea $POD_CONF_DIR/dea.yaml -dha $POD_CONF_DIR/dha.yaml -s $TMPDIR -b $BRIDGE -nh"
 
-sudo $WORKSPACE/ci/deploy.sh -iso $WORKSPACE/opnfv.iso -dea $CONFDIR/dea.yaml -dha $CONFDIR/dha.yaml -s $TMPDIR -b $BRIDGE -nh
+sudo $WORKSPACE/ci/deploy.sh -iso $WORKSPACE/opnfv.iso -dea $POD_CONF_DIR/dea.yaml -dha $POD_CONF_DIR/dha.yaml -s $TMPDIR -b $BRIDGE -nh
 
 echo
 echo "--------------------------------------------------------"
index 05dc05e..917bc97 100755 (executable)
@@ -4,10 +4,12 @@ set -o nounset
 set -o pipefail
 
 if [[ "$JOB_NAME" =~ "merge" ]]; then
+    echo "Downloading http://$GS_URL/opnfv-gerrit-$GERRIT_CHANGE_NUMBER.properties"
     # get the properties file for the Fuel ISO built for a merged change
     curl -s -o $WORKSPACE/latest.properties http://$GS_URL/opnfv-gerrit-$GERRIT_CHANGE_NUMBER.properties
 else
     # get the latest.properties file in order to get info regarding latest artifact
+    echo "Downloading http://$GS_URL/latest.properties"
     curl -s -o $WORKSPACE/latest.properties http://$GS_URL/latest.properties
 fi
 
@@ -18,7 +20,7 @@ fi
 source latest.properties
 
 # log info to console
-echo "Downloading the $INSTALLER artifact using URL http://$OPNFV_ARTIFACT_URL"
+echo "Downloading the $INSTALLER_TYPE artifact using URL http://$OPNFV_ARTIFACT_URL"
 echo "This could take some time..."
 echo "--------------------------------------------------------"
 echo
index a79bc2c..55bb5dd 100755 (executable)
@@ -19,7 +19,7 @@ if ! GIT_SSL_NO_VERIFY=true git clone https://gerrit.opnfv.org/gerrit/releng; th
 fi
 
 # log info to console
-echo "Starting the lab reconfiguration for $INSTALLER..."
+echo "Starting the lab reconfiguration for $INSTALLER_TYPE..."
 echo "--------------------------------------------------------"
 echo
 
similarity index 50%
rename from jjb/fuel/fuel.yml
rename to jjb/fuel/fuel-project-jobs.yml
index f8eabb0..d28d529 100644 (file)
@@ -2,36 +2,32 @@
 # Job configuration for fuel
 ########################
 - project:
-
-    name: fuel
+    name: fuel-project-jobs
 
     project: 'fuel'
 
     installer: 'fuel'
 
+# only master branch is enabled at the moment to keep no of jobs sane
+    stream:
+        - master:
+            branch: '{stream}'
+            gs-pathname: ''
+#        - brahmaputra:
+#            branch: 'stable/{stream}'
+#            gs-pathname: '/{stream}'
+
     jobs:
         - 'fuel-verify-build-{stream}'
         - 'fuel-merge-build-{stream}'
         - 'fuel-merge-deploy-virtual-{stream}'
-        - 'fuel-daily-{stream}'
-        - 'fuel-build-{stream}'
-        - 'fuel-deploy-{stream}'
-        - 'fuel-lab-reconfig-{stream}'
-
-    stream:
-        - master:
-            branch: 'master'
-            gs-pathname: ''
 
 ########################
 # job templates
 ########################
-
 - job-template:
     name: 'fuel-verify-build-{stream}'
 
-    node: ericsson-build
-
     concurrent: true
 
     properties:
@@ -44,8 +40,9 @@
             project: '{project}'
         - gerrit-parameter:
             branch: '{branch}'
-        - fuel-parameter:
-            installer: '{installer}'
+        - 'ericsson-ca-build-1-defaults'
+        - '{installer}-defaults'
+        - fuel-project-parameter:
             gs-pathname: '{gs-pathname}'
 
     scm:
@@ -90,8 +87,6 @@
 - job-template:
     name: 'fuel-merge-build-{stream}'
 
-    node: ericsson-build
-
     concurrent: true
 
     properties:
             project: '{project}'
         - gerrit-parameter:
             branch: '{branch}'
-        - fuel-parameter:
-            installer: '{installer}'
-            gs-pathname: ''
+        - 'ericsson-ca-build-1-defaults'
+        - '{installer}-defaults'
+        - fuel-project-parameter:
+            gs-pathname: '{gs-pathname}'
     scm:
         - gerrit-trigger-scm:
             credentials-id: '{ssh-credentials}'
 - job-template:
     name: 'fuel-merge-deploy-virtual-{stream}'
 
-    node: fuel-deploy-virtual
-
     concurrent: true
 
     properties:
             project: '{project}'
         - gerrit-parameter:
             branch: '{branch}'
-        - fuel-parameter:
-            installer: '{installer}'
-            gs-pathname: ''
+        - 'fuel-deploy-virtual-defaults'
+        - '{installer}-defaults'
+        - fuel-project-parameter:
+            gs-pathname: '{gs-pathname}'
     scm:
         - gerrit-trigger-scm:
             credentials-id: '{ssh-credentials}'
         - email:
             recipients: jonas.bjurel@ericsson.com stefan.k.berg@ericsson.com
 
-- job-template:
-    name: 'fuel-daily-{stream}'
-
-    node: ericsson-build
-
-    disabled: false
-
-    triggers:
-        - 'fuel-{strem}-trigger'
-
-    parameters:
-        - project-parameter:
-            project: '{project}'
-        - fuel-parameter:
-            installer: '{installer}'
-            gs-pathname: '{gs-pathname}'
-
-    scm:
-        - git-scm:
-            credentials-id: '{ssh-credentials}'
-            refspec: ''
-            branch: '{branch}'
-
-    builders:
-        - trigger-builds:
-          - project: 'fuel-build-{stream}'
-            git-revision: true
-            block: true
-        - trigger-builds:
-          - project: 'fuel-deploy-{stream}'
-            git-revision: true
-            block: true
-        - trigger-builds:
-          - project: 'functest-fuel-opnfv-jump-2-daily-{stream}'
-            block: true
-            block-thresholds:
-                build-step-failure-threshold: 'never'
-                failure-threshold: 'never'
-                unstable-threshold: 'FAILURE'
-        - trigger-builds:
-          - project: 'yardstick-fuel-opnfv-jump-2-daily-{stream}'
-            block: true
-            block-thresholds:
-                build-step-failure-threshold: 'never'
-                failure-threshold: 'never'
-                unstable-threshold: 'FAILURE'
-        - trigger-builds:
-          - project: 'bottlenecks-daily-fuel-lf-{stream}'
-            block: true
-            block-thresholds:
-                build-step-failure-threshold: 'never'
-                failure-threshold: 'never'
-                unstable-threshold: 'FAILURE'
-
-    triggers:
-        - 'fuel-{stream}-daily-trigger'
-
-- job-template:
-    name: 'fuel-build-{stream}'
-
-    node: ericsson-build
-
-    parameters:
-        - project-parameter:
-            project: '{project}'
-        - fuel-parameter:
-            installer: '{installer}'
-            gs-pathname: '{gs-pathname}'
-
-    scm:
-        - git-scm:
-            credentials-id: '{ssh-credentials}'
-            refspec: ''
-            branch: '{branch}'
-
-    wrappers:
-        - timeout:
-            timeout: 360
-            fail: true
-
-    builders:
-        - shell:
-            !include-raw ./fuel-build.sh
-        - shell:
-            !include-raw ./fuel-upload-artifact.sh
-        - shell:
-            !include-raw ./fuel-workspace-cleanup.sh
-
-    publishers:
-        - email:
-            recipients: jonas.bjurel@ericsson.com stefan.k.berg@ericsson.com
-
-- job-template:
-    name: 'fuel-deploy-{stream}'
-
-    disabled: false
-
-    node: opnfv-jump-2
-
-    parameters:
-        - project-parameter:
-            project: '{project}'
-        - fuel-parameter:
-            installer: '{installer}'
-            gs-pathname: '{gs-pathname}'
-        - string:
-            name: GIT_BASE
-            default: ssh://gerrit.opnfv.org:29418/$PROJECT
-            description: "POD2 has some issues with cloning using https so that's why GIT_BASE is overriden here again."
-
-    scm:
-        - git-scm:
-            credentials-id: '{ssh-credentials}'
-            refspec: ''
-            branch: '{branch}'
-
-    builders:
-        - shell:
-            !include-raw ./fuel-download-artifact.sh
-        - shell:
-            !include-raw ./fuel-deploy.sh
-
-    publishers:
-        - email:
-            recipients: jonas.bjurel@ericsson.com stefan.k.berg@ericsson.com
-
-- job-template:
-    name: 'fuel-lab-reconfig-{stream}'
-
-    disabled: true
-
-    parameters:
-        - project-parameter:
-            project: '{project}'
-        - fuel-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:
-                - "apex-daily.*"
-
-    builders:
-        - shell:
-            !include-raw ./fuel-lab-reconfig.sh
-
 ########################
 # parameter macros
 ########################
 - parameter:
-    name: fuel-parameter
+    name: fuel-project-parameter
     parameters:
-        - string:
-            name: INSTALLER
-            default: '{installer}'
-            description: "Installer to use."
         - string:
             name: BUILD_DIRECTORY
             default: $WORKSPACE/build_output
             description: "Directory where the build artifact will be located upon the completion of the build."
         - string:
             name: CACHE_DIRECTORY
-            default: $HOME/opnfv/cache/$INSTALLER
+            default: $HOME/opnfv/cache/$INSTALLER_TYPE
             description: "Directory where the cache to be used during the build is located."
-        - string:
-            name: GIT_BASE
-            default: https://gerrit.opnfv.org/gerrit/$PROJECT
-            description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
         - string:
             name: GS_URL
             default: artifacts.opnfv.org/$PROJECT{gs-pathname}
             description: "URL to Google Storage."
-
-########################
-# trigger macros
-########################
-- trigger:
-    name: 'fuel-master-daily-trigger'
-    triggers:
-        - timed: '0 3 * * *'
index b998e6a..fc35023 100755 (executable)
@@ -3,8 +3,15 @@ set -o errexit
 set -o nounset
 set -o pipefail
 
+# check if we built something
+if [ -f $WORKSPSACE/.noupload ]; then
+    echo "Nothing new to upload. Exiting."
+    /bin/rm -f $WORKSPSACE/.noupload
+    exit 0
+fi
+
 # log info to console
-echo "Uploading the $INSTALLER artifact. This could take some time..."
+echo "Uploading the $INSTALLER_TYPE artifact. This could take some time..."
 echo "--------------------------------------------------------"
 echo
 
@@ -12,14 +19,26 @@ echo
 source $WORKSPACE/opnfv.properties
 
 # upload artifact and additional files to google storage
-gsutil cp $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.iso gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1
-gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1
+gsutil cp $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.iso \
+    gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1
+gsutil cp $WORKSPACE/opnfv.properties \
+    gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1
 if [[ ! "$JOB_NAME" =~ (verify|merge) ]]; then
-    gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1
+    gsutil cp $WORKSPACE/opnfv.properties \
+    gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1
 elif [[ "$JOB_NAME" =~ "merge" ]]; then
     echo "Uploaded Fuel ISO for a merged change"
 fi
 
+gsutil -m setmeta \
+    -h "Content-Type:text/html" \
+    -h "Cache-Control:private, max-age=0, no-transform" \
+    gs://$GS_URL/*.properties > /dev/null 2>&1
+
+gsutil -m setmeta \
+    -h "Cache-Control:private, max-age=0, no-transform" \
+    gs://$GS_URL/*.iso > /dev/null 2>&1
+
 echo
 echo "--------------------------------------------------------"
 echo "Done!"
diff --git a/jjb/fuel/opnfv-fuel.yml b/jjb/fuel/opnfv-fuel.yml
deleted file mode 100644 (file)
index 393f919..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-########################
-# Job configuration for fuel
-########################
-- project:
-
-    name: 'opnfv-fuel'
-
-    installer: 'fuel'
-
-    controller:
-        - 'odl'
-        - 'onos'
-        - 'opencontrail'
-
-    pod:
-        - 'opnfv-jump-2'
-        - 'ericsson-pod1'
-
-    loop:
-        - 'daily'
-
-    # ignore these as these will not exist in real job
-    dummy-phase:
-        - build
-        - deploy
-        - functest
-        - yardstick
-
-    stream:
-        - master:
-            branch: 'master'
-            gs-pathname: ''
-
-    jobs:
-        - 'tmp_fuel-{controller}-{pod}-{loop}-{stream}'
-        - 'tmp_fuel-{dummy-phase}-{pod}-{loop}-{stream}'
-
-########################
-# job templates
-########################
-- job-template:
-    name: 'tmp_fuel-{controller}-{pod}-{loop}-{stream}'
-
-    project-type: multijob
-
-    parameters:
-        - project-parameter:
-            project: '{installer}'
-        - 'ericsson-ca-build-1-defaults'
-        - '{installer}-defaults'
-        - string:
-            name: CONTROLLER
-            default: '{controller}'
-        - string:
-            name: FEATURE
-            default: 'none'
-
-    scm:
-        - git-scm:
-            credentials-id: '{ssh-credentials}'
-            refspec: ''
-            branch: '{branch}'
-
-    builders:
-        - multijob:
-            name: build
-            condition: SUCCESSFUL
-            projects:
-                - name: 'tmp_fuel-build-{loop}-{stream}'
-                  kill-phase-on: FAILURE
-                  current-parameters: true
-        - multijob:
-            name: deploy
-            condition: SUCCESSFUL
-            projects:
-                - name: 'tmp_fuel-deploy-{pod}-{loop}-{stream}'
-                  kill-phase-on: FAILURE
-                  current-parameters: true
-        - multijob:
-            name: functest
-            projects:
-                - name: 'tmp_fuel-test-{pod}-{loop}-{stream}'
-                  current-parameters: true
-        - multijob:
-            name: yardstick
-            projects:
-                - name: 'tmp_fuel-test-{pod}-{loop}-{stream}'
-                  current-parameters: true
-
-
-- job-template:
-    name: 'tmp_fuel-{dummy-phase}-{pod}-{loop}-{stream}'
-
-    disabled: false
-
-    concurrent: false
-
-    wrappers:
-        - build-name:
-            name: '$BUILD_NUMBER: {installer} $CONTROLLER'
-
-    parameters:
-        - project-parameter:
-            project: '{installer}'
-        - '{pod}-defaults'
-        - '{installer}-defaults'
-        - string:
-            name: CONTROLLER
-            default: 'none'
-        - string:
-            name: FEATURE
-            default: 'none'
-
-    scm:
-        - git-scm:
-            credentials-id: '{ssh-credentials}'
-            refspec: ''
-            branch: '{branch}'
-
-    builders:
-        - shell: |
-            #!/bin/bash
-            echo "Hello World from OPNFV $INSTALLER_TYPE"
-            echo "Running $INSTALLER_TYPE with controller $CONTROLLER"
similarity index 77%
rename from jjb/functest/functest.yml
rename to jjb/functest/functest-ci-jobs.yml
index 346b678..df57efb 100644 (file)
@@ -6,19 +6,89 @@
 
     project: '{name}'
 
+#--------------------------------
+# BRANCH ANCHORS
+#--------------------------------
+    master: &master
+        stream: master
+        branch: '{stream}'
+        gs-pathname: ''
+    brahmaputra: &brahmaputra
+        stream: brahmaputra
+        branch: 'stable/{stream}'
+        gs-pathname: '/{stream}'
+#--------------------------------
+# POD, INSTALLER, AND BRANCH MAPPING
+#--------------------------------
+#      Current Mapping
+#--------------------------------
+#  everything runs against master branch
+#--------------------------------
     pod:
-        - opnfv-jump-1:
+        - huawei-us-deploy-bare-1:
+            installer: compass
+            <<: *master
+        - intel-pod5:
+            installer: joid
+            <<: *master
+        - intel-us-deploy-virtual-2:
             installer: apex
+            <<: *master
         - opnfv-jump-2:
             installer: fuel
+            <<: *master
+        - ericsson-pod1:
+            installer: fuel
+            <<: *master
+        - ericsson-pod2:
+            installer: fuel
+            <<: *master
         - orange-test1:
             installer: fuel
+            <<: *master
         - orange-pod2:
             installer: joid
-        - huawei-us-deploy-bare-1:
-            installer: compass
-        - intel-pod5:
-            installer: joid
+            <<: *master
+#--------------------------------
+#     Milestone E Mapping
+#     !!!DO NOT ENABLE!!!
+#--------------------------------
+#        brahmaputra
+#--------------------------------
+#        - huawei-us-deploy-bare-1:
+#            installer: compass
+#            <<: *brahmaputra
+#        - intel-pod5:
+#            installer: joid
+#            <<: *brahmaputra
+#        - opnfv-jump-1:
+#            installer: apex
+#            <<: *brahmaputra
+#        - opnfv-jump-2:
+#            installer: fuel
+#            <<: *brahmaputra
+#--------------------------------
+#           master
+#--------------------------------
+#        - ericsson-pod2:
+#            installer: fuel
+#            <<: *master
+#        - intelpod2-jumphost:
+#            installer: apex
+#            <<: *master
+#        - intel-pod6:
+#            installer: joid
+#            <<: *master
+#        - intel-pod8:
+#            installer: compass
+#            <<: *master
+#        - orange-test1:
+#            installer: fuel
+#            <<: *master
+#        - orange-pod2:
+#            installer: joid
+#            <<: *master
+#--------------------------------
 
     testsuite:
         - 'daily'
 
     jobs:
         - 'functest-{installer}-{pod}-{testsuite}-{stream}'
-        - 'functest-verify-{stream}'
-
-    stream:
-        - master:
-            branch: 'master'
-            gs-pathname: ''
-#        - brahmaputra:
-#            branch: 'stable/brahmaputra'
-#            gs-pathname: '/brahmaputra'
 
 ################################
 # job template
 
     wrappers:
         - build-name:
-            name: '$BUILD_NUMBER: $FUNCTEST_SUITE_NAME'
+            name: '$BUILD_NUMBER Suite: $FUNCTEST_SUITE_NAME SDN: $SDN_CONTROLLER Feature: $OPNFV_FEATURE'
 
     parameters:
         - project-parameter:
         - '{pod}-defaults'
         - '{installer}-defaults'
         - 'functest-{testsuite}-parameter'
-        - functest-parameter
+        - functest-parameter:
+            gs-pathname: '{gs-pathname}'
 
     scm:
         - git-scm:
     builders:
         - 'functest-{testsuite}-builder'
 
-- job-template:
-    name: 'functest-verify-{stream}'
-
-    parameters:
-        - project-parameter:
-            project: '{project}'
-        - gerrit-parameter:
-            branch: '{branch}'
-    scm:
-        - gerrit-trigger-scm:
-            credentials-id: '{ssh-credentials}'
-            refspec: '$GERRIT_REFSPEC'
-            choosing-strategy: 'gerrit'
-
-    triggers:
-        - gerrit:
-            trigger-on:
-                - patchset-created-event:
-                    exclude-drafts: 'false'
-                    exclude-trivial-rebase: 'false'
-                    exclude-no-code-change: 'false'
-                - draft-published-event
-                - comment-added-contains-event:
-                    comment-contains-value: 'recheck'
-                - comment-added-contains-event:
-                    comment-contains-value: 'reverify'
-            projects:
-              - project-compare-type: 'ANT'
-                project-pattern: 'functest'
-                branches:
-                  - branch-compare-type: 'ANT'
-                    branch-pattern: '**/{branch}'
-
-    builders:
-        - shell: |
-            echo "Nothing to verify!"
-
 ########################
 # parameter macros
 ########################
             elif [[ ${INSTALLER_TYPE} == 'joid' ]]; then
                 # If production lab then creds may be retrieved dynamically
                 # creds are on the jumphost, always in the same folder
-                labconfig="-v /home/ubuntu/joid/ci/cloud/admin-openrc:/home/opnfv/functest/conf/openstack.creds"
+                labconfig="-v /var/lib/jenkins/joid_config/admin-openrc:/home/opnfv/functest/conf/openstack.creds"
                 # If dev lab, credentials may not be the default ones, just provide a path to put them into docker
                 # replace the default one by the customized one provided by jenkins config
                 if [ -n "${LAB_CONFIG}" ]; then
diff --git a/jjb/functest/functest-project-jobs.yml b/jjb/functest/functest-project-jobs.yml
new file mode 100644 (file)
index 0000000..e2a5c1a
--- /dev/null
@@ -0,0 +1,62 @@
+###################################################
+# All the jobs except verify have been removed!
+# They will only be enabled on request by projects!
+###################################################
+- project:
+    name: functest-project-jobs
+
+    project: 'functest'
+
+    jobs:
+        - 'functest-verify-{stream}'
+
+# only master branch is enabled at the moment to keep no of jobs sane
+    stream:
+        - master:
+            branch: 'master'
+            gs-pathname: ''
+#        - brahmaputra:
+#            branch: 'stable/brahmaputra'
+#            gs-pathname: '/brahmaputra'
+
+- job-template:
+    name: 'functest-verify-{stream}'
+
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - gerrit-parameter:
+            branch: '{branch}'
+        - 'opnfv-build-defaults'
+
+    scm:
+        - gerrit-trigger-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: '$GERRIT_REFSPEC'
+            choosing-strategy: 'gerrit'
+
+    triggers:
+        - gerrit:
+            trigger-on:
+                - patchset-created-event:
+                    exclude-drafts: 'false'
+                    exclude-trivial-rebase: 'false'
+                    exclude-no-code-change: 'false'
+                - draft-published-event
+                - comment-added-contains-event:
+                    comment-contains-value: 'recheck'
+                - comment-added-contains-event:
+                    comment-contains-value: 'reverify'
+            projects:
+              - project-compare-type: 'ANT'
+                project-pattern: '{project}'
+                branches:
+                  - branch-compare-type: 'ANT'
+                    branch-pattern: '**/{branch}'
+                forbidden-file-paths:
+                  - compare-type: ANT
+                    pattern: 'docs/**|.gitignore'
+
+    builders:
+        - shell: |
+            echo "Nothing to verify!"
index 39b3a58..9c212ac 100644 (file)
@@ -37,6 +37,8 @@
 - job-template:
     name: 'genesis-foreman-verify-build-{stream}'
 
+    disabled: true
+
     node: ericsson-build
 
     concurrent: true
 
     node: ericsson-build
 
+    disabled: true
+
     concurrent: true
 
     properties:
 
     node: ericsson-build
 
-    disabled: '{obj:disabled}'
+    disabled: true
 
     triggers:
         - 'foreman-{stream}'
 - job-template:
     name: 'genesis-foreman-deploy-runner-{stream}'
 
-    disabled: false
+    disabled: true
 
     parameters:
         - project-parameter:
 
     node: ericsson-build
 
+    disabled: true
+
     parameters:
         - project-parameter:
             project: '{project}'
 - job-template:
     name: 'genesis-foreman-deploy-{stream}'
 
-    disabled: false
+    disabled: true
 
     node: opnfv-jump-2
 
 - job-template:
     name: 'genesis-foreman-lab-reconfig-{stream}'
 
-    disabled: false
+    disabled: true
 
     parameters:
         - project-parameter:
index 8e40a09..8c03ebb 100644 (file)
@@ -23,6 +23,8 @@
 
     node: att-build
 
+    disabled: true
+
     parameters:
         - string:
             name: BUILD_DIRECTORY
index 01b7ea0..6bebb5d 100644 (file)
@@ -23,6 +23,8 @@
 
     node: dell-build
 
+    disabled: true
+
     parameters:
         - string:
             name: BUILD_DIRECTORY
index 8ab7710..ea628a6 100644 (file)
@@ -40,6 +40,8 @@
 
     node: ericsson-build
 
+    disabled: true
+
     concurrent: true
 
     properties:
 
     node: ericsson-build
 
+    disabled: true
+
     concurrent: true
 
     properties:
 
     node: ericsson-build
 
-    disabled: '{obj:disabled}'
+    disabled: true
 
     triggers:
         - 'genesis-fuel-{stream}-trigger'
 - job-template:
     name: 'genesis-fuel-deploy-runner-{stream}'
 
-    disabled: false
+    disabled: true
 
     parameters:
         - project-parameter:
 
     node: ericsson-build
 
+    disabled: true
+
     parameters:
         - project-parameter:
             project: '{project}'
 - job-template:
     name: 'genesis-fuel-deploy-{stream}'
 
-    disabled: false
+    disabled: true
 
     node: opnfv-jump-2
 
 - job-template:
     name: 'genesis-fuel-lab-reconfig-{stream}'
 
-    disabled: false
+    disabled: true
 
     parameters:
         - project-parameter:
index efc09b3..3d102d2 100644 (file)
@@ -25,6 +25,8 @@
 - job-template:
     name: 'genesis-juju-verify'
 
+    disabled: true
+
     node: ericsson-build
 
     parameters:
@@ -75,6 +77,8 @@
 - job-template:
     name: 'genesis-juju-merge'
 
+    disabled: true
+
     # builder-merge job to run JJB update
     #
     # This job's purpose is to update all the JJB
 - job-template:
     name: 'genesis-juju-daily-{stream}'
 
+    disabled: true
+
     node: ericsson-build
 
     parameters:
diff --git a/jjb/joid/joid-ci-jobs.yml b/jjb/joid/joid-ci-jobs.yml
new file mode 100644 (file)
index 0000000..af81aac
--- /dev/null
@@ -0,0 +1,233 @@
+########################
+# Job configuration for joid
+########################
+- project:
+
+    name: 'joid'
+
+    project: '{name}'
+
+    installer: '{name}'
+
+#--------------------------------
+# BRANCH ANCHORS
+#--------------------------------
+    master: &master
+        stream: master
+        branch: '{stream}'
+        gs-pathname: ''
+    brahmaputra: &brahmaputra
+        stream: brahmaputra
+        branch: 'stable/{stream}'
+        gs-pathname: '/{stream}'
+#--------------------------------
+# POD, INSTALLER, AND BRANCH MAPPING
+#--------------------------------
+#      Current Mapping
+#--------------------------------
+#  everything runs against master branch
+#--------------------------------
+    pod:
+        - intel-pod5:
+            <<: *master
+        - orange-pod2:
+            <<: *master
+#--------------------------------
+#     Milestone E Mapping
+#     !!!DO NOT ENABLE!!!
+#--------------------------------
+#        brahmaputra
+#--------------------------------
+#        - intel-pod5:
+#            <<: *brahmaputra
+#--------------------------------
+#           master
+#--------------------------------
+#        - intel-pod6:
+#            <<: *master
+#        - orange-pod2:
+#            <<: *master
+#--------------------------------
+
+# please check the triggers before enabling any of the controllers!!!
+    sdn-controller:
+        - 'nosdn':
+            disabled: true
+        - 'odl':
+            disabled: false
+        - 'onos':
+            disabled: true
+        - 'opencontrail':
+            disabled: true
+
+    jobs:
+        - 'joid-{sdn-controller}-{pod}-daily-{stream}'
+        - 'joid-deploy-{pod}-daily-{stream}'
+
+########################
+# job templates
+########################
+- job-template:
+    name: 'joid-{sdn-controller}-{pod}-daily-{stream}'
+
+    project-type: multijob
+
+    disabled: '{obj:disabled}'
+
+    concurrent: false
+
+    wrappers:
+        - build-name:
+            name: '$BUILD_NUMBER - SDN: $SDN_CONTROLLER Feature: $OPNFV_FEATURE'
+
+    triggers:
+        - 'joid-{pod}-trigger'
+
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - '{pod}-defaults'
+        - '{installer}-defaults'
+        - string:
+            name: SDN_CONTROLLER
+            default: '{sdn-controller}'
+        - string:
+            name: OPNFV_FEATURE
+            default: 'none'
+
+    scm:
+        - git-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: ''
+            branch: '{branch}'
+
+    builders:
+        - '{installer}-multijob-{pod}-builder':
+            pod: '{pod}'
+            stream: '{stream}'
+
+- job-template:
+    name: 'joid-deploy-{pod}-daily-{stream}'
+
+    disabled: false
+
+    concurrent: false
+
+    wrappers:
+        - build-name:
+            name: '$BUILD_NUMBER - SDN: $SDN_CONTROLLER Feature: $OPNFV_FEATURE'
+
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - '{pod}-defaults'
+        - '{installer}-defaults'
+
+    scm:
+        - git-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: ''
+            branch: '{branch}'
+
+    builders:
+        - '{pod}-builder'
+
+########################
+# multijob builder macros
+########################
+# intel-pod5 is CI POD so full CI will run on it
+# deploy, functest, yardstick
+- builder:
+    name: joid-multijob-intel-pod5-builder
+    builders:
+        - multijob:
+            name: deploy
+            condition: SUCCESSFUL
+            projects:
+                - name: 'joid-deploy-{pod}-daily-{stream}'
+                  current-parameters: true
+                  git-revision: true
+                  kill-phase-on: FAILURE
+        - multijob:
+            name: functest
+            condition: COMPLETED
+            projects:
+                - name: 'functest-joid-{pod}-daily-{stream}'
+                  current-parameters: true
+                  kill-phase-on: NEVER
+# yardstick placeholder
+#        - multijob:
+#            name: yardstick
+#            condition: COMPLETED
+#            projects:
+#                - name: 'yardstick-joid-{pod}-daily-{stream}'
+#                  current-parameters: true
+#                  kill-phase-on: NEVER
+
+# orange-pod2 is NOT a CI POD so only the selected jobs will run
+# deploy and functest currently
+- builder:
+    name: joid-multijob-orange-pod2-builder
+    builders:
+        - multijob:
+            name: deploy
+            condition: SUCCESSFUL
+            projects:
+                - name: 'joid-deploy-{pod}-daily-{stream}'
+                  current-parameters: true
+                  git-revision: true
+                  kill-phase-on: FAILURE
+        - multijob:
+            name: functest
+            condition: COMPLETED
+            projects:
+                - name: 'functest-joid-{pod}-daily-{stream}'
+                  current-parameters: true
+                  kill-phase-on: NEVER
+########################
+# builder macros
+########################
+- builder:
+    name: intel-pod5-builder
+    builders:
+        - shell: |
+            #!/bin/bash
+            echo "Running $INSTALLER_TYPE with controller $SDN_CONTROLLER"
+            echo "Please note that this is a quick try to see how joid deployment works"
+            echo
+            echo "Executing clean.sh"
+            cd $WORKSPACE/ci
+            ./clean.sh
+            echo
+            echo "Executing 02-maasdeploy.sh intelpod5"
+            ./02-maasdeploy.sh intelpod5
+            echo
+            echo "Executing deploy.sh -o liberty -s $SDN_CONTROLLER -t ha -l intelpod5"
+            ./deploy.sh -o liberty -s $SDN_CONTROLLER -t ha -l intelpod5
+
+- builder:
+    name: orange-pod2-builder
+    builders:
+        - shell: |
+            #!/bin/bash
+            echo "Running $INSTALLER_TYPE with controller $SDN_CONTROLLER"
+            echo "Please note that this is WIP generic builder"
+            echo
+            echo "Executing clean.sh"
+            cd $WORKSPACE/ci
+            ./clean.sh
+        - shell:
+            !include-raw ./joid-deploy.sh
+########################
+# trigger macros
+########################
+- trigger:
+    name: 'joid-intel-pod5-trigger'
+    triggers:
+        - timed: '0 3 * * *'
+# timer trigger is commented out since we do not know if the automatic runs should
+# be enabled on orange-pod2
+- trigger:
+    name: 'joid-orange-pod2-trigger'
+    triggers:
+        - timed: '#0 3 * * *'
index d9ce86e..c7e5ba8 100644 (file)
@@ -2,12 +2,8 @@
 set +e
 set -o nounset
 
-####### Temporary - to be done with jenkins params #####
-JOID_MODE=ha
-JOID_RELEASE=liberty
-JOID_LOCAL_CONFIG_FOLDER=~/joid_config
-JOID_SDN_CONTROLLER=odl
-#################
+JOID_LOCAL_CONFIG_FOLDER=$HOME/joid_config
+JOID_ADMIN_OPENRC=$JOID_LOCAL_CONFIG_FOLDER/admin-openrc
 
 ##
 ## Load local config or defaults
@@ -18,6 +14,7 @@ if [ -e "$JOID_LOCAL_CONFIG_FOLDER/config.sh" ]; then
     source $JOID_LOCAL_CONFIG_FOLDER/config.sh
 else
     echo "------ No local config, load default ------"
+    # link NODE_NAME to joid node config names
     case $NODE_NAME in
         orange-fr-pod2)
             POD=orange-pod2 ;;
@@ -33,7 +30,6 @@ else
     export OS_ADMIN_PASSWORD=openstack
     export CEPH_DISKS=/srv
     export CEPH_REFORMAT=no
-    export JOID_ADMIN_OPENRC=$WORKSPACE/admin_openrc.sh
 fi
 
 ##
@@ -47,8 +43,8 @@ if [ -e "$JOID_LOCAL_CONFIG_FOLDER/environments.yaml" ] && [ "$MAAS_REINSTALL" =
 else
     MAASCONFIG=$WORKSPACE/ci/maas/$POD_DC/$POD_NUM/deployment.yaml
     echo "------ Set MAAS password ------"
-    sed -i -- 's/user: ubuntu/user: $MAAS_USER/' $MAASCONFIG
-    sed -i -- 's/password: ubuntu/password: $MAAS_PASSWORD/' $MAASCONFIG
+    sed -i -- "s/user: ubuntu/user: $MAAS_USER/" $MAASCONFIG
+    sed -i -- "s/password: ubuntu/password: $MAAS_PASSWORD/" $MAASCONFIG
     echo "------ Redeploy MAAS ------"
     ./02-maasdeploy.sh $POD_NAME
 fi
@@ -58,10 +54,10 @@ fi
 ##
 
 # Get juju deployer file
-if [ "$JOID_MODE" == 'nonha' ]; then
-    SRCBUNDLE=$WORKSPACE/ci/$JOID_SDN_CONTROLLER/juju-deployer/ovs-$JOID_SDN_CONTROLLER.yaml
+if [ "$HA_MODE" == 'nonha' ]; then
+    SRCBUNDLE=$WORKSPACE/ci/$SDN_CONTROLLER/juju-deployer/ovs-$SDN_CONTROLLER.yaml
 else
-    SRCBUNDLE=$WORKSPACE/ci/$JOID_SDN_CONTROLLER/juju-deployer/ovs-$JOID_SDN_CONTROLLER-$JOID_MODE.yaml
+    SRCBUNDLE=$WORKSPACE/ci/$SDN_CONTROLLER/juju-deployer/ovs-$SDN_CONTROLLER-$HA_MODE.yaml
 fi
 
 # Modify files
@@ -78,17 +74,24 @@ sed -i -r -- "s/^(\s+osd-reformat: )'no'/\1'$CEPH_REFORMAT'/" $SRCBUNDLE
 ##
 
 echo "------ Deploy with juju ------"
-echo "Execute: ./deploy.sh -t $JOID_MODE -o $JOID_RELEASE -s $JOID_SDN_CONTROLLER -l $POD_NAME"
+echo "Execute: ./deploy.sh -t $HA_MODE -o $OS_RELEASE -s $SDN_CONTROLLER -l $POD_NAME"
 
-./deploy.sh -t $JOID_MODE -o $JOID_RELEASE -s $JOID_SDN_CONTROLLER -l $POD_NAME
+./deploy.sh -t $HA_MODE -o $OS_RELEASE -s $SDN_CONTROLLER -l $POD_NAME
 
 ##
 ## Set Admin RC
 ##
 
-echo "------ Create OpenRC file ------"
-KEYSTONE=$(cat bundle.yaml |shyaml get-value openstack-phase2.services.keystone.options.vip)
+echo "------ Create OpenRC file [$JOID_ADMIN_OPENRC] ------"
+KEYSTONE=$(cat bundles.yaml |shyaml get-value openstack-phase2.services.keystone.options.vip)
 
+# create the folder if needed
+JOID_ADMIN_OPENRC_FOLDER=$(echo $JOID_ADMIN_OPENRC | perl -pe "s|^(.*/).*?$|\1|")
+if [ ! -d "$JOID_ADMIN_OPENRC_FOLDER" ]; then
+    mkdir -p $JOID_ADMIN_OPENRC_FOLDER
+fi
+
+# export the openrc file
 cat << EOF > $JOID_ADMIN_OPENRC
 export OS_USERNAME=admin
 export OS_PASSWORD=$OS_ADMIN_PASSWORD
@@ -97,7 +100,37 @@ export OS_AUTH_URL=http://$KEYSTONE:5000/v2.0
 export OS_REGION_NAME=Canonical
 EOF
 
+##
+## Backup local juju env
+##
+
 if [ -d "$JOID_LOCAL_CONFIG_FOLDER" ]; then
     echo "------ Backup Juju environment ------"
     cp environments.yaml $JOID_LOCAL_CONFIG_FOLDER/
 fi
+
+##
+## Basic test to return a realistic result to jenkins
+##
+source $JOID_ADMIN_OPENRC
+curl -i -sw '%{http_code}' -H "Content-Type: application/json"   -d "
+{ \"auth\": {
+    \"identity\": {
+      \"methods\": [\"password\"],
+      \"password\": {
+        \"user\": {
+          \"name\": \"$OS_TENANT_NAME\",
+          \"domain\": { \"id\": \"default\" },
+          \"password\": \"$OS_PASSWORD\"
+        }
+      }
+    }
+  }
+}"   http://$KEYSTONE:5000/v3/auth/tokens |grep "HTTP/1.1 20" 2>&1 >/dev/null; echo $?;
+RES=$?
+if [ $RES == 0 ]; then
+    echo "Deploy SUCCESS"
+else
+    echo "Deploy FAILED"
+fi
+exit $RES
diff --git a/jjb/joid/joid-project-jobs.yml b/jjb/joid/joid-project-jobs.yml
new file mode 100644 (file)
index 0000000..987b3f9
--- /dev/null
@@ -0,0 +1,62 @@
+###################################################
+# All the jobs except verify have been removed!
+# They will only be enabled on request by projects!
+###################################################
+- project:
+    name: joid-project-jobs
+
+    project: 'joid'
+
+    jobs:
+        - 'joid-verify-{stream}'
+
+# only master branch is enabled at the moment to keep no of jobs sane
+    stream:
+        - master:
+            branch: '{stream}'
+            gs-pathname: ''
+#        - brahmaputra:
+#            branch: 'stable/{stream}'
+#            gs-pathname: '/{stream}'
+
+- job-template:
+    name: 'joid-verify-{stream}'
+
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - gerrit-parameter:
+            branch: '{branch}'
+        - 'opnfv-build-defaults'
+
+    scm:
+        - gerrit-trigger-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: '$GERRIT_REFSPEC'
+            choosing-strategy: 'gerrit'
+
+    triggers:
+        - gerrit:
+            trigger-on:
+                - patchset-created-event:
+                    exclude-drafts: 'false'
+                    exclude-trivial-rebase: 'false'
+                    exclude-no-code-change: 'false'
+                - draft-published-event
+                - comment-added-contains-event:
+                    comment-contains-value: 'recheck'
+                - comment-added-contains-event:
+                    comment-contains-value: 'reverify'
+            projects:
+              - project-compare-type: 'ANT'
+                project-pattern: '{project}'
+                branches:
+                  - branch-compare-type: 'ANT'
+                    branch-pattern: '**/{branch}'
+                forbidden-file-paths:
+                  - compare-type: ANT
+                    pattern: 'docs/**|.gitignore'
+
+    builders:
+        - shell: |
+            echo "Nothing to verify!"
diff --git a/jjb/joid/joid.yml b/jjb/joid/joid.yml
deleted file mode 100644 (file)
index 28b019f..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-########################
-# Job configuration for joid
-########################
-- project:
-
-    name: 'joid'
-
-    installer: 'joid'
-
-    controller: 'odl'
-
-    pod:
-        - 'intel-pod5'
-        - 'orange-pod2'
-
-    stream:
-        - master:
-            branch: 'master'
-            gs-pathname: ''
-
-    jobs:
-        - 'joid-{controller}-{pod}-daily-{stream}'
-        - 'joid-deploy-{pod}-daily-{stream}'
-
-########################
-# job templates
-########################
-- job-template:
-    name: 'joid-{controller}-{pod}-daily-{stream}'
-
-    disabled: false
-
-    concurrent: false
-
-    parameters:
-        - project-parameter:
-            project: '{installer}'
-        - 'intel-us-build-1-defaults'
-        - '{installer}-defaults':
-            controller: '{controller}'
-
-    scm:
-        - git-scm:
-            credentials-id: '{ssh-credentials}'
-            refspec: ''
-            branch: '{branch}'
-
-    builders:
-        - trigger-builds:
-          - project: 'joid-deploy-{pod}-daily-{stream}'
-            git-revision: true
-            block: true
-            predefined-parameters:
-                CONTROLLER={controller}
-
-- job-template:
-    name: 'joid-deploy-{pod}-daily-{stream}'
-
-    disabled: false
-
-    concurrent: false
-
-    wrappers:
-        - build-name:
-            name: '$BUILD_NUMBER: {installer} $CONTROLLER'
-
-    parameters:
-        - project-parameter:
-            project: '{installer}'
-        - '{pod}-defaults'
-        - '{installer}-defaults':
-            controller: '{controller}'
-
-    scm:
-        - git-scm:
-            credentials-id: '{ssh-credentials}'
-            refspec: ''
-            branch: '{branch}'
-
-    builders:
-        - '{pod}-builder'
-
-########################
-# builder macros
-########################
-- builder:
-    name: intel-pod5-builder
-    builders:
-        - shell: |
-            #!/bin/bash
-            echo "Running $INSTALLER_TYPE with controller $CONTROLLER"
-            echo "Please note that this is a quick try to see how joid deployment works"
-            echo
-            echo "Executing clean.sh"
-            cd $WORKSPACE/ci
-            ./clean.sh
-        - shell: |
-            cd $WORKSPACE/ci
-            echo "Executing 02-maasdeploy.sh intelpod5"
-            ./02-maasdeploy.sh intelpod5
-        - shell: |
-            cd $WORKSPACE/ci
-            echo "Executing deploy.sh -o liberty -s $CONTROLLER -t ha -l intelpod5"
-            ./deploy.sh -o liberty -s $CONTROLLER -t ha -l intelpod5
-- builder:
-    name: orange-pod2-builder
-    builders:
-        - shell: |
-            #!/bin/bash
-            echo "Running $INSTALLER_TYPE with controller $CONTROLLER"
-            echo "Please note that this is WIP generic builder"
-            echo
-            echo "Executing clean.sh"
-            cd $WORKSPACE/ci
-            ./clean.sh
-        - shell:
-            !include-raw ./joid-deploy.sh
index 64945c6..dc170f7 100644 (file)
@@ -9,6 +9,14 @@
             name: INSTALLER_TYPE
             default: apex
             description: 'Installer used for deploying OPNFV on this POD'
+        - string:
+            name: SDN_CONTROLLER
+            default: 'nosdn'
+            description: 'SDN Controller to use'
+        - string:
+            name: OPNFV_FEATURE
+            default: 'none'
+            description: 'OPNFV Feature to activate'
 
 - parameter:
     name: 'compass-defaults'
             name: INSTALLER_TYPE
             default: compass
             description: 'Installer used for deploying OPNFV on this POD'
+        - string:
+            name: SDN_CONTROLLER
+            default: 'nosdn'
+            description: 'SDN Controller to use'
+        - string:
+            name: OPNFV_FEATURE
+            default: 'none'
+            description: 'OPNFV Feature to activate'
 
 - parameter:
     name: 'fuel-defaults'
             name: INSTALLER_TYPE
             default: fuel
             description: 'Installer used for deploying OPNFV on this POD'
+        - string:
+            name: SDN_CONTROLLER
+            default: 'nosdn'
+            description: 'SDN Controller to use'
+        - string:
+            name: OPNFV_FEATURE
+            default: 'none'
+            description: 'OPNFV Feature to activate'
+        - string:
+            name: DEPLOY_SCENARIO
+            default: 'test'
+            description: 'OPNFV Deployment Scenario'
 
 - parameter:
     name: 'joid-defaults'
             name: INSTALLER_TYPE
             default: joid
             description: 'Installer used for deploying OPNFV on this POD'
+        - string:
+            name: SDN_CONTROLLER
+            default: 'nosdn'
+            description: 'SDN Controller to use'
+        - string:
+            name: OPNFV_FEATURE
+            default: 'none'
+            description: 'OPNFV Feature to activate'
+        - string:
+            name: HA_MODE
+            default: 'ha'
+            description: 'High Availability mode (ha|nonha)'
+        - string:
+            name: OS_RELEASE
+            default: 'liberty'
+            description: 'OpenStack release (kilo|liberty)'
similarity index 81%
rename from jjb/opnfv/pod-params.yml
rename to jjb/opnfv/slave-params.yml
index e36a0b6..ddc1786 100644 (file)
@@ -15,7 +15,7 @@
         - string:
             name: GIT_BASE
             default: https://gerrit.opnfv.org/gerrit/$PROJECT
-            description: 'Git URL to use on the jumphost'
+            description: 'Git URL to use on this Jenkins Slave'
         - string:
             name: SSH_KEY
             default: /root/.ssh/id_rsa
         - string:
             name: GIT_BASE
             default: ssh://gerrit.opnfv.org:29418/$PROJECT
-            description: 'Git URL to use on the jumphost'
+            description: 'Git URL to use on this Jenkins Slave'
+        - string:
+            name: POD_CONF_DIR
+            default: $WORKSPACE/deploy/templates/hardware_environment/conf/linux_foundation_lab/pod2
+            description: 'Directory where POD configuration files are located.'
 
 - parameter:
     name: 'ericsson-pod1-defaults'
         - string:
             name: GIT_BASE
             default: https://gerrit.opnfv.org/gerrit/$PROJECT
-            description: 'Git URL to use on the jumphost'
+            description: 'Git URL to use on this Jenkins Slave'
+        - string:
+            name: POD_CONF_DIR
+            default: $WORKSPACE/deploy/templates/hardware_environment/conf/ericsson_montreal_lab/pod1
+            description: 'Directory where POD configuration files are located.'
 
 - parameter:
     name: 'ericsson-pod2-defaults'
         - string:
             name: GIT_BASE
             default: https://gerrit.opnfv.org/gerrit/$PROJECT
-            description: 'Git URL to use on the jumphost'
+            description: 'Git URL to use on this Jenkins Slave'
+        - string:
+            name: POD_CONF_DIR
+            default: $WORKSPACE/deploy/templates/hardware_environment/conf/ericsson_montreal_lab/pod2
+            description: 'Directory where POD configuration files are located.'
 
 - parameter:
     name: 'intelpod2-jumphost-defaults'
         - string:
             name: GIT_BASE
             default: https://gerrit.opnfv.org/gerrit/$PROJECT
-            description: 'Git URL to use on the jumphost'
+            description: 'Git URL to use on this Jenkins Slave'
         - string:
             name: SSH_KEY
             default: /root/.ssh/id_rsa
         - string:
             name: GIT_BASE
             default: https://gerrit.opnfv.org/gerrit/$PROJECT
-            description: 'Git URL to use on the jumphost'
+            description: 'Git URL to use on this Jenkins Slave'
 
 - parameter:
     name: 'intel-pod5-defaults'
         - string:
             name: GIT_BASE
             default: https://gerrit.opnfv.org/gerrit/$PROJECT
-            description: 'Git URL to use on the jumphost'
+            description: 'Git URL to use on this Jenkins Slave'
 
 - parameter:
     name: 'intel-pod6-defaults'
         - string:
             name: GIT_BASE
             default: https://gerrit.opnfv.org/gerrit/$PROJECT
-            description: 'Git URL to use on the jumphost'
+            description: 'Git URL to use on this Jenkins Slave'
 
 - parameter:
     name: 'intel-pod8-defaults'
         - string:
             name: GIT_BASE
             default: https://gerrit.opnfv.org/gerrit/$PROJECT
-            description: 'Git URL to use on the jumphost'
+            description: 'Git URL to use on this Jenkins Slave'
 
 - parameter:
     name: 'huawei-us-deploy-bare-1-defaults'
         - string:
             name: GIT_BASE
             default: https://gerrit.opnfv.org/gerrit/$PROJECT
-            description: 'Git URL to use on the jumphost'
+            description: 'Git URL to use on this Jenkins Slave'
 
 - parameter:
     name: 'opnfv-build-defaults'
         - string:
             name: GIT_BASE
             default: https://gerrit.opnfv.org/gerrit/$PROJECT
-            description: 'Git URL to use on the slave'
+            description: 'Git URL to use on this Jenkins Slave'
 
 - parameter:
     name: 'intel-us-build-1-defaults'
         - string:
             name: GIT_BASE
             default: https://gerrit.opnfv.org/gerrit/$PROJECT
-            description: 'Git URL to use on the slave'
+            description: 'Git URL to use on this Jenkins Slave'
 
 - parameter:
     name: 'intel-us-build-2-defaults'
         - string:
             name: GIT_BASE
             default: https://gerrit.opnfv.org/gerrit/$PROJECT
-            description: 'Git URL to use on the slave'
+            description: 'Git URL to use on this Jenkins Slave'
 
 - parameter:
     name: 'ericsson-ca-build-1-defaults'
         - string:
             name: GIT_BASE
             default: https://gerrit.opnfv.org/gerrit/$PROJECT
-            description: 'Git URL to use on the slave'
+            description: 'Git URL to use on this Jenkins Slave'
 
 - parameter:
     name: 'zte-build-1'
         - string:
             name: GIT_BASE
             default: https://gerrit.opnfv.org/gerrit/$PROJECT
-            description: 'Git URL to use on the slave'
+            description: 'Git URL to use on this Jenkins Slave'
 
 - parameter:
     name: 'orange-pod2-defaults'
         - string:
             name: GIT_BASE
             default: https://gerrit.opnfv.org/gerrit/$PROJECT
-            description: 'Git URL to use on the jumphost'
+            description: 'Git URL to use on this Jenkins Slave'
         - string:
             name: LAB_CONFIG
             default: "/home/opnfv/repos/functest"
         - string:
             name: GIT_BASE
             default: https://gerrit.opnfv.org/gerrit/$PROJECT
-            description: 'Git URL to use on the jumphost'
+            description: 'Git URL to use on this Jenkins Slave'
 
 - parameter:
-    name: 'intel-us-deploy-virtual-1-defaults'
+    name: 'fuel-deploy-virtual-defaults'
     parameters:
         - node:
             name: SLAVE_NAME
             description: 'Slave name on Jenkins'
             allowed-slaves:
                 - intel-us-deploy-virtual-1
+# ericsson slave has been excluded until the issues are identified and solved
+#                - ericsson-ca-deploy-virtual-1
             default-slaves:
                 - intel-us-deploy-virtual-1
-        - string:
-            name: INSTALLER_VERSION
-            default: latest
-            description: 'Version of the installer to deploy'
+# ericsson slave has been excluded until the issues are identified and solved
+#                - ericsson-ca-deploy-virtual-1
         - string:
             name: GIT_BASE
             default: https://gerrit.opnfv.org/gerrit/$PROJECT
-            description: 'Git URL to use on the jumphost'
+            description: 'Git URL to use on this Jenkins Slave'
 
 - parameter:
     name: 'intel-us-deploy-virtual-2-defaults'
         - string:
             name: GIT_BASE
             default: https://gerrit.opnfv.org/gerrit/$PROJECT
-            description: 'Git URL to use on the jumphost'
+            description: 'Git URL to use on this Jenkins Slave'
         - string:
             name: SSH_KEY
             default: /root/.ssh/id_rsa
index 00417eb..d4b41ee 100644 (file)
@@ -60,7 +60,8 @@
             set -o pipefail
 
             cd $WORKSPACE/ci
-            ./build.sh
+            echo "Builds have been disabled."
+#            ./build.sh
 
 - job-template:
     name: 'ovsnfv-merge-{stream}'
             set -o pipefail
 
             cd $WORKSPACE/ci
-            ./build.sh
+            echo "Builds have been disabled."
+#            ./build.sh
 
 - job-template:
     name: 'ovsnfv-daily-{stream}'
             set -o pipefail
 
             cd $WORKSPACE/ci
-            ./build.sh
+            echo "Builds have been disabled."
+#            ./build.sh
index a06507a..39803aa 100644 (file)
@@ -34,7 +34,7 @@
             branch: '{branch}'
 
     triggers:
-        - timed: 'H H * * *'
+        - pollscm: '@midnight'
 
     builders:
         - shell: |
             make
             # run basic sanity test
             make sanity
+            scl enable python33 bash
+            source ~/vsperfenv/bin/activate
+            cd ../ci
+            ./build-vsperf.sh daily
 
 - job-template:
     name: 'vswitchperf-verify-{stream}'
             make
             # run basic sanity test
             make sanity
+            scl enable python33 bash
+            source ~/vsperfenv/bin/activate
+            cd ../ci
+            ./build-vsperf.sh verify
 
 - job-template:
     name: 'vswitchperf-merge-{stream}'
             cd src
             make clobber
             make
+            scl enable python33 bash
+            source ~/vsperfenv/bin/activate
+            cd ../ci
+            ./build-vsperf.sh merge
similarity index 53%
rename from jjb/yardstick/yardstick.yml
rename to jjb/yardstick/yardstick-ci-jobs.yml
index e5c306a..470bf68 100644 (file)
+###################################
+# job configuration for functest
+###################################
 - project:
     name: yardstick
 
     project: '{name}'
 
+#--------------------------------
+# BRANCH ANCHORS
+#--------------------------------
+    master: &master
+        stream: master
+        branch: '{stream}'
+        gs-pathname: ''
+    brahmaputra: &brahmaputra
+        stream: brahmaputra
+        branch: 'stable/{stream}'
+        gs-pathname: '{stream}'
+#--------------------------------
+# POD, INSTALLER, AND BRANCH MAPPING
+#--------------------------------
+#      Current Mapping
+#--------------------------------
+#  everything runs against master branch
+#--------------------------------
     pod:
         - opnfv-jump-2:
             installer: fuel
+            <<: *master
         - ericsson-pod1:
             installer: fuel
+            <<: *master
+        - ericsson-pod2:
+            installer: fuel
+            <<: *master
         - huawei-us-deploy-bare-1:
             installer: compass
-
+            <<: *master
+#--------------------------------
+#     Milestone E Mapping
+#     !!!DO NOT ENABLE!!!
+#--------------------------------
+#        brahmaputra
+#--------------------------------
+#        - huawei-us-deploy-bare-1:
+#            installer: compass
+#            <<: *brahmaputra
+#        - intel-pod5:
+#            installer: joid
+#            <<: *brahmaputra
+#        - opnfv-jump-1:
+#            installer: apex
+#            <<: *brahmaputra
+#        - opnfv-jump-2:
+#            installer: fuel
+#            <<: *brahmaputra
+#--------------------------------
+#           master
+#--------------------------------
+#        - ericsson-pod1:
+#            installer: fuel
+#            <<: *master
+#        - ericsson-pod2:
+#            installer: fuel
+#            <<: *master
+#--------------------------------
     loop:
         - daily
 
     jobs:
         - 'yardstick-{installer}-{pod}-{loop}-{stream}'
-        - 'yardstick-merge-{stream}'
-        - 'yardstick-verify-{stream}'
-
-    stream:
-        - master:
-            branch: 'master'
-            gs-pathname: ''
-#        - brahmaputra:
-#            branch: 'stable/brahmaputra'
-#            gs-pathname: '/brahmaputra'
-
-- job-template:
-    name: 'yardstick-verify-{stream}'
-
-    parameters:
-        - project-parameter:
-            project: '{project}'
-        - gerrit-parameter:
-            branch: '{branch}'
-        - 'ericsson-ca-build-1-defaults'
-
-    scm:
-        - gerrit-trigger-scm:
-            credentials-id: '{ssh-credentials}'
-            refspec: '$GERRIT_REFSPEC'
-            choosing-strategy: 'gerrit'
-
-    triggers:
-        - gerrit:
-            trigger-on:
-                - patchset-created-event:
-                    exclude-drafts: 'false'
-                    exclude-trivial-rebase: 'false'
-                    exclude-no-code-change: 'false'
-                - draft-published-event
-                - comment-added-contains-event:
-                    comment-contains-value: 'recheck'
-                - comment-added-contains-event:
-                    comment-contains-value: 'reverify'
-            projects:
-              - project-compare-type: 'ANT'
-                project-pattern: '{project}'
-                branches:
-                  - branch-compare-type: 'ANT'
-                    branch-pattern: '**/{branch}'
-
-    builders:
-        - shell: |
-            #!/bin/bash
-            set -o errexit
-            set -o pipefail
-
-            echo "Running unit tests..."
-            cd $WORKSPACE
-            virtualenv $WORKSPACE/yardstick_venv
-            source $WORKSPACE/yardstick_venv/bin/activate
-            easy_install -U setuptools
-            python setup.py develop
-            ./run_tests.sh
-            deactivate
-
-- job-template:
-    name: 'yardstick-merge-{stream}'
-
-    parameters:
-        - project-parameter:
-            project: '{project}'
-        - gerrit-parameter:
-            branch: '{branch}'
-        - 'ericsson-ca-build-1-defaults'
-
-    scm:
-        - gerrit-trigger-scm:
-            credentials-id: '{ssh-credentials}'
-            refspec: ''
-            choosing-strategy: 'default'
-
-    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}'
-
-    builders:
-        - shell: |
-            #!/bin/bash
-            set -o errexit
-            set -o pipefail
-
-            echo "Running unit tests..."
-            cd $WORKSPACE
-            virtualenv $WORKSPACE/yardstick_venv
-            source $WORKSPACE/yardstick_venv/bin/activate
-            easy_install -U setuptools
-            python setup.py develop
-            ./run_tests.sh
-            deactivate
 
+################################
+# job templates
+################################
 - job-template:
     name: 'yardstick-{installer}-{pod}-{loop}-{stream}'
 
     disabled: false
 
+    wrappers:
+        - build-name:
+            name: '$BUILD_NUMBER - SDN: $SDN_CONTROLLER Feature: $OPNFV_FEATURE'
+
     parameters:
         - project-parameter:
             project: '{project}'
         - git-scm:
             credentials-id: '{ssh-credentials}'
             refspec: ''
-            branch: master
-
-    triggers:
-        - 'yardstick-trigger-{pod}'
+            branch: '{branch}'
 
     builders:
         - 'yardstick-cleanup'
             default: 'none'
             description: 'Arguments to use in order to choose the backend DB'
 
+- parameter:
+    name: 'yardstick-params-ericsson-pod2'
+    parameters:
+        - string:
+            name: YARDSTICK_DB_BACKEND
+            default: 'none'
+            description: 'Arguments to use in order to choose the backend DB'
+
 - parameter:
     name: 'yardstick-params-opnfv-jump-2'
     parameters:
             name: YARDSTICK_DB_BACKEND
             default: 'none'
             description: 'Arguments to use in order to choose the backend DB'
-########################
-# trigger macros
-########################
-- trigger:
-    name: 'yardstick-trigger-ericsson-pod1'
-    triggers:
-        - timed: '@midnight'
-
-- trigger:
-    name: 'yardstick-trigger-opnfv-jump-2'
-    triggers:
-        - timed: '#@midnight'
-
-- trigger:
-    name: 'yardstick-trigger-huawei-us-deploy-bare-1'
-    triggers:
-        - timed: '#@midnight'
diff --git a/jjb/yardstick/yardstick-project-jobs.yml b/jjb/yardstick/yardstick-project-jobs.yml
new file mode 100644 (file)
index 0000000..193b692
--- /dev/null
@@ -0,0 +1,118 @@
+###################################################
+# All the jobs except verify have been removed!
+# They will only be enabled on request by projects!
+###################################################
+- project:
+    name: yardstick-project-jobs
+
+    project: 'yardstick'
+
+    jobs:
+        - 'yardstick-verify-{stream}'
+        - 'yardstick-merge-{stream}'
+
+# only master branch is enabled at the moment to keep no of jobs sane
+    stream:
+        - master:
+            branch: 'master'
+            gs-pathname: ''
+#        - brahmaputra:
+#            branch: 'stable/brahmaputra'
+#            gs-pathname: '/brahmaputra'
+
+################################
+# job templates
+################################
+
+- job-template:
+    name: 'yardstick-verify-{stream}'
+
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - gerrit-parameter:
+            branch: '{branch}'
+        - 'ericsson-ca-build-1-defaults'
+
+    scm:
+        - gerrit-trigger-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: '$GERRIT_REFSPEC'
+            choosing-strategy: 'gerrit'
+
+    triggers:
+        - gerrit:
+            trigger-on:
+                - patchset-created-event:
+                    exclude-drafts: 'false'
+                    exclude-trivial-rebase: 'false'
+                    exclude-no-code-change: 'false'
+                - draft-published-event
+                - comment-added-contains-event:
+                    comment-contains-value: 'recheck'
+                - comment-added-contains-event:
+                    comment-contains-value: 'reverify'
+            projects:
+              - project-compare-type: 'ANT'
+                project-pattern: '{project}'
+                branches:
+                  - branch-compare-type: 'ANT'
+                    branch-pattern: '**/{branch}'
+    builders:
+        - shell: |
+            #!/bin/bash
+            set -o errexit
+            set -o pipefail
+
+            echo "Running unit tests..."
+            cd $WORKSPACE
+            virtualenv $WORKSPACE/yardstick_venv
+            source $WORKSPACE/yardstick_venv/bin/activate
+            easy_install -U setuptools
+            python setup.py develop
+            ./run_tests.sh
+            deactivate
+
+- job-template:
+    name: 'yardstick-merge-{stream}'
+
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - gerrit-parameter:
+            branch: '{branch}'
+        - 'ericsson-ca-build-1-defaults'
+
+    scm:
+        - gerrit-trigger-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: ''
+            choosing-strategy: 'default'
+
+    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}'
+
+    builders:
+        - shell: |
+            #!/bin/bash
+            set -o errexit
+            set -o pipefail
+
+            echo "Running unit tests..."
+            cd $WORKSPACE
+            virtualenv $WORKSPACE/yardstick_venv
+            source $WORKSPACE/yardstick_venv/bin/activate
+            easy_install -U setuptools
+            python setup.py develop
+            ./run_tests.sh
+            deactivate
index 56793f0..99c5aea 100755 (executable)
@@ -48,7 +48,7 @@ function check_rst_doc() {
     # Note: This check may fail in many jobs for building project docs, since
     #       the old sample has lines more than 120. We ignore failures on this
     #       check right now, but these have to be fixed before OPNFV B release.
-    _out=$(doc8 --max-line-length 120 "$_src") || {
+    _out=$(doc8 --max-line-length 120 --ignore D000 "$_src") || {
         _msg='Error: rst validatino (doc8) has failed, please fix the following error(s).'
         _errs=$(echo "$_out" | sed -n -e "/^$_src/s/^/    /p")
         echo