bryancall commented on code in PR #474:
URL: https://github.com/apache/trafficserver-ci/pull/474#discussion_r4285366071


##########
jenkins/branch/rat.pipeline:
##########
@@ -49,11 +49,11 @@ pipeline {
                                                        retry(3) {
                                                                
checkout([$class: 'GitSCM',
                                                                        
branches: [[name: branch]],
-                                                                       
userRemoteConfigs: [[url: env.GITHUB_URL]],
+                                                                       
userRemoteConfigs: [[url: env.GITHUB_URL, refspec: 
"+refs/heads/${env.GITHUB_BRANCH}:refs/remotes/origin/${env.GITHUB_BRANCH}"]],

Review Comment:
   The two come from the same input. `branch` is either `*/${GITHUB_BRANCH}`, 
which matches the fetched ref, or a manually set `SHA1`. A SHA now has to be on 
`GITHUB_BRANCH`, since only that branch is fetched. #476 adds a comment saying 
so at each checkout.



##########
jenkins/branch/rat.pipeline:
##########
@@ -49,11 +49,11 @@ pipeline {
                                                        retry(3) {
                                                                
checkout([$class: 'GitSCM',
                                                                        
branches: [[name: branch]],
-                                                                       
userRemoteConfigs: [[url: env.GITHUB_URL]],
+                                                                       
userRemoteConfigs: [[url: env.GITHUB_URL, refspec: 
"+refs/heads/${env.GITHUB_BRANCH}:refs/remotes/origin/${env.GITHUB_BRANCH}"]],

Review Comment:
   No change needed. With no `name` in `userRemoteConfigs`, the git plugin 
names the remote `origin`, so the refspec destination matches the remote the 
plugin sets up.



##########
jenkins/branch/rat.pipeline:
##########
@@ -49,11 +49,11 @@ pipeline {
                                                        retry(3) {
                                                                
checkout([$class: 'GitSCM',
                                                                        
branches: [[name: branch]],
-                                                                       
userRemoteConfigs: [[url: env.GITHUB_URL]],
+                                                                       
userRemoteConfigs: [[url: env.GITHUB_URL, refspec: 
"+refs/heads/${env.GITHUB_BRANCH}:refs/remotes/origin/${env.GITHUB_BRANCH}"]],
                                                                        // 
Branch builds normally checkout the current branch tip. If a manually
                                                                        // 
requested SHA is older than this shallow depth, checkout should fail fast
                                                                        // 
instead of falling back to a large full-history fetch.

Review Comment:
   Done in #476, which adds this line to the comment at each branch checkout: 
"Only this branch is fetched, so a requested SHA must also be on it."



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to