[Asterisk-code-review] CI: Update testsuite unit test to build asterisk first (testsuite[16])
George Joseph
asteriskteam at digium.com
Mon Jul 23 10:31:50 CDT 2018
George Joseph has uploaded this change for review. ( https://gerrit.asterisk.org/9594
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(-)
git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/94/9594/1
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/9594
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: testsuite
Gerrit-Branch: 16
Gerrit-MessageType: newchange
Gerrit-Change-Id: I11bb54acaf88bbeb4e83880c915b46ea4c191173
Gerrit-Change-Number: 9594
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180723/02fa9f2c/attachment.html>
More information about the asterisk-code-review
mailing list