标签:profile png apache col -o workspace nod ash div
出现的问题:
+ rsync -avzP /mnt/workspace/df-admin/ root@192.168.0.153:/home/deploy/deep_fashion_targets/web /tmp/jenkins5788277461826608.sh: line 2: rsync: command not found Build step ‘Execute shell‘ marked build as failure Finished: FAILURE
构建是执行shell echo $PATH 发现常规的PATH 没有输出 :
/var/lib/jenkins/tools/hudson.model.JDK/jdk1.8/bin:/var/lib/jenkins/tools/hudson.model.JDK/jdk1.8/bin:/usr/local/sbin:/usr/sbin:/usr/java/jdk1.8//bin:/usr/local/apache-maven-3.5.3/bin:/usr/java/jdk1.8//bin:/usr/local/apache-maven-3.5.3/bin
在环境变量 /etc/profile 里面 修改 PATH 路径
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:$JAVA_HOME/bin:$M2_HOME/bin
再在构建中执行shell echo $PATH , 有相应的输出
++ PATH=/home/nodeDev/node-v8/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/mysql/bin
在构建的shell 前添加 #!/bin/bash -il 可正常执行
jenkins构建执行shell 所有命令出现command not found
标签:profile png apache col -o workspace nod ash div
原文地址:https://www.cnblogs.com/weifeng1463/p/9419358.html