推送到 GitLab 仓库不会触发 Jenkins 构建
Pushing to GitLab repo does not trigger the Jenkins build
gitlab插件版本:1.4.2
詹金斯版本:2.7.4
gitlab版本:GitLab社区版8.11.4
我已经遵循插件文档并相应地设置了 webhook
(https://github.com/jenkinsci/gitlab-plugin).
在jenkins job中添加了gitlab repo,连接测试成功。
手动构建 jenkins job 也成功了(代码取自
来自 repo 正确所以没有问题)
为 jenkins 添加了 webhook。测试 webhook 也成功
(returns HTTP200)。但是在詹金斯这边。什么都没有发生
即使在更改后执行测试的结果
回购(jenkins 日志和 gitlab 插件日志显示没有 activity)
- 当我尝试测试整个设置时。我对 gitlab 进行了新的推送
回购看看它是否触发了詹金斯的新构建。但没什么
发生。有人可以帮我解决这个问题吗?我不确定是什么
此处错误,因为测试挂钩和测试 gitlab 连接均显示
成功。
提前谢谢你。
天真
在 Jenkins 中安装和配置(全局和作业)Gitlab Hook Plugin
在你的 webhook 中你能做这个吗:
URL : http://your-jenkins-server/gitlab/notify_commit or http://your-jenkins-server/gitlab/build_now.
触发器:你检查推送事件
再试一次
要触发特定作业,URL 是:
http://your-jenkins-server/gitlab/build_now/job_name
job_name是jenkins中创建的job的名字
我按照此处的说明操作,一切正常:https://github.com/jenkinsci/gitlab-plugin/wiki/Setup-Example。可以将 jenkins 作业的结果返回给 GitLab 管道。
您还可以使用 jenkins 管道推回结果:
node {
gitlabBuilds(builds: ['Build', 'Test', 'QA']) {
stage('Build') {
gitlabCommitStatus(name: 'Build') {
sh "your execution"
}
}
// The rest of the stages here...
}
}
gitlab插件版本:1.4.2
詹金斯版本:2.7.4
gitlab版本:GitLab社区版8.11.4
我已经遵循插件文档并相应地设置了 webhook
(https://github.com/jenkinsci/gitlab-plugin).
在jenkins job中添加了gitlab repo,连接测试成功。 手动构建 jenkins job 也成功了(代码取自 来自 repo 正确所以没有问题)
为 jenkins 添加了 webhook。测试 webhook 也成功 (returns HTTP200)。但是在詹金斯这边。什么都没有发生 即使在更改后执行测试的结果 回购(jenkins 日志和 gitlab 插件日志显示没有 activity)
- 当我尝试测试整个设置时。我对 gitlab 进行了新的推送 回购看看它是否触发了詹金斯的新构建。但没什么 发生。有人可以帮我解决这个问题吗?我不确定是什么 此处错误,因为测试挂钩和测试 gitlab 连接均显示 成功。
提前谢谢你。
天真
在 Jenkins 中安装和配置(全局和作业)Gitlab Hook Plugin
在你的 webhook 中你能做这个吗:
URL : http://your-jenkins-server/gitlab/notify_commit or http://your-jenkins-server/gitlab/build_now.
触发器:你检查推送事件
再试一次
要触发特定作业,URL 是: http://your-jenkins-server/gitlab/build_now/job_name
job_name是jenkins中创建的job的名字
我按照此处的说明操作,一切正常:https://github.com/jenkinsci/gitlab-plugin/wiki/Setup-Example。可以将 jenkins 作业的结果返回给 GitLab 管道。
您还可以使用 jenkins 管道推回结果:
node {
gitlabBuilds(builds: ['Build', 'Test', 'QA']) {
stage('Build') {
gitlabCommitStatus(name: 'Build') {
sh "your execution"
}
}
// The rest of the stages here...
}
}