Fix ShellCheck issues in jjb/packaging 35/53035/3
authorThanh Ha <thanh.ha@linuxfoundation.org>
Wed, 8 Mar 2017 21:43:01 +0000 (16:43 -0500)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Thu, 9 Mar 2017 03:30:50 +0000 (22:30 -0500)
Change-Id: I9636f337273ed9ec5ad4bdcb99d9eec5f1d3f6ba
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
jjb/packaging/include-raw-build-deb.sh
jjb/packaging/include-raw-build-rpm-snap.sh
jjb/packaging/include-raw-build-rpm.sh
jjb/packaging/include-raw-test-puppet.sh

index adb3c3ae0b42d2635b0f58d4c73fcfc50255faa1..1aad638df6e75d7f4164baa96ccc26cb2efab127 100644 (file)
@@ -17,7 +17,7 @@ sudo apt-get install -y --force-yes \
                     gdebi
 
 # Build release specified by build params
-$WORKSPACE/packaging/deb/build.py --major "$VERSION_MAJOR" \
+"$WORKSPACE/packaging/deb/build.py" --major "$VERSION_MAJOR" \
                                   --minor "$VERSION_MINOR" \
                                   --patch "$VERSION_PATCH" \
                                   --deb "$PKG_VERSION" \
index 0a2a6ddf69bf03cb6479f5267b4e5065133f3ea5..67ccc8eeedc729675427daed4e6d27f95aed6853 100644 (file)
@@ -8,12 +8,13 @@ set -ex -o pipefail
 
 # Install required packages
 virtualenv rpm_build
+# shellcheck disable=SC1091
 source rpm_build/bin/activate
 pip install --upgrade pip
-pip install -r $WORKSPACE/packaging/rpm/requirements.txt
+pip install -r "$WORKSPACE/packaging/rpm/requirements.txt"
 
 # Build the latest snapshot matching the given major minor version
-$WORKSPACE/packaging/rpm/build.py --build-latest-snap \
+"$WORKSPACE/packaging/rpm/build.py" --build-latest-snap \
                                   --major "$VERSION_MAJOR" \
                                   --minor "$VERSION_MINOR" \
                                   --sysd_commit "$SYSD_COMMIT" \
index ab788d91baad9b67e0f9440e34a12bff2738a7a1..74a75213825e22f018caa612944c59777fcfab96 100644 (file)
@@ -8,15 +8,17 @@ set -ex -o pipefail
 
 # Install required packages
 virtualenv rpm_build
+# shellcheck disable=SC1091
 source rpm_build/bin/activate
 pip install --upgrade pip
-pip install -r $WORKSPACE/packaging/rpm/requirements.txt
+pip install -r "$WORKSPACE/packaging/rpm/requirements.txt"
 
 # Make a URL for the tarball artifact from DOWNLOAD_URL (a zip)
+# shellcheck disable=SC2154
 download_url="${{DOWNLOAD_URL//zip/tar.gz}}"
 
 # Build release specified by build params
-$WORKSPACE/packaging/rpm/build.py --download_url "$download_url" \
+"$WORKSPACE/packaging/rpm/build.py" --download_url "$download_url" \
                                   --sysd_commit "$SYSD_COMMIT" \
                                   --changelog_date "$CHANGELOG_DATE" \
                                   --changelog_name "$CHANGELOG_NAME" \
index d79bd1c19e2f1180e26a5445cb0b0dc4493cde73..cb015679bb539f54699ed6963cbb1ce00e2ac30c 100644 (file)
@@ -10,7 +10,7 @@ set -ex -o pipefail
 # https://github.com/dfarrell07/puppet-opendaylight/blob/master/Vagrantfile
 
 # Update Int/Pack's puppet-opendaylight submodule to latest master
-pushd $WORKSPACE/packaging
+pushd "$WORKSPACE/packaging"
 git submodule init
 git submodule update --remote
 
@@ -22,7 +22,8 @@ sudo yum install -y ruby-devel gcc-c++ zlib-devel patch redhat-rpm-config make r
 gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
 curl -L get.rvm.io | bash -s stable
 # Expected by RVM, seems required to make RVM functions (`rvm use`) available
-source $HOME/.rvm/scripts/rvm
+# shellcheck disable=SC1090
+source "$HOME/.rvm/scripts/rvm"
 rvm install 2.4.0
 ruby --version
 # This has to be done as a login shell to get rvm fns
@@ -33,8 +34,8 @@ ruby --version
 
 # Install gems dependencies of puppet-opendaylight via Bundler
 gem install bundler
-echo export PATH=\\$PATH:/usr/local/bin >> $HOME/.bashrc
-pushd $WORKSPACE/packaging/puppet/puppet-opendaylight
+echo export PATH="\\$PATH:/usr/local/bin" >> "$HOME/.bashrc"
+pushd "$WORKSPACE/packaging/puppet/puppet-opendaylight"
 bundle install
 bundle update