Merge "Ignore errors during stackviz build"

This commit is contained in:
Jenkins
2016-07-06 16:12:29 +00:00
committed by Gerrit Code Review

View File

@@ -15,18 +15,25 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# dib-lint: disable=setu setpipefail # dib-lint: disable=setu setpipefail sete
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x set -x
fi fi
set -e
STACKVIZ_NPM_TIMEOUT="15m"
STACKVIZ_DIR=/opt/stackviz STACKVIZ_DIR=/opt/stackviz
cp -r /opt/git/openstack/stackviz $STACKVIZ_DIR cp -r /opt/git/openstack/stackviz $STACKVIZ_DIR
cd $STACKVIZ_DIR cd $STACKVIZ_DIR
npm install timeout $STACKVIZ_NPM_TIMEOUT npm install
npm run prod ret=$?
rm -rf node_modules/ if [[ $ret -eq 0 ]]; then
npm run prod && rm -rf node_modules/
else
echo "stackviz build aborted due to npm error"
rm -rf $STACKVIZ_DIR
fi
exit 0