xci: Configure ansible verbosity based on job type 87/31687/3
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>
Fri, 24 Mar 2017 10:19:42 +0000 (11:19 +0100)
committerFatih Degirmenci <fatih.degirmenci@ericsson.com>
Fri, 24 Mar 2017 16:04:23 +0000 (16:04 +0000)
Daily jobs will use pinned versions of bifrost and openstack-ansible in
order to make sure we use known good versions for them since focus of
the daily jobs is  OPNFV platform testing.

Ansible log can easily become massive depending on the level it is set
and it is not so relevant for daily jobs to have it like this due to
less probability of dailies failing to provision/deploy.

On the other hand, the jobs that verify/test bifrost and openstack-ansible
will have max verbosity enabled to troubleshoot these components themselves.

New set of jobs will be created running periodically against the HEAD
of master for bifrost and openstack-ansible to catch working versions
and help us promote them to use for daily platform jobs. Verbosity of these
jobs will be enabled like how we are doing for bifrost-verify jobs.

Change-Id: Ic9fd2ff418fdaa3ad7fbfc22d8ec2dc1174df65f
Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
jjb/xci/bifrost-verify-jobs.yml
jjb/xci/xci-daily-jobs.yml
prototypes/bifrost/scripts/bifrost-provision.sh

index b9798c7..2fa99b2 100644 (file)
         - string:
             name: BIFROST_LOG_URL
             default: 'http://artifacts.opnfv.org/cross-community-ci/openstack/bifrost/$GERRIT_NAME/$GERRIT_CHANGE_NUMBER/$GERRIT_PATCHSET_NUMBER/$JOB_NAME'
+        - string:
+            name: ANSIBLE_VERBOSITY
+            default: '-vvvv'
 
     scm:
         - git:
index b79f711..7519bac 100644 (file)
         - label:
             name: SLAVE_LABEL
             default: '{slave-label}'
+        - string:
+            name: ANSIBLE_VERBOSITY
+            default: ''
 
     wrappers:
         - xci-fix-perms-workspace
index 0c13a84..2814808 100755 (executable)
@@ -14,6 +14,7 @@ export PYTHONUNBUFFERED=1
 SCRIPT_HOME="$(cd "$(dirname "$0")" && pwd)"
 BIFROST_HOME=$SCRIPT_HOME/..
 ANSIBLE_INSTALL_ROOT=${ANSIBLE_INSTALL_ROOT:-/opt/stack}
+ANSIBLE_VERBOSITY=${ANSIBLE_VERBOSITY-"-vvvv"}
 ENABLE_VENV="false"
 USE_DHCP="false"
 USE_VENV="false"
@@ -83,19 +84,19 @@ cd $BIFROST_HOME/playbooks
 
 # Syntax check of dynamic inventory test path
 for task in syntax-check list-tasks; do
-    ${ANSIBLE} -vvvv \
+    ${ANSIBLE} ${ANSIBLE_VERBOSITY} \
            -i inventory/localhost \
            test-bifrost-create-vm.yaml \
            --${task}
-    ${ANSIBLE} -vvvv \
+    ${ANSIBLE} ${ANSIBLE_VERBOSITY} \
            -i inventory/localhost \
            ${TEST_PLAYBOOK} \
            --${task} \
            -e testing_user=${TESTING_USER}
 done
 
-# Create the test VMS
-${ANSIBLE} -vvvv \
+# Create the VMS
+${ANSIBLE} ${ANSIBLE_VERBOSITY} \
        -i inventory/localhost \
        test-bifrost-create-vm.yaml \
        -e test_vm_num_nodes=${TEST_VM_NUM_NODES} \
@@ -104,8 +105,8 @@ ${ANSIBLE} -vvvv \
        -e test_vm_domain_type=${VM_DOMAIN_TYPE} \
        -e ${INVENTORY_FILE_FORMAT}=${BAREMETAL_DATA_FILE}
 
-# Execute the installation and VM startup test.
-${ANSIBLE} -vvvv \
+# Execute the installation and VM startup test
+${ANSIBLE} ${ANSIBLE_VERBOSITY} \
     -i inventory/bifrost_inventory.py \
     ${TEST_PLAYBOOK} \
     -e use_cirros=${USE_CIRROS} \