Execute the shell script with Jenkins and execute a command:
2
Tips:
[ADB] $/bin/sh-xe/users/xxxxx/tools/apache-tomcat-8.5.30/temp/jenkins8525959692743554347.sh+ adb shell input KeyEvent 26/users/xxxxx/tools/apache-tomcat-8.5.30/temp/jenkins8525959692743554347.sh:line 4:adb:command not Foundbuild Step ' execute shell ' marked build as Failurefinished:failure
Cause: Executing an environment variable in the Jenkins shell that does not load/etc/profile . bash_profile
You need to add a statement in front of the shell command:
#!/bin/bash-Il
#!/bin/bash-
This will enable the command to be executed normally.
[ADB] $/bin/bash-il/users/xxxx/tools/apache-tomcat-8.5.30/temp/jenkins3562542453282352376.shbash:no job control in This shellrestored session:2018 May 4 Friday 15:12 55 seconds cstsaving session......saving history......completed. Finished:success
Jenkins execution shell command prompt cannot find the command resolution