summaryrefslogtreecommitdiffstats
path: root/jjb/xci/xci-deploy.sh
diff options
context:
space:
mode:
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>2017-04-04 09:18:54 -0700
committerFatih Degirmenci <fatih.degirmenci@ericsson.com>2017-04-04 16:42:33 +0000
commitd1378b9f3d570d07af5a8f08144070059105373f (patch)
tree612e56018feba570b95f0678d9285ddba403e33e /jjb/xci/xci-deploy.sh
parent6e6882fcd2915870289c6612405be3c4e078b484 (diff)
xci: Introduce XCI_LOOP variable to control what to do properlydanube.1.0
XCI has different jobs/loops to run - patchset verification jobs (currently bifrost and osa in future) - periodic jobs (bifrost and osa) - daily jobs (for OPNFV platform deployment and testing) The same scripts/playbooks used by XCI will also be used by developers. We need to do different things depending on the context the scripts and playbooks are executed. - periodic jobs will use latest of everything to find working versions of the components. (periodic osa will use unpinned role requirements for example) - daily jobs will use pinned versions in order to bring up the platform and run OPNFV testing against it. (daily deployment will use pinned versions and role requirements for example) - developers might choose to use pinned versions or latest Depending on what loop we are running, we need to do things differently in scripts and playbooks. This variable will help us to do this in easy way. We can of course do pattern matching of the job name but it will not work if the scripts are used outside of Jenkins. The default loop for non-Jenkins execution is set to daily as we want developers to use working versions unless they change it to something else intentionally. Change-Id: Iff69c77ae3d9db2c14de1783ce098da9e9f0c83d Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
Diffstat (limited to 'jjb/xci/xci-deploy.sh')
-rwxr-xr-xjjb/xci/xci-deploy.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/jjb/xci/xci-deploy.sh b/jjb/xci/xci-deploy.sh
index 33457b9f0..1ef4e8237 100755
--- a/jjb/xci/xci-deploy.sh
+++ b/jjb/xci/xci-deploy.sh
@@ -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