[Asterisk-code-review] CI: Remove duplicate checkout (asterisk[13])

George Joseph asteriskteam at digium.com
Thu Jul 12 17:00:46 CDT 2018


George Joseph has submitted this change and it was merged. ( https://gerrit.asterisk.org/9416 )

Change subject: CI: Remove duplicate checkout
......................................................................

CI: Remove duplicate checkout

Change-Id: If5f925b4c4ed7000b153f3ed8386ce2140c886f8
---
M tests/CI/gates.jenkinsfile
1 file changed, 14 insertions(+), 16 deletions(-)

Approvals:
  Jenkins2: Verified
  George Joseph: Looks good to me, approved; Approved for Submit



diff --git a/tests/CI/gates.jenkinsfile b/tests/CI/gates.jenkinsfile
index 6f489a7..30b534a 100644
--- a/tests/CI/gates.jenkinsfile
+++ b/tests/CI/gates.jenkinsfile
@@ -42,6 +42,10 @@
 				onUnstable: false
 			]
 	}
+	options {
+	  skipDefaultCheckout true
+	}
+	
 	agent {
 		/* All of the stages need to be performed on a docker host */
 		label "swdev-docker"
@@ -63,12 +67,6 @@
 						sh "sudo chown -R jenkins:users ."  
 					
 						/*
-						 * Jenkins has already automatically checked out the base branch
-						 * for this change but we now need to check out the change itself
-						 * and rebase it on the current base branch.  If the rebase fails,
-						 * that's an indication to the user that they'll need to sort their
-						 * change out.
-						 *
 						 * The Gerrit Trigger provides all the URLs and refspecs to
 						 * check out the change.
 						 */
@@ -116,17 +114,17 @@
 					def parallelTasks = [ : ]
 
 					for (def testGroup in testGroups) {
-						/*
-						 * Because each task is a Groovy closure, we need to
-						 * keep local references to some variables.
-						 */
-						def groupName = testGroup.name
-
-						parallelTasks[groupName] = {
+						parallelTasks[testGroup.name] = {
+							/*
+							 * Because each task is a Groovy closure, we need to
+							 * keep local references to some variables.
+							 */
+							def groupName = testGroup.name
+							def groupDir = testGroup.dir
+							def groupTestcmd = testGroup.testcmd
+							def testsuiteUrl = env.GIT_URL.replaceAll(/${GERRIT_PROJECT}$/, "testsuite")
+							
 							stage (groupName) {
-								def groupDir = testGroup.dir
-								def groupTestcmd = testGroup.testcmd
-								def testsuiteUrl = env.GIT_URL.replaceAll(/${GERRIT_PROJECT}$/, "testsuite")
 
 								docker.image(randomImage).inside("${dockerOptions} --name ${BUILD_TAG}-${groupName}") {
 

-- 
To view, visit https://gerrit.asterisk.org/9416
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: If5f925b4c4ed7000b153f3ed8386ce2140c886f8
Gerrit-Change-Number: 9416
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180712/9e137c7e/attachment-0001.html>


More information about the asterisk-code-review mailing list