[JIRA] (JENKINS-59210) Build exactly the commit from the webhook

11 views
Skip to first unread message

mark.earl.waite@gmail.com (JIRA)

unread,
Sep 3, 2019, 10:05:02 PM9/3/19
to jenkinsc...@googlegroups.com
Mark Waite updated an issue
 
Jenkins / Bug JENKINS-59210
Build exactly the commit from the webhook
Change By: Mark Waite
Summary: Extract Build exactly the commit SHA of Jenkinsfile from the webhook
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

varsho@yahoo.com (JIRA)

unread,
Sep 4, 2019, 2:09:02 PM9/4/19
to jenkinsc...@googlegroups.com
Oleg Varshavsky commented on Bug JENKINS-59210
 
Re: Build exactly the commit from the webhook

Hi Mark,

In a freestyle Jenkins job this is not an issue, because once the webhook fires of, it checks out the code, which is then ready to be built. However, with a Pipeline job, it is a two step process. It first checks out the Jenkinsfile, then uses it to execute the checkout stage, if defined. 

mark.earl.waite@gmail.com (JIRA)

unread,
Sep 4, 2019, 5:23:02 PM9/4/19
to jenkinsc...@googlegroups.com

As far as I understand it, the Pipeline code strives to assure that the same SHA1 that is used to checkout the Jenkinsfile is also used to checkout the repository for the build. I remember testing in some detail that it was behaving as expected a few years ago. I've not performed those detailed tests recently, but I'm not aware of any known cases where the SHA1 that reads the Jenkinsfile is different from the SHA1 of the checkout step.

Are you certain that the SHA1 of the Jenkinsfile is different than the SHA1 of the repository in the workspace?

Can you provide a set of steps that confirm the SHA1 of the Jenkinsfile is different than the SHA1 of the repository in the workspace?

varsho@yahoo.com (JIRA)

unread,
Sep 4, 2019, 8:32:02 PM9/4/19
to jenkinsc...@googlegroups.com
Oleg Varshavsky updated an issue
 
Change By: Oleg Varshavsky
Attachment: Screen Shot 2019-09-04 at 5.24.18 PM.png

varsho@yahoo.com (JIRA)

unread,
Sep 4, 2019, 8:38:02 PM9/4/19
to jenkinsc...@googlegroups.com
Oleg Varshavsky commented on Bug JENKINS-59210
 
Re: Build exactly the commit from the webhook

Hi Mark,

I have attached a screen shot of the Jenkins log, indicating that the SHA of the Jenkinsfile is different from the SHA of the checkout step. That happened because the build was triggered by a commit from Dev-1 (reflected by the first SHA in the screen shot), but within one second, Dev-2 committed their change (reflected by the second SHA in the screen shot).

varsho@yahoo.com (JIRA)

unread,
Nov 6, 2019, 2:18:03 PM11/6/19
to jenkinsc...@googlegroups.com

Any updates on this? I am sure other people facing similar issues.

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

mark.earl.waite@gmail.com (JIRA)

unread,
Nov 6, 2019, 2:29:02 PM11/6/19
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages