詹金斯构建错误

dex*_*ous 10 linux jenkins

我正在尝试设置构建命令,我收到这些错误.我尝试过设置安全配置.

访问控制:

  • Jenkins拥有用户数据库.
  • 允许用户注册.

授权:基于矩阵.

用户组:joshis1 - 全部检查.

运行构建后.我得到以下错误.在构建脚本中,我只是想复制一个文件.

FailedConsole输出

Started by user shreyas joshi
Building in workspace /var/lib/jenkins/workspace/Tungsten-Build
[Tungsten-Build] $ /bin/sh /tmp/hudson1841543545003586844.sh
November26
November26
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
Build step 'Execute shell' marked build as failure
Finished: FAILURE
Run Code Online (Sandbox Code Playgroud)

dex*_*ous 15

我得到了这个答案.

visudo
Run Code Online (Sandbox Code Playgroud)

添加以下行:

<jenkins_user_id that u are using> ALL=(ALL)       NOPASSWD: ALL
Run Code Online (Sandbox Code Playgroud)

评论此行:

#Defaults    requiretty
Run Code Online (Sandbox Code Playgroud)