相关文章推荐
微醺的香烟  ·  官宣!我们和长城汽车在一起了-阿里云开发者社区·  1 年前    · 
安静的松树  ·  Qt应用程序如何监测另一个程序状态?(win ...·  1 年前    · 
Code  ›  Jenkins Pipeline在触发远程作业时失败,并启用了选项"Block Build is“开发者社区
remote localhost jenkins
https://cloud.tencent.com/developer/ask/sof/1122321
潇洒的牙膏
2 年前
首页
学习
活动
专区
工具
TVP 最新优惠活动
返回腾讯云官网
提问
问 Jenkins Pipeline在触发远程作业时失败,并启用了选项"Block Build is“
Stack Overflow用户
提问于 2019-04-25 17:56:55
EN

我创建了一个管道,它应该在不同的Jenkinsserver上触发一个作业。我使用远程触发器插件,并且能够使用以下语句触发Job (目前这是我的管道中唯一的语句):

triggerRemoteJob enhancedLogging: true, job: 'myJob', maxConn: 1,     remoteJenkinsName: 'MyJenkins'

但是,在Job被触发之后,管道尝试连接运行在localhost上的作业中的作业,这显然是失败的。

我试着禁用了一些选项,发现如果我禁用了blockBuildUntilComplete,它就可以工作了。

在启用了选项的情况下,我从日志中获得了以下内容:

##############################################################################    ##################################
  Parameterized Remote Trigger Configuration:
    - job:                     myJob 
    - remoteJenkinsName:       myJenkins
    - parameters:              
    - blockBuildUntilComplete: true
    - connectionRetryLimit:    5
################################################################################################################
Triggering non-parameterized remote job 'http://x.x.x.x:8080/job/myJob'
  Using globally defined 'Credentials Authentication' as user 'myUser' (Credentials ID 'myCredentials')
Triggering remote job now.
CSRF protection is disabled on the remote server.
  Remote job queue number: 47
Remote build started!
  Remote build URL: http://localhost:8080/job/myJob /8/
  Remote build number: 8
Blocking local job until remote job completes.
calling remote without locking...
Connection to remote server failed , waiting for to retry - 10 seconds until next attempt. URL: http://localhost:8080/job/myJob /8/api/json/, parameters: 
Retry attempt #1 out of 5
Connection to remote server failed , waiting for to retry - 10 seconds until next attempt. URL: http://localhost:8080/job/myJob /8/api/json/, parameters: 
Retry attempt #2 out of 5
Connection to remote server failed , waiting for to retry - 10 seconds until next attempt. URL: http://localhost:8080/job/myJob /8/api/json/, parameters: 
Retry attempt #3 out of 5
Connection to remote server failed , waiting for to retry - 10 seconds until next attempt. URL: http://localhost:8080/job/myJob /8/api/json/, parameters: 
Retry attempt #4 out of 5
 
推荐文章
微醺的香烟  ·  官宣!我们和长城汽车在一起了-阿里云开发者社区
1 年前
安静的松树  ·  Qt应用程序如何监测另一个程序状态?(windows系统)_qt中两个控制台程序相互启动监听-CSDN博客
1 年前
今天看啥   ·   Py中国   ·   codingpro   ·   小百科   ·   link之家   ·   卧龙AI搜索
删除内容请联系邮箱 2879853325@qq.com
Code - 代码工具平台
© 2024 ~ 沪ICP备11025650号