Jenkins轮询没有检测到Github中的提交

时间:2018-05-18 09:01:16

标签: git jenkins github jenkins-plugins polling

我目前正在Jenkins中使用“Poll SCM”选项,轮询频率设置为1分钟。我的目标是在轮询检测到Github中的提交时触发构建作业。但是,尽管多次提交“功能”分支,但轮询不会检测到提交。它会不断显示与此类似的消息:

Started on May 18, 2018 4:51:00 PM
Using strategy: Default
[poll] Last Built Revision: Revision 
ecf20b8hhh2f3d63b5809mle268024500364f2fb 
(refs/remotes/origin/feature/template-api)
> /usr/bin/git --version # timeout=10
using GIT_ASKPASS to set credentials 
Setting http proxy: surf.proxy.company:80
> /usr/bin/git ls-remote -h https://github.developer.company.com/my- 
project.git # timeout=10
Found 3 remote heads on https://github.developer.company.com/my-project.git
Done. Took 3.7 sec
No changes

我的管道脚本如下:

node {
   stage('Preparation') {
      git (
          poll: true,
          branch: 'feature/template-api',
          credentialsId: '8u56qwcf-e74e-44z3-9437-c81b19cd3a29',
          url: 'https://github.developer.company.com/my-project.git'
      )
   }
}

在我的Jenkins配置中,我只选择了“轮询SCM”。如何在Github中检测更改并触发构建过程?

1 个答案:

答案 0 :(得分:0)

我怀疑您希望您的分支机构名称为VOID func1 (UINT1 *p_u1RadiusReceivedPacket, UINT1 *p_u1Secret, UINT1 a_u1Concatenated[], INT4 *i4_Length) { INT4 i4_seclen = 0; UINT2 u2_pktlen = 0; UINT1 a_u1RequestAuth[LEN_REQ_AUTH_AUTH] = {}; INT4 index = 0; if (p_u1RadiusReceivedPacket == NULL) { return; } #if 0 // this part of code, when included, comes under dead code saying the if condition inside this for loop will never be stru and hence will never get hit. Hence commented out this code using "#if 0". When this code was added, the abouve NULL check is removed. for (index = 0; index < (PKT_LEN+2); index++) { if(!(p_u1RadiusReceivedPacket + index)) { return; } } #endif MEMSET (a_u1Concatenated, 0, LEN_RX_PKT + LEN_SECRET); MEMCPY (&u2_pktlen, p_u1RadiusReceivedPacket + PKT_LEN, 2); /* Validate the packet length to avoid buffer overflow, denial of service, * memory corruption, or other security vulnerability. */ if ((u2_pktlen < 20) || (u2_pktlen > 4096)) { return; } u2_pktlen = OSIX_NTOHS (u2_pktlen); // this part of code says , "Performing a byte swapping operation on {0} implies that it came from an external source, and is therefore tainted.". Also says, "Assigning: {0} = {1}. Both are now tainted.}{{code{u2_pktlen}}}{{code{(UINT2)(((u2_pktlen &amp; 0xff00) &gt;&gt; 8) | ((u2_pktlen &amp; 0xff) &lt;&lt; 8))}}} MEMCPY (a_u1Concatenated, p_u1RadiusReceivedPacket, u2_pktlen); // This part of code says, "Passing tainted variable {0} to a tainted sink.}{{code{(size_t)u2_pktlen}}}" ==> eventSetCaption is "Tainted data flows to untainted sink". MEMCPY (a_u1RequestAuth, p_u1RadiusReceivedPacket + PKT_REQA, LEN_REQ_AUTH_AUTH); MEMCPY (a_u1Concatenated + PKT_REQA, a_u1RequestAuth, LEN_REQ_AUTH_AUTH); i4_seclen = STRLEN ((char *) p_u1Secret); MEMCPY (a_u1Concatenated + u2_pktlen, p_u1Secret, i4_seclen); *i4_Length = u2_pktlen + i4_seclen; }