summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>2016-01-11 16:56:57 +0100
committerFatih Degirmenci <fatih.degirmenci@ericsson.com>2016-01-11 16:56:57 +0100
commit9ab895c3451931b4b4562b223e9348e21961cb6e (patch)
treeb836402ba18b7d4e5f40f690f29721738f8b3ead /jjb
parent3a3abcfd016d0888329d5bcc67385fb8abee73b7 (diff)
fuel: Enable usage of new scenario description
Change-Id: Id61ddc6a2dae9378e2517174006ab1836a45114d Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
Diffstat (limited to 'jjb')
-rw-r--r--jjb/fuel/fuel-ci-jobs.yml40
-rwxr-xr-xjjb/fuel/fuel-deploy-new.sh59
2 files changed, 99 insertions, 0 deletions
diff --git a/jjb/fuel/fuel-ci-jobs.yml b/jjb/fuel/fuel-ci-jobs.yml
index 37cf78849..452d03712 100644
--- a/jjb/fuel/fuel-ci-jobs.yml
+++ b/jjb/fuel/fuel-ci-jobs.yml
@@ -49,6 +49,7 @@
jobs:
- 'fuel-{sdn-controller}-{pod}-daily-{stream}'
- 'fuel-deploy-{pod}-daily-{stream}'
+ - 'fuel-deploy-{pod}-daily-{stream}-wip'
########################
# job templates
@@ -157,6 +158,45 @@
publishers:
- email:
recipients: jonas.bjurel@ericsson.com stefan.k.berg@ericsson.com
+
+- job-template:
+ name: 'fuel-deploy-{pod}-daily-{stream}-wip'
+
+ concurrent: false
+
+ properties:
+ - throttle:
+ enabled: true
+ max-total: 1
+ max-per-node: 1
+
+ parameters:
+ - project-parameter:
+ project: 'fuel'
+ - 'ericsson-pod2-defaults'
+ - 'fuel-defaults'
+ - fuel-ci-parameter:
+ gs-pathname: ''
+
+ scm:
+ - git-scm:
+ credentials-id: '{ssh-credentials}'
+ refspec: ''
+ branch: 'master'
+
+ wrappers:
+ - build-name:
+ name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
+
+ builders:
+ - shell:
+ !include-raw-escape: ./fuel-download-artifact.sh
+ - shell:
+ !include-raw-escape: ./fuel-deploy-new.sh
+
+ publishers:
+ - email:
+ recipients: jonas.bjurel@ericsson.com stefan.k.berg@ericsson.com
########################
# parameter macros
########################
diff --git a/jjb/fuel/fuel-deploy-new.sh b/jjb/fuel/fuel-deploy-new.sh
new file mode 100755
index 000000000..1e362bc8f
--- /dev/null
+++ b/jjb/fuel/fuel-deploy-new.sh
@@ -0,0 +1,59 @@
+#!/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'/' -f3) for deployment"
+
+# checkout the commit that was used for building the downloaded artifact
+# to make sure the ISO and deployment mechanism uses same versions
+#echo "Checking out $OPNFV_GIT_SHA1"
+#git checkout $OPNFV_GIT_SHA1 --quiet
+
+# set deployment parameters
+BRIDGE=pxebr
+export TMPDIR=$HOME/tmpdir
+LAB_NAME=${NODE_NAME/-*}
+POD_NAME=${NODE_NAME/*-}
+
+# create TMPDIR if it doesn't exist
+mkdir -p $TMPDIR
+
+# change permissions down to TMPDIR
+chmod a+x $HOME
+chmod a+x $TMPDIR
+
+# clone the securedlab repo
+cd $WORKSPACE
+echo "Cloning securedlab repo"
+git clone ssh://jenkins-ericsson@gerrit.opnfv.org:29418/securedlab
+
+# construct the command
+DEPLOY_COMMAND="sudo $WORKSPACE/ci/deploy.sh -b file://$WORKSPACE/securedlab -l $LAB_NAME -p $POD_NAME -s $DEPLOY_SCENARIO -i $WORKSPACE/opnfv.iso -H -B $BRIDGE -S $TMPDIR"
+
+# log info to console
+echo "Deployment parameters"
+echo "Scenario: $DEPLOY_SCENARIO"
+echo "--------------------------------------------------------"
+echo "Lab: $LAB_NAME"
+echo "POD: $POD_NAME"
+echo "ISO: $(echo $OPNFV_ARTIFACT_URL | cut -d'/' -f3)"
+echo
+echo "Starting the deployment using $INSTALLER_TYPE. This could take some time..."
+echo "--------------------------------------------------------"
+echo
+
+# start the deployment
+echo "Issuing command"
+echo "$DEPLOY_COMMAND"
+echo
+
+$DEPLOY_COMMAND
+
+echo
+echo "--------------------------------------------------------"
+echo "Done!"