aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-10-23 19:03:53 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-10-27 16:59:28 +0000
commit77e60fe7ecc572aa44e0da9e3817bd7b76078734 (patch)
tree90b9d9162fe9667076f621290a04eff705c39eab
parent777eb4c1bcab2062afcdc65a0575cba268de562d (diff)
ci/deploy.sh: Add support for CI_DEBUG
While at it, use SSH_SALT global var in `cleanup_uefi`. Change-Id: I9400edde69d3aaaa1879cce0e79898c80db486db Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> (cherry picked from commit 3d92843941184335c2f1b3e8a074c6e9f2e49571)
-rwxr-xr-xci/deploy.sh7
-rw-r--r--patches/opnfv-fuel/0001-mcp-salt-formulas-Add-enable-armband-formula.patch4
-rw-r--r--patches/opnfv-fuel/0011-lib.sh-rm-Ubuntu-boot-entry-on-EFI-systems.patch4
3 files changed, 8 insertions, 7 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh
index f35a6d1..3862c13 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -e
##############################################################################
# Copyright (c) 2017 Enea Software AB and others.
# All rights reserved. This program and the accompanying materials
@@ -6,11 +6,12 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-set -e
-
+CI_DEBUG=${CI_DEBUG:-0}; [[ "${CI_DEBUG}" =~ (false|0) ]] || set -x
SCRIPT_DIR=$(readlink -f "$(dirname "${BASH_SOURCE[0]}")")
ARMBAND_BASE=$(readlink -e "${SCRIPT_DIR}/..")
+
export ARMBAND_BASE
+export CI_DEBUG
cd "${WORKSPACE:-${ARMBAND_BASE}}"
make patches-import
diff --git a/patches/opnfv-fuel/0001-mcp-salt-formulas-Add-enable-armband-formula.patch b/patches/opnfv-fuel/0001-mcp-salt-formulas-Add-enable-armband-formula.patch
index 9c8e107..c8d9305 100644
--- a/patches/opnfv-fuel/0001-mcp-salt-formulas-Add-enable-armband-formula.patch
+++ b/patches/opnfv-fuel/0001-mcp-salt-formulas-Add-enable-armband-formula.patch
@@ -58,7 +58,7 @@ index 19cd417..73983d2 100755
+
+salt -I 'nova:compute' state.sls armband || true
diff --git a/mcp/config/states/openstack_ha b/mcp/config/states/openstack_ha
-index aada4ad..afd6c53 100755
+index 89733cc..f1479ef 100755
--- a/mcp/config/states/openstack_ha
+++ b/mcp/config/states/openstack_ha
@@ -52,6 +52,7 @@ salt -I 'neutron:server' state.sls neutron -b 1
@@ -67,7 +67,7 @@ index aada4ad..afd6c53 100755
salt -I 'nova:compute' state.sls nova
+salt -I 'nova:compute' state.sls armband || true
- salt -I 'mongodb:server' state.sls mongodb
+ salt -I 'mongodb:server' state.sls mongodb || true
wait_for 90 "salt -C 'I@mongodb:server and *01*' cmd.run 'mongo localhost:27017/admin'"
diff --git a/mcp/config/states/virtual_control_plane b/mcp/config/states/virtual_control_plane
index 0650869..7611c12 100755
diff --git a/patches/opnfv-fuel/0011-lib.sh-rm-Ubuntu-boot-entry-on-EFI-systems.patch b/patches/opnfv-fuel/0011-lib.sh-rm-Ubuntu-boot-entry-on-EFI-systems.patch
index a1d9da9..01e3f95 100644
--- a/patches/opnfv-fuel/0011-lib.sh-rm-Ubuntu-boot-entry-on-EFI-systems.patch
+++ b/patches/opnfv-fuel/0011-lib.sh-rm-Ubuntu-boot-entry-on-EFI-systems.patch
@@ -31,7 +31,7 @@ Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
1 file changed, 10 insertions(+)
diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh
-index a165bb3..2a694a7 100644
+index a165bb3..bfde237 100644
--- a/mcp/scripts/lib.sh
+++ b/mcp/scripts/lib.sh
@@ -35,6 +35,15 @@ function get_base_image {
@@ -41,7 +41,7 @@ index a165bb3..2a694a7 100644
+function cleanup_uefi {
+ # Clean up Ubuntu boot entry if cfg01, kvm nodes online from previous deploy
+ # shellcheck disable=SC2086
-+ ssh ${SSH_OPTS} "ubuntu@${SALT_MASTER}" "sudo salt -C 'kvm* or cmp*' cmd.run \
++ ssh ${SSH_OPTS} "${SSH_SALT}" "sudo salt -C 'kvm* or cmp*' cmd.run \
+ \"which efibootmgr > /dev/null 2>&1 && \
+ efibootmgr | grep -oP '(?<=Boot)[0-9]+(?=.*ubuntu)' | \
+ xargs -I{} efibootmgr --delete-bootnum --bootnum {}\"" || true