mirror of https://github.com/codevalet/canary
Avoid ascking for a tty in Jenkins Pipeline
This commit is contained in:
parent
a35fc3530f
commit
4c286eadf9
|
@ -1,6 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
exec docker run --rm -ti \
|
||||
# If we're executing from a normal shell, allow input. If we're in a
|
||||
# subprocess, like under Jenkins Pipeline, don't allow it
|
||||
tty --quiet
|
||||
if [ $? -eq 0 ]; then
|
||||
TTY_ARGS="-ti"
|
||||
fi;
|
||||
|
||||
exec docker run --rm ${TTY_ARGS} \
|
||||
-u $(id -u):$(id -g) \
|
||||
-w ${PWD} \
|
||||
-v ${PWD}:${PWD} \
|
||||
|
|
Loading…
Reference in New Issue