Problems that arise:
+ rsync-avzp/mnt/workspace/df-admin/[Email protected]:/home/deploy/deep_fashion_targets/web/tmp/ Jenkins5788277461826608.sh:line 2:rsync:command not foundbuild step ' Execute shell ' marked build as Failurefinished:fa Ilure
Build is execute shell Echo $PATH find the normal PATH without output:
/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
Modify path path in environment variable/etc/profile
Export Path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin: $JAVA _home/bin: $M 2_home/bin
Then execute the shell Echo $PATH in the build, with the corresponding output
+ + Path=/home/nodedev/node-v8/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/mysql/bin
Add #!/bin/bash-il before the shell is built
Jenkins build execution Shell All commands appear command not found