summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xjjb/fuel/fuel-deploy.sh49
-rwxr-xr-xjjb/fuel/fuel-lab-reconfig.sh72
-rw-r--r--jjb/fuel/fuel.yml168
-rw-r--r--jjb/genesis/genesis-fuel.yml6
4 files changed, 284 insertions, 11 deletions
diff --git a/jjb/fuel/fuel-deploy.sh b/jjb/fuel/fuel-deploy.sh
new file mode 100755
index 000000000..4d7a9b9c5
--- /dev/null
+++ b/jjb/fuel/fuel-deploy.sh
@@ -0,0 +1,49 @@
+#!/bin/bash
+set -o errexit
+set -o nounset
+set -o pipefail
+
+# source the file so we get OPNFV vars
+source latest.properties
+
+# echo the info about artifact that is used during the deployment
+echo "Using $(echo $OPNFV_ARTIFACT_URL | cut -d'/' -f4) for deployment"
+
+# create TMPDIR if it doesn't exist
+export TMPDIR=$HOME/tmpdir
+[[ -d $TMPDIR ]] || mkdir -p $TMPDIR
+
+# change permissions down to TMPDIR
+chmod a+x $HOME
+chmod a+x $TMPDIR
+
+# set CONFDIR, BRIDGE
+export CONFDIR=$WORKSPACE/fuel/deploy/templates/hardware_environment/conf/linux_foundation_lab/pod2
+export BRIDGE=pxebr
+
+# clone genesis repo and checkout the SR1 tag
+echo "Cloning genesis repo"
+cd $WORKSPACE
+git clone https://gerrit.opnfv.org/gerrit/p/genesis.git 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
+
+# prepare for Fuel Deployment
+sudo $WORKSPACE/genesis/common/ci/setup.sh
+
+# log info to console
+echo "Starting the deployment using $INSTALLER. This could take some time..."
+echo "--------------------------------------------------------"
+echo
+
+# start the deployment
+echo "Issuing command"
+echo "sudo $WORKSPACE/fuel/ci/deploy.sh -iso $WORKSPACE/opnfv.iso -dea $CONFDIR/dea.yaml -dha $CONFDIR/dha.yaml -s $TMPDIR -b $BRIDGE -nh"
+sudo $WORKSPACE/fuel/ci/deploy.sh -iso $WORKSPACE/opnfv.iso -dea $CONFDIR/dea.yaml -dha $CONFDIR/dha.yaml -s $TMPDIR -b $BRIDGE -nh
+
+echo
+echo "--------------------------------------------------------"
+echo "Done!"
diff --git a/jjb/fuel/fuel-lab-reconfig.sh b/jjb/fuel/fuel-lab-reconfig.sh
new file mode 100755
index 000000000..a79bc2c51
--- /dev/null
+++ b/jjb/fuel/fuel-lab-reconfig.sh
@@ -0,0 +1,72 @@
+#!/bin/bash
+set -o errexit
+set -o nounset
+set -o pipefail
+
+# check to see if ucs login info file exists
+if [ -e ~/.ssh/ucs_creds ];then
+ source ~/.ssh/ucs_creds
+else
+ echo "Unable to find UCS credentials for LF lab reconfiguration...Exiting"
+ exit 1
+fi
+
+# clone releng
+echo "Cloning releng repo..."
+if ! GIT_SSL_NO_VERIFY=true git clone https://gerrit.opnfv.org/gerrit/releng; then
+ echo "Unable to clone releng repo...Exiting"
+ exit 1
+fi
+
+# log info to console
+echo "Starting the lab reconfiguration for $INSTALLER..."
+echo "--------------------------------------------------------"
+echo
+
+# create venv
+$WORKSPACE/releng/utils/lab-reconfiguration/create_venv.sh
+
+# disable nounset because 'activate' script contains unbound variable(s)
+set +o nounset
+# enter venv
+source $WORKSPACE/releng/utils/lab-reconfiguration/venv/bin/activate
+# set nounset back again
+set -o nounset
+
+# verify we are in venv
+if [[ ! $(which python | grep venv) ]]; then
+ echo "Unable to activate venv...Exiting"
+ exit 1
+fi
+
+python $WORKSPACE/releng/utils/lab-reconfiguration/reconfigUcsNet.py -i $ucs_host -u $ucs_user -p $ucs_password -f $WORKSPACE/releng/utils/lab-reconfiguration/fuel.yaml
+
+# while undergoing reboot
+sleep 30
+
+# check to see if slave is back up
+ping_counter=0
+ping_flag=0
+while [ "$ping_counter" -lt 20 ]; do
+ if [[ $(ping -c 5 172.30.10.72) ]]; then
+ ping_flag=1
+ break
+ fi
+ ((ping_counter++))
+ sleep 10
+done
+
+if [ "$ping_flag" -eq 1 ]; then
+ echo "Slave is pingable, now wait 180 seconds for services to start"
+ sleep 180
+else
+ echo "Slave did not come back up after reboot: please check opnfv-jump-2"
+ exit 1
+fi
+
+set +o nounset
+deactivate
+
+echo
+echo "--------------------------------------------------------"
+echo "Done!"
diff --git a/jjb/fuel/fuel.yml b/jjb/fuel/fuel.yml
index 1d0b36928..5703b0ad3 100644
--- a/jjb/fuel/fuel.yml
+++ b/jjb/fuel/fuel.yml
@@ -15,6 +15,9 @@
- 'fuel-merge-build-{stream}'
- 'fuel-merge-virtual-deploy-{stream}'
- 'fuel-daily-{stream}'
+ - 'fuel-build-{stream}'
+ - 'fuel-deploy-{stream}'
+ - 'fuel-lab-reconfig-{stream}'
stream:
- master:
@@ -282,11 +285,27 @@
- job-template:
name: 'fuel-daily-{stream}'
+ project-type: freestyle
+
node: ericsson-build
- disabled: true
+ disabled: false
- project-type: freestyle
+ 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}'
logrotate:
daysToKeep: '{build-days-to-keep}'
@@ -294,9 +313,49 @@
artifactDaysToKeep: '{build-artifact-days-to-keep}'
artifactNumToKeep: '{build-artifact-num-to-keep}'
+ builders:
+ - trigger-builds:
+ - project: 'fuel-build-{stream}'
+ git-revision: true
+ block: true
+ - trigger-builds:
+ - project: 'fuel-lab-reconfig-{stream}'
+ git-revision: true
+ block: true
+ - trigger-builds:
+ - project: 'fuel-deploy-{stream}'
+ git-revision: true
+ block: true
+ - trigger-builds:
+ - project: 'functest-fuel-{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}'
+
+ project-type: freestyle
+
+ node: ericsson-build
+
+ logrotate:
+ daysToKeep: 30
+ numToKeep: 10
+ artifactDaysToKeep: -1
+ artifactNumToKeep: -1
+
parameters:
- project-parameter:
project: '{project}'
+ - fuel-parameter:
+ installer: '{installer}'
+ gs-pathname: '{gs-pathname}'
scm:
- git-scm:
@@ -304,16 +363,101 @@
refspec: ''
branch: '{branch}'
- wrappers:
- - ssh-agent-credentials:
- user: '{ssh-credentials}'
+ builders:
+ - shell:
+ !include-raw ./fuel-build.sh
+ - shell:
+ !include-raw ./fuel-upload-artifact.sh
+ - shell:
+ !include-raw ./fuel-workspace-cleanup.sh
- triggers:
- - timed: 'H H * * *'
+ publishers:
+ - email:
+ recipients: jonas.bjurel@ericsson.com stefan.k.berg@ericsson.com
+
+- job-template:
+ name: 'fuel-deploy-{stream}'
+
+ project-type: freestyle
+
+ 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}'
+
+ logrotate:
+ daysToKeep: 30
+ numToKeep: 10
+ artifactDaysToKeep: -1
+ artifactNumToKeep: -1
builders:
- shell:
- echo "Hello World"
+ !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}'
+
+ project-type: freestyle
+
+ disabled: false
+
+ node: master
+
+ logrotate:
+ daysToKeep: 30
+ numToKeep: 10
+ artifactDaysToKeep: -1
+ artifactNumToKeep: -1
+
+ 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
@@ -341,3 +485,11 @@
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 5 * * *'
diff --git a/jjb/genesis/genesis-fuel.yml b/jjb/genesis/genesis-fuel.yml
index dc203efb0..a957a693b 100644
--- a/jjb/genesis/genesis-fuel.yml
+++ b/jjb/genesis/genesis-fuel.yml
@@ -211,7 +211,7 @@
disabled: '{obj:disabled}'
triggers:
- - 'fuel-{stream}'
+ - 'genesis-fuel-{stream}-trigger'
parameters:
- project-parameter:
@@ -751,11 +751,11 @@
# trigger macros
########################
- trigger:
- name: 'fuel-master'
+ name: 'genesis-fuel-master-trigger'
triggers:
- timed: '0 5 * * *'
- trigger:
- name: 'fuel-stable-arno'
+ name: 'genesis-fuel-stable-arno-trigger'
triggers:
- timed: '0 7 * * *'