Abort execution if there is any error running scripts
This commit is contained in:
parent
3cb886c497
commit
be0fdc620f
5 changed files with 22 additions and 14 deletions
|
@ -14,6 +14,9 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
source $DIR/common.sh
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
|
||||
if ! [ -z $DEBUG ]; then
|
||||
set -x
|
||||
fi
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
if [ "$COMPONENT" == "docs" ]; then
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
FROM alpine:3.7
|
||||
|
||||
RUN apk update && apk add --no-cache \
|
||||
bash \
|
||||
git \
|
||||
git-fast-import \
|
||||
openssh \
|
||||
|
@ -34,6 +35,6 @@ WORKDIR /docs
|
|||
|
||||
EXPOSE 3000
|
||||
|
||||
ENTRYPOINT ["mkdocs"]
|
||||
COPY entrypoint.sh /
|
||||
|
||||
CMD ["serve", "--dev-addr=0.0.0.0:3000", "--livereload"]
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright 2017 The Kubernetes Authors.
|
||||
# Copyright 2018 The Kubernetes Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
@ -14,17 +14,15 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
|
||||
source $DIR/common.sh
|
||||
CMD=$1
|
||||
|
||||
IMAGE=$(make -s -C $DIR/../images/nginx image-info)
|
||||
|
||||
if docker_tag_exists "kubernetes-ingress-controller/nginx" $(echo $IMAGE | jq .tag) "$ARCH"; then
|
||||
echo "Image already published"
|
||||
exit 0
|
||||
if [ "$CMD" == "build" ];
|
||||
then
|
||||
mkdocs build
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
echo "building nginx-$ARCH image..."
|
||||
make -C $DIR/../images/nginx sub-container-$ARCH
|
||||
make -C $DIR/../images/nginx sub-push-$ARCH
|
||||
mkdocs serve --dev-addr=0.0.0.0:3000 --livereload
|
Loading…
Reference in a new issue