[Asterisk-code-review] CI: Update testsuite unit test to build asterisk first (testsuite[16.0])

Jenkins2 asteriskteam at digium.com
Mon Jul 23 10:33:22 CDT 2018


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/9596 )

Change subject: CI:  Update testsuite unit test to build asterisk first
......................................................................

CI:  Update testsuite unit test to build asterisk first

Change-Id: I11bb54acaf88bbeb4e83880c915b46ea4c191173
---
M CI/unittests.jenkinsfile
1 file changed, 26 insertions(+), 0 deletions(-)

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



diff --git a/CI/unittests.jenkinsfile b/CI/unittests.jenkinsfile
index 804e6c7..5722a2c 100644
--- a/CI/unittests.jenkinsfile
+++ b/CI/unittests.jenkinsfile
@@ -116,10 +116,36 @@
 					def dockerOptions = "--ulimit core=0 --ulimit nofile=10240 " +
 						" -v /srv/jenkins:/srv/jenkins:rw -v /srv/cache:/srv/cache:rw " +
 						" --entrypoint='' --name ${bt}-build"
+					def outputDir = "CI/output"
+					def astDir = "${outputDir}/asterisk"
 
 					def img = docker.image(randomImage)
 					img.pull()
 					img.inside(dockerOptions) {
+						def asteriskUrl = env.GERRIT_PROJECT_URL.replaceAll(/\/(Security-)?[^\/]+$/, "/\$1asterisk")	
+						checkout scm: [$class: 'GitSCM',
+							branches: [[name: "${BRANCH_NAME}"]],
+							extensions: [
+								[$class: 'RelativeTargetDirectory', relativeTargetDir: astDir],
+								[$class: 'CloneOption',
+									noTags: true,
+									depth: 10,
+									honorRefspec: true,
+									shallow: true
+								],
+							],
+							userRemoteConfigs: [[name: env.GERRIT_NAME, url: asteriskUrl]]
+						]
+						
+						stage ('Build') {
+							echo 'Building..'
+
+							sh """
+								cd ${astDir}
+								./tests/CI/buildAsterisk.sh --output-dir=${env.WORKSPACE}/${outputDir} --cache-dir=/srv/cache
+								sudo ./tests/CI/installAsterisk.sh --user-group=jenkins:users
+							"""									
+						}
 						stage ('Test') {
 							sh "./self_test"
 						}

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

Gerrit-Project: testsuite
Gerrit-Branch: 16.0
Gerrit-MessageType: merged
Gerrit-Change-Id: I11bb54acaf88bbeb4e83880c915b46ea4c191173
Gerrit-Change-Number: 9596
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/20180723/db508e5d/attachment-0001.html>


More information about the asterisk-code-review mailing list