简体   繁体   English

Github Pull Request插件

[英]Github Pull Request Plugin

I'm trying to setup the pull request plugin. 我正在尝试设置拉请求插件。 I've configured it as suggested in the documentation but if I specify the branch to build as ${sha1} then that variable doesn't seem to be resolved. 我按照文档中的建议配置了它,但如果我指定要构建为$ {sha1}的分支,则该变量似乎无法解析。 So in my logs: 所以在我的日志中:

Building in workspace /Users/sat/.jenkins/jobs/JenkinsTest/workspace
> /usr/local/bin/git rev-parse --is-inside-work-tree
Fetching changes from the remote Git repository
> /usr/local/bin/git config remote.origin.url git@githubenterprise.parc.com:stucker/tester.git
Fetching upstream changes from git@githubenterprise.parc.com:stucker/tester.git
> /usr/local/bin/git --version
> /usr/local/bin/git fetch --tags --progress git@githubenterprise.parc.com:stucker/tester.git   +refs/pull/*:refs/remotes/origin/pr/*
> /usr/local/bin/git rev-parse origin/${sha1}^{commit}
> /usr/local/bin/git rev-parse ${sha1}^{commit}

But I don't know why that wouldn't work. 但我不知道为什么那不起作用。 This is coming off of a push triggered by the standard web hook 这是由标准Web钩引发的推动

I found that you can't run the regular build hook and the pull request on the same job - I had to have separate jobs - one for doing a regular build, and one for doing a pull request build. 我发现你不能在同一个工作上运行常规构建钩子和拉取请求 - 我必须有单独的工作 - 一个用于进行常规构建,一个用于执行拉取请求构建。 With that everything works fine. 一切正常。

If you get 如果你得到

Failed to rev-parse: origin/${sha1}
No candidate revisions

, it could be related to issue 5 . ,它可能与问题5有关

A couple of suggestions: 一些建议:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM