我在设置Jenkins以触发GitHub推送的构建时遇到了麻烦。这是我的Jenkins工作的配置(这里的构建仅用于测试目的的touch /tmp/JENKINS_WORKS
):
<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description><!-- Managed by Jenkins Job Builder --></description>
<keepDependencies>false</keepDependencies>
<properties>
<com.coravy.hudson.plugins.github.GithubProjectProperty plugin="[email protected]">
<projectUrl>https://github.com/Mean-Street/cloud_native_app/</projectUrl>
<displayName></displayName>
</com.coravy.hudson.plugins.github.GithubProjectProperty>
</properties>
<scm class="hudson.plugins.git.GitSCM" plugin="[email protected]">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<url>https://github.com/Mean-Street/cloud_native_app.git</url>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
<hudson.plugins.git.BranchSpec>
<name>**</name>
</hudson.plugins.git.BranchSpec>
</branches>
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
<submoduleCfg class="list"/>
<extensions/>
</scm>
<canRoam>true</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers>
<com.cloudbees.jenkins.GitHubPushTrigger plugin="[email protected]">
<spec></spec>
</com.cloudbees.jenkins.GitHubPushTrigger>
</triggers>
<concurrentBuild>false</concurrentBuild>
<builders>
<hudson.tasks.Shell>
<command>touch /tmp/JENKINS_WORKS</command>
</hudson.tasks.Shell>
</builders>
<publishers/>
<buildWrappers/>
</project>
我在GitHub上配置了webhook,正如我在GitHub上看到Jenkins回答200 OK
一样正常。但Jenkins没有触发这个版本,所以我猜这是一个Jenkins配置问题。什么可能是问题的任何想法?
由于回购是公开的,我认为我不需要给Jenkins任何凭据来访问它,是吗?
提前感谢您的任何帮助或建议。
这是一个jenkins Github插件问题。 https://issues.jenkins-ci.org/browse/JENKINS-49332
我有这个问题,1.0.29降级到1.0.27应该解决你的问题。