Jenkis Error - Build step 'Execute shell' marked build as failure

젠키스에서 shell을 이용하여 spark submit을 하는데 에러가 발생하였다.

shell 최상단에 다음과 -li 옵션을 추가하여 해결하였다.

 #!/bin/bash -li

-i

Force the shell to run interactively. Interactive shells are described in Interactive Shells.

-l

Make this shell act as if it had been directly invoked by login. When the shell is interactive, this is equivalent to starting a login shell with ‘exec -l bash’. When the shell is not interactive, the login shell startup files will be executed. ‘exec bash -l’ or ‘exec bash --login’ will replace the current shell with a Bash login shell. See Bash Startup Files, for a description of the special behavior of a login shell.




- Reference

Invoking Bash - https://www.gnu.org/software/bash/manual/html_node/Invoking-Bash.html

+ Recent posts