Jenkins build execution Shell All commands appear command not found

Source: Internet
Author: User
Tags rsync

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.