今天在创建Jenkins流水线中碰到个问题,使用generic-webhook
添加到Gitlab中以实现提交触发webhook自动运行Jenkins Job、创建Gitlab webhooks 进行 Push enents 却报错找不到 jobs,具体报错信息如下:
Hook executed successfully but returned HTTP 404 {"jobs":null,"message":"Did not find any jobs with Generic Trigger configured! If you are using a token, you need to pass it like ...trigger/invoke?token=TOKENHERE. If you are not using a token, you need to authenticate like http://user:password@example.org/generic-webhook... "}
- 最终解决:
把Jenkins Pipline以及generic-webhook的配置都翻了个遍,最后发现是命名上有问题demo-maven-service_PUSH
这个名字中使用了下滑线、修改后解决问题。
Jenkins老版本可以测试成功,Jenkins 2.3版本就一定要注意这个命名的问题。
最新评论
密码:blog.sirliu.com
本内容密码:blog.sirliu.com 最新整理的文章在这里喔:https://blog.sirliu.com/2018/11/shell_lian_xi_ti.html