现在我正在使用jenkins管道构建my project。但是现在jenkins文件不在我的项目根路径中,所以我在jenkins配置仪表板中指定了${WORKSPACE}/dolphin-post/Jenkinsfile的路径。但是现在日志告诉我找不到Jenkinsfile,这是我的日志输出:
SuccessScan Repository Log
Started
[Sat Sep 19 14:26:03 UTC 2020] Starting branch indexing...
14:26:03 Connecting to https://api.github.com with no credentials, anonymous access
14:26:04 Jenkins-Imposed API Limiter: Current quota for Github API usage has 59 remaining (6 under budget). Next quota of 60 in 59 min
Examining jiangxiaoqiang/retire
Checking branches...
14:26:04 Jenkins-Imposed API Limiter: Current quota for Github API usage has 59 remaining (6 under budget). Next quota of 60 in 59 min
Getting remote branches...
Checking branch master
14:26:05 Jenkins-Imposed API Limiter: Current quota for Github API usage has 59 remaining (6 under budget). Next quota of 60 in 59 min
Getting remote pull requests...
‘${WORKSPACE}/dolphin-post/Jenkinsfile’ not found
Does not meet criteria
14:26:07 Jenkins-Imposed API Limiter: Current quota for Github API usage has 59 remaining (6 under budget). Next quota of 60 in 59 min
1 branches were processed
Checking pull-requests...
0 pull requests were processed
Finished examining jiangxiaoqiang/retire
[Sat Sep 19 14:26:07 UTC 2020] Finished branch indexing. Indexing took 3.9 sec
Finished: SUCCESS我该怎么做才能让它工作呢?我也尝试这样写Jenkinsfile路径:./dolphin-post/Jenkinsfile,仍然不能工作。
发布于 2020-09-19 23:08:39
顾名思义,存储库扫描就是扫描您的GitHub存储库,并在您配置的路径中查找Jenkinsfile配置。
因此,如果您的Jenkinsfile驻留在dolphin-post/Jenkinsfile上,这是您需要配置的路径。不需要WORKSPACE,因为它会扫描您的GitHub存储库。
https://stackoverflow.com/questions/63969888
复制相似问题