jenkins - 如何从 Jenkins 克隆到的 GitHub 目录运行命令?
问题描述
我按照此处的教程https://github.com/jbankes/Hello_Jenkins将“make”放入 Jenkins 的 Execute Shell 中,但 Jenkins 不会从底层 Github 存储库运行 make,如下面的错误消息所示。
要求 Jenkins 从其受监控的 GitHub 存储库运行“make”的正确方法是什么?
Running as SYSTEM
Building in workspace /var/jenkins_home/workspace/test003
The recommended git tool is: NONE
No credentials specified
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://github.com/zhoulaifu/Hello_Jenkins # timeout=10
Fetching upstream changes from https://github.com/zhoulaifu/Hello_Jenkins
> git --version # timeout=10
> git --version # 'git version 2.20.1'
> git fetch --tags --force --progress -- https://github.com/zhoulaifu/Hello_Jenkins +refs/heads/*:refs/remotes/origin/* # timeout=10
> git rev-parse refs/remotes/origin/master^{commit} # timeout=10
Checking out Revision bc3931a313e4f3945c257ae3247e63265b1debb7 (refs/remotes/origin/master)
> git config core.sparsecheckout # timeout=10
> git checkout -f bc3931a313e4f3945c257ae3247e63265b1debb7 # timeout=10
Commit message: "Otherside (#5)"
> git rev-list --no-walk bc3931a313e4f3945c257ae3247e63265b1debb7 # timeout=10
[test003] $ /bin/sh -xe /tmp/jenkins2704537311990415428.sh
+ make
make: *** No targets specified and no makefile found. Stop.
Build step 'Execute shell' marked build as failure
Finished: FAILURE
解决方案
在位于文件夹内的存储库 文件中。因此,为了能够运行,您需要导航到它。Make
original
Make
执行后再git clone
运行。cd original/
Make
推荐阅读
- scala - 加快geomesa查询
- javascript - Js,循环正在工作 - 工作稀疏
- apache-spark - 用于时间序列的机器学习算法,例如 pyspark 中的股票市场预测
- javascript - EchartsJS - 有没有办法/解决方法来监听“传奇”组件上的鼠标事件?
- android - 中心 5 个项目以线性布局包装
- swift - How do you close card view in iOS 13 by sliding it down
- javascript - 复制网站以在不使用 JavaScript 的情况下进行离线查看(html 和 .js 外部的脚本标签)
- c# - Serilog show the property name in the output
- c++ - 添加 libcurl 虚幻引擎 4
- scala - 为什么在没有场景注入的情况下,Gatling 仍然发送请求?