summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
Diffstat (limited to 'ci')
-rwxr-xr-xci/build.sh12
-rwxr-xr-xci/deploy.sh7
-rwxr-xr-xci/dev_dep_check.sh15
3 files changed, 31 insertions, 3 deletions
diff --git a/ci/build.sh b/ci/build.sh
index 42388188..0536cf91 100755
--- a/ci/build.sh
+++ b/ci/build.sh
@@ -36,6 +36,7 @@ CACHE_DIR="cache"
CACHE_NAME="apex-cache"
MAKE_TARGETS="images"
REQUIRED_PKGS="rpm-build python-docutils"
+RELEASE_RPM=""
parse_cmdline() {
while [ "${1:0:1}" = "-" ]
@@ -63,6 +64,11 @@ parse_cmdline() {
echo "Buiding opnfv-apex RPMs"
shift 1
;;
+ --release-rpm )
+ RELEASE_RPM=" release-rpm"
+ echo "Buiding opnfv-apex RPMs"
+ shift 1
+ ;;
--debug )
debug="TRUE"
echo "Enable debug output"
@@ -88,6 +94,9 @@ run_make() {
parse_cmdline "$@"
+# Add release rpm to make targets if defined
+MAKE_TARGETS+=$RELEASE_RPM
+
# Install build dependencies
for pkg in $REQUIRED_PKGS; do
if ! rpm -q $pkg > /dev/null; then
@@ -143,6 +152,9 @@ if [[ "$MAKE_TARGETS" == "images" ]]; then
if [[ $commit_file_list == *build/rpm_specs/opnfv-apex-undercloud.spec* ]]; then
MAKE_TARGETS+=" undercloud-rpm-check"
fi
+ if [[ $commit_file_list == *build/rpm_specs/opnfv-apex-release.spec* ]]; then
+ MAKE_TARGETS+=" release-rpm-check"
+ fi
if [[ $commit_file_list == *build/rpm_specs/opnfv-apex-common.spec* ]]; then
MAKE_TARGETS+=" common-rpm-check"
fi
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 482e134b..f09529a7 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -24,6 +24,7 @@ green=$(tput setaf 2 || echo "")
interactive="FALSE"
ping_site="8.8.8.8"
+dnslookup_site="www.google.com"
post_config="TRUE"
debug="FALSE"
@@ -82,6 +83,7 @@ display_usage() {
echo -e " --inventory | -i : Full path to inventory yaml file. Required only for baremetal"
echo -e " --net-settings | -n : Full path to network settings file. Optional."
echo -e " --ping-site | -p : site to use to verify IP connectivity. Optional. Defaults to 8.8.8.8"
+ echo -e " --dnslookup-site : site to use to verify DNS resolution. Optional. Defaults to www.google.com"
echo -e " --virtual | -v : Virtualize overcloud nodes instead of using baremetal."
echo -e " --no-post-config : disable Post Install configuration."
echo -e " --debug : enable debug output."
@@ -123,6 +125,11 @@ parse_cmdline() {
echo "Using $2 as the ping site"
shift 2
;;
+ --dnslookup-site)
+ dnslookup_site=$2
+ echo "Using $2 as the dnslookup site"
+ shift 2
+ ;;
-v|--virtual)
virtual="TRUE"
echo "Executing a Virtual Deployment"
diff --git a/ci/dev_dep_check.sh b/ci/dev_dep_check.sh
index 52643459..6814227e 100755
--- a/ci/dev_dep_check.sh
+++ b/ci/dev_dep_check.sh
@@ -64,11 +64,20 @@ virt_pkgs=(
'perl-Sys-Guestfs-1.32.7-3.el7.x86_64.rpm'
'python-libguestfs-1.32.7-3.el7.x86_64.rpm'
)
-
+dir=/tmp/packages.$RANDOM
+mkdir -p $dir
+pushd $dir
+all_packages=""
for pkg in ${virt_pkgs[@]}; do
if ! rpm -q ${pkg%-*-*}; then
- if ! sudo yum -y install $virt_uri_base/$pkg; then
- echo "ERROR: Failed to update $pkg"
+ if ! wget $virt_uri_base/$pkg; then
+ echo "ERROR: Failed to download $pkg"
fi
+ all_packages="$all_packages $pkg"
fi
done
+if [[ $all_packages != "" ]];then
+ yum install -y $all_packages
+fi
+rm -rf $dir
+popd