summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
Diffstat (limited to 'jjb')
-rw-r--r--jjb/global/releng-macros.yml1
-rw-r--r--jjb/qtip/helpers/validate-deploy.sh22
-rw-r--r--jjb/xci/xci-daily-jobs.yml64
-rwxr-xr-xjjb/xci/xci-deploy.sh39
-rwxr-xr-xjjb/xci/xci-provision.sh40
5 files changed, 136 insertions, 30 deletions
diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml
index 63613f88d..6fdb4caf4 100644
--- a/jjb/global/releng-macros.yml
+++ b/jjb/global/releng-macros.yml
@@ -75,7 +75,6 @@
submodule:
recursive: true
timeout: 20
- shallow-clone: true
- trigger:
name: 'daily-trigger-disabled'
triggers:
diff --git a/jjb/qtip/helpers/validate-deploy.sh b/jjb/qtip/helpers/validate-deploy.sh
index a73e33c2c..aa07986ce 100644
--- a/jjb/qtip/helpers/validate-deploy.sh
+++ b/jjb/qtip/helpers/validate-deploy.sh
@@ -10,7 +10,9 @@ set -e
envs="INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP}
-e NODE_NAME=${NODE_NAME} -e CI_DEBUG=${CI_DEBUG}"
+ramfs=/tmp/qtip/ramfs
dir_imgstore="${HOME}/imgstore"
+ramfs_volume="$ramfs:/mnt/ramfs"
echo "--------------------------------------------------------"
echo "POD: $NODE_NAME"
@@ -21,7 +23,24 @@ echo "--------------------------------------------------------"
echo "Qtip: Pulling docker image: opnfv/qtip:${DOCKER_TAG}"
docker pull opnfv/qtip:$DOCKER_TAG
-cmd=" docker run -id -e $envs opnfv/qtip:${DOCKER_TAG} /bin/bash"
+# use ramfs to fix docker socket connection issue with overlay mode in centos
+if [ ! -d $ramfs ]; then
+ mkdir -p $ramfs
+fi
+
+if [ ! -z $(df $ramfs | tail -n -1 | grep $ramfs) ]; then
+ sudo mount -t tmpfs -o size=32M tmpfs $ramfs
+fi
+
+# enable contro path in docker
+echo <<EOF > /tmp/ansible.cfg
+[defaults]
+callback_whitelist = profile_tasks
+[ssh_connection]
+control_path=/mnt/ramfs/ansible-ssh-%%h-%%p-%%r
+EOF
+
+cmd=" docker run -id -e $envs -v ${ramfs_volume} opnfv/qtip:${DOCKER_TAG} /bin/bash"
echo "Qtip: Running docker command: ${cmd}"
${cmd}
@@ -32,6 +51,7 @@ if [ $(docker ps | grep 'opnfv/qtip' | wc -l) == 0 ]; then
else
echo "The container ID is: ${container_id}"
QTIP_REPO=/home/opnfv/repos/qtip
+ docker cp /tmp/ansible.cfg ${container_id}:/home/opnfv/.ansible.cfg
# TODO(zhihui_wu): use qtip cli to execute benchmark test in the future
docker exec -t ${container_id} bash -c "cd ${QTIP_REPO}/qtip/runner/ &&
python runner.py -d /home/opnfv/qtip/results/ -b all"
diff --git a/jjb/xci/xci-daily-jobs.yml b/jjb/xci/xci-daily-jobs.yml
index ce2e4f382..f42f86263 100644
--- a/jjb/xci/xci-daily-jobs.yml
+++ b/jjb/xci/xci-daily-jobs.yml
@@ -3,15 +3,22 @@
#--------------------------------
# BRANCH ANCHORS
#--------------------------------
+# the versions stated here default to branches which then later
+# on used for checking out the branches, pulling in head of the branch.
+# but they also allow us to state sha1 so instead of checking out the
+# branches, we can check out sha1 if we want to use locked/specific
+# sha1 or manually enter sha1.
master: &master
stream: master
- openstack-branch: '{stream}'
- opnfv-branch: 'master'
+ openstack-osa-version: '{stream}'
+ openstack-bifrost-version: '{stream}'
+ opnfv-releng-version: 'master'
gs-pathname: ''
ocata: &ocata
stream: ocata
- openstack-branch: 'stable/{stream}'
- opnfv-branch: 'master'
+ openstack-osa-version: 'stable/{stream}'
+ openstack-bifrost-version: 'stable/{stream}'
+ opnfv-releng-version: 'master'
gs-pathname: '/{stream}'
#--------------------------------
# scenarios
@@ -87,6 +94,18 @@
parameters:
- string:
+ name: OPENSTACK_OSA_VERSION
+ default: '{openstack-osa-version}'
+ - string:
+ name: OPENSTACK_BIFROST_VERSION
+ default: '{openstack-osa-version}'
+ - string:
+ name: OPNFV_RELENG_VERSION
+ default: '{opnfv-releng-version}'
+ - string:
+ name: USE_PROMOTED_VERSIONS
+ default: 'true'
+ - string:
name: DEPLOY_SCENARIO
default: '{scenario}'
- label:
@@ -105,22 +124,34 @@
- trigger-builds:
- project: 'xci-provision-{pod}-{distro}-daily-{stream}'
current-parameters: false
- predefined-parameters:
- DEPLOY_SCENARIO={scenario}
+ predefined-parameters: |
+ OPENSTACK_OSA_VERSION=$OPENSTACK_OSA_VERSION
+ OPENSTACK_BIFROST_VERSION=$OPENSTACK_BIFROST_VERSION
+ OPNFV_RELENG_VERSION=$OPNFV_RELENG_VERSION
+ USE_PROMOTED_VERSIONS=$USE_PROMOTED_VERSIONS
+ DEPLOY_SCENARIO=$DEPLOY_SCENARIO
same-node: true
block: true
- trigger-builds:
- project: 'xci-deploy-{pod}-{distro}-daily-{stream}'
current-parameters: false
- predefined-parameters:
- DEPLOY_SCENARIO={scenario}
+ predefined-parameters: |
+ OPENSTACK_OSA_VERSION=$OPENSTACK_OSA_VERSION
+ OPENSTACK_BIFROST_VERSION=$OPENSTACK_BIFROST_VERSION
+ OPNFV_RELENG_VERSION=$OPNFV_RELENG_VERSION
+ USE_PROMOTED_VERSIONS=$USE_PROMOTED_VERSIONS
+ DEPLOY_SCENARIO=$DEPLOY_SCENARIO
same-node: true
block: true
- trigger-builds:
- project: 'xci-functest-{pod}-{distro}-daily-{stream}'
current-parameters: false
- predefined-parameters:
- DEPLOY_SCENARIO={scenario}
+ predefined-parameters: |
+ OPENSTACK_OSA_VERSION=$OPENSTACK_OSA_VERSION
+ OPENSTACK_BIFROST_VERSION=$OPENSTACK_BIFROST_VERSION
+ OPNFV_RELENG_VERSION=$OPNFV_RELENG_VERSION
+ USE_PROMOTED_VERSIONS=$USE_PROMOTED_VERSIONS
+ DEPLOY_SCENARIO=$DEPLOY_SCENARIO
same-node: true
block: true
block-thresholds:
@@ -151,11 +182,14 @@
parameters:
- string:
- name: OPENSTACK_BRANCH
- default: '{openstack-branch}'
+ name: OPENSTACK_OSA_VERSION
+ default: '{openstack-osa-version}'
+ - string:
+ name: OPENSTACK_BIFROST_VERSION
+ default: '{openstack-osa-version}'
- string:
- name: OPNFV_BRANCH
- default: '{opnfv-branch}'
+ name: OPNFV_RELENG_VERSION
+ default: '{opnfv-releng-version}'
- string:
name: USE_PROMOTED_VERSIONS
default: 'true'
@@ -201,7 +235,7 @@
- pre-scm-buildstep:
- shell: |
#!/bin/bash
- sudo -R chown $USER $WORKSPACE || exit 1
+ sudo chown -R $USER $WORKSPACE || exit 1
#---------------------------
# builder macros
diff --git a/jjb/xci/xci-deploy.sh b/jjb/xci/xci-deploy.sh
index dae67cf84..87f9ec8db 100755
--- a/jjb/xci/xci-deploy.sh
+++ b/jjb/xci/xci-deploy.sh
@@ -46,18 +46,32 @@ fix_ownership
# openstack-ansible enables strict host key checking by default
export ANSIBLE_HOST_KEY_CHECKING=False
+# ensure the versions to checkout are set
+export OPENSTACK_OSA_VERSION=${OPENSTACK_OSA_VERSION:-master}
+export OPNFV_RELENG_VERSION=${OPNFV_RELENG_VERSION:-master}
+
+# log some info
+echo -e "\n"
+echo "***********************************************************************"
+echo "* *"
+echo "* Deploy OpenStack *"
+echo "* *"
+echo " openstack-ansible version: $OPENSTACK_OSA_VERSION"
+echo " releng version: $OPNFV_RELENG_VERSION"
+echo "* *"
+echo "***********************************************************************"
+echo -e "\n"
+# clone releng repo
+sudo git clone --quiet https://gerrit.opnfv.org/gerrit/releng /opt/releng
+cd /opt/releng && sudo git checkout --quiet $OPNFV_RELENG_VERSION
+echo "xci: using openstack-ansible commit"
+git show --oneline -s --pretty=format:'%h - %s (%cr) <%an>'
+
# display the nodes
+echo "xci: OpenStack nodes"
cd /opt/bifrost
source env-vars
ironic node-list
-virsh list
-
-# ensure the branches to use are set
-export OPNFV_BRANCH=${OPNFV_BRANCH:-master}
-export OPENSTACK_BRANCH=${OPENSTACK_BRANCH:-master}
-
-# clone releng repo
-sudo git clone -b $OPNFV_BRANCH https://gerrit.opnfv.org/gerrit/releng /opt/releng
# this script will be reused for promoting openstack-ansible versions and using
# promoted openstack-ansible versions as part of xci daily.
@@ -68,3 +82,12 @@ fi
cd /opt/releng/prototypes/openstack-ansible/scripts
sudo -E ./osa-deploy.sh
+
+# log some info
+echo -e "\n"
+echo "***********************************************************************"
+echo "* *"
+echo "* OpenStack deployment is completed! *"
+echo "* *"
+echo "***********************************************************************"
+echo -e "\n"
diff --git a/jjb/xci/xci-provision.sh b/jjb/xci/xci-provision.sh
index e474093b8..a1ba78bf0 100755
--- a/jjb/xci/xci-provision.sh
+++ b/jjb/xci/xci-provision.sh
@@ -43,11 +43,32 @@ sudo /bin/rm -rf /opt/bifrost /opt/openstack-ansible /opt/stack /opt/releng /opt
# Fix up permissions
fix_ownership
-# ensure the branches to use are set
-export OPENSTACK_BRANCH=${OPENSTACK_BRANCH:-master}
-export OPNFV_BRANCH=${OPNFV_BRANCH:-master}
-sudo git clone -b $OPENSTACK_BRANCH https://git.openstack.org/openstack/bifrost /opt/bifrost
-sudo git clone -b $OPNFV_BRANCH https://gerrit.opnfv.org/gerrit/releng /opt/releng
+# ensure the versions to checkout are set
+export OPENSTACK_BIFROST_VERSION=${OPENSTACK_BIFROST_VERSION:-master}
+export OPNFV_RELENG_VERSION=${OPNFV_RELENG_VERSION:-master}
+
+# log some info
+echo -e "\n"
+echo "***********************************************************************"
+echo "* *"
+echo "* Provision OpenStack Nodes *"
+echo "* *"
+echo " bifrost version: $OPENSTACK_BIFROST_VERSION"
+echo " releng version: $OPNFV_RELENG_VERSION"
+echo "* *"
+echo "***********************************************************************"
+echo -e "\n"
+
+# clone the repos and checkout the versions
+sudo git clone --quiet https://git.openstack.org/openstack/bifrost /opt/bifrost
+cd /opt/bifrost && sudo git checkout --quiet $OPENSTACK_BIFROST_VERSION
+echo "xci: using bifrost commit"
+git show --oneline -s --pretty=format:'%h - %s (%cr) <%an>'
+
+sudo git clone --quiet https://gerrit.opnfv.org/gerrit/releng /opt/releng
+cd /opt/releng && sudo git checkout --quiet $OPNFV_RELENG_VERSION
+echo "xci: using releng commit"
+git show --oneline -s --pretty=format:'%h - %s (%cr) <%an>'
# this script will be reused for promoting bifrost versions and using
# promoted bifrost versions as part of xci daily.
@@ -72,3 +93,12 @@ cd /opt/bifrost
source env-vars
ironic node-list
virsh list
+
+# log some info
+echo -e "\n"
+echo "***********************************************************************"
+echo "* *"
+echo "* OpenStack nodes are provisioned! *"
+echo "* *"
+echo "***********************************************************************"
+echo -e "\n"