Merge "[WIP]:jobs to deploy danube and run dovetail from master"
authormei mei <meimei@huawei.com>
Thu, 6 Apr 2017 09:25:40 +0000 (09:25 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Thu, 6 Apr 2017 09:25:40 +0000 (09:25 +0000)
jjb/xci/bifrost-periodic-jobs.yml
jjb/xci/bifrost-verify-jobs.yml
jjb/xci/osa-periodic-jobs.yml
jjb/xci/xci-daily-jobs.yml
jjb/xci/xci-deploy.sh
prototypes/xci/config/env-vars
prototypes/xci/playbooks/configure-opnfvhost.yml
prototypes/xci/var/opnfv.yml

index 0c29fd3..3e9ff67 100644 (file)
         - string:
             name: ANSIBLE_VERBOSITY
             default: ''
+        - string:
+            name: XCI_LOOP
+            default: 'periodic'
 
     wrappers:
         - fix-workspace-permissions
index 80c816c..8068296 100644 (file)
         - string:
             name: ANSIBLE_VERBOSITY
             default: '-vvvv'
+        - string:
+            name: XCI_LOOP
+            default: 'verify'
 
     scm:
         - git:
index 42b4941..56a4b18 100644 (file)
         - string:
             name: ANSIBLE_VERBOSITY
             default: ''
+        - string:
+            name: XCI_LOOP
+            default: 'periodic'
 
     wrappers:
         - fix-workspace-permissions
index 94bfafe..64e13d3 100644 (file)
         - label:
             name: SLAVE_LABEL
             default: '{slave-label}'
+        - string:
+            name: XCI_LOOP
+            default: 'daily'
 
     triggers:
         - '{auto-trigger-name}'
               predefined-parameters: |
                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
                 XCI_FLAVOR=$XCI_FLAVOR
+                XCI_LOOP=$XCI_LOOP
               same-node: true
               block: true
         - trigger-builds:
               predefined-parameters: |
                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
                 XCI_FLAVOR=$XCI_FLAVOR
+                XCI_LOOP=$XCI_LOOP
               same-node: true
               block: true
               block-thresholds:
         - string:
             name: ANSIBLE_VERBOSITY
             default: ''
+        - string:
+            name: XCI_LOOP
+            default: 'daily'
 
     builders:
         - description-setter:
index 07ca795..b007b85 100755 (executable)
@@ -15,14 +15,14 @@ cd $WORKSPACE/prototypes/xci
 
 # for daily jobs, we want to use working versions
 # for periodic jobs, we will use whatever is set in the job, probably master
-if [[ "$JOB_NAME" =~ "daily" ]]; then
+if [[ "$XCI_LOOP" == "daily" ]]; then
     # source pinned-vars to get releng version
     source ./config/pinned-versions
 
     # checkout the version
     git checkout -q $OPNFV_RELENG_VERSION
     echo "Info: Using $OPNFV_RELENG_VERSION"
-elif [[ "$JOB_NAME" =~ "periodic" ]]; then
+elif [[ "$XCI_LOOP" == "periodic" ]]; then
     echo "Info: Using $OPNFV_RELENG_VERSION"
 fi
 
@@ -31,7 +31,7 @@ fi
 # to take this into account while deploying anyways
 # clone openstack-ansible
 # stable/ocata already use pinned versions so this is only valid for master
-if [[ "$JOB_NAME" =~ "periodic" && "$OPENSTACK_OSA_VERSION" == "master" ]]; then
+if [[ "$XCI_LOOP" == "periodic" && "$OPENSTACK_OSA_VERSION" == "master" ]]; then
     cd $WORKSPACE
     # get the url to openstack-ansible git
     source ./config/env-vars
index 052be2a..cefb412 100755 (executable)
@@ -9,6 +9,7 @@ export OPENSTACK_OSA_ETC_PATH=/etc/openstack_deploy
 export CLEAN_DIB_IMAGES=false
 export OPNFV_HOST_IP=192.168.122.2
 export XCI_FLAVOR_ANSIBLE_FILE_PATH=$OPNFV_RELENG_PATH/prototypes/xci/file/$XCI_FLAVOR
+export CI_LOOP=${CI_LOOP:-daily}
 export JOB_NAME=${JOB_NAME:-false}
 # TODO: this currently matches to bifrost ansible version
 # there is perhaps better way to do this
index 06e27e7..8c794c4 100644 (file)
         replace: '\1haproxy_state: enabled'
     - name: copy OPNFV OpenStack playbook
       shell: "/bin/cp -rf {{OPNFV_RELENG_PATH}}/prototypes/xci/file/setup-openstack.yml {{OPENSTACK_OSA_PATH}}/playbooks"
+    # Copy pinned role requirements if we are running as part of daily CI loop
     - name: copy OPNFV role requirements
       shell: "/bin/cp -rf {{OPNFV_RELENG_PATH}}/prototypes/xci/file/ansible-role-requirements.yml {{OPENSTACK_OSA_PATH}}"
+      when: XCI_LOOP == "daily"
 - hosts: localhost
   remote_user: root
   tasks:
index dd3761b..12cb556 100644 (file)
@@ -20,5 +20,6 @@ OPENSTACK_OSA_ETC_PATH: "{{ lookup('env','OPENSTACK_OSA_ETC_PATH') }}"
 XCI_ANSIBLE_PIP_VERSION: "{{ lookup('env','XCI_ANSIBLE_PIP_VERSION') }}"
 XCI_FLAVOR: "{{ lookup('env','XCI_FLAVOR') }}"
 XCI_FLAVOR_ANSIBLE_FILE_PATH: "{{ lookup('env','XCI_FLAVOR_ANSIBLE_FILE_PATH') }}"
+XCI_LOOP: "{{ lookup('env','XCI_LOOP') }}"
 LOG_PATH: "{{ lookup('env','LOG_PATH') }}"
 OPNFV_HOST_IP: "{{ lookup('env','OPNFV_HOST_IP') }}"