Skip to content

Commit 7d8e184

Browse files
committed
build-and-test.sh: handle non-interactive environments gracefully.
Previously, the first docker run would fail with a short error message: the input device is not a TTY Now, if we are running in an automated environment like Jenkins or Circle CI the interactive option is removed. It is still available, just in case there is sometimes a reason to run the build interactively. Signed-off-by: Jon Seymour <jon@wildducktheories.com>
1 parent 6b1454a commit 7d8e184

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

build-and-test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
set -e
33
VERSION=$(cat VERSION)
44

5+
INTERACTIVE=$(if test -t 0; then echo -i; fi)
56
docker build . -t developmentseed/geolambda:${VERSION}
6-
docker run --rm -v $PWD:/home/geolambda -it developmentseed/geolambda:${VERSION} package.sh
7+
docker run --rm -v $PWD:/home/geolambda ${INTERACTIVE} -t developmentseed/geolambda:${VERSION} package.sh
78

89
cd python
910
docker build . --build-arg VERSION=${VERSION} -t developmentseed/geolambda:${VERSION}-python

0 commit comments

Comments
 (0)