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
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
source $DIR/common.sh
|
source $DIR/common.sh
|
||||||
|
|
|
@ -14,6 +14,9 @@
|
||||||
# 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.
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
if ! [ -z $DEBUG ]; then
|
if ! [ -z $DEBUG ]; then
|
||||||
set -x
|
set -x
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -14,6 +14,9 @@
|
||||||
# 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.
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
if [ "$COMPONENT" == "docs" ]; then
|
if [ "$COMPONENT" == "docs" ]; then
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
FROM alpine:3.7
|
FROM alpine:3.7
|
||||||
|
|
||||||
RUN apk update && apk add --no-cache \
|
RUN apk update && apk add --no-cache \
|
||||||
|
bash \
|
||||||
git \
|
git \
|
||||||
git-fast-import \
|
git-fast-import \
|
||||||
openssh \
|
openssh \
|
||||||
|
@ -34,6 +35,6 @@ WORKDIR /docs
|
||||||
|
|
||||||
EXPOSE 3000
|
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");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with 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
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# 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 [ "$CMD" == "build" ];
|
||||||
|
then
|
||||||
if docker_tag_exists "kubernetes-ingress-controller/nginx" $(echo $IMAGE | jq .tag) "$ARCH"; then
|
mkdocs build
|
||||||
echo "Image already published"
|
exit 0;
|
||||||
exit 0
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "building nginx-$ARCH image..."
|
mkdocs serve --dev-addr=0.0.0.0:3000 --livereload
|
||||||
make -C $DIR/../images/nginx sub-container-$ARCH
|
|
||||||
make -C $DIR/../images/nginx sub-push-$ARCH
|
|
Loading…
Reference in a new issue