]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
CI: Make build tag an acceptable docker name
authorGeorge Joseph <gjoseph@digium.com>
Mon, 16 Jul 2018 12:16:51 +0000 (06:16 -0600)
committerGeorge Joseph <gjoseph@digium.com>
Mon, 16 Jul 2018 12:20:09 +0000 (07:20 -0500)
Change-Id: I3a4b8a4a9c488ddabf9daf651dc1334222056f38

tests/CI/gateTestGroups.json
tests/CI/gates.jenkinsfile
tests/CI/periodic-dailyTestGroups.json
tests/CI/periodics-daily.jenkinsfile
tests/CI/unittests.jenkinsfile

index f8ce047250f1a0ad3016907de8a7245708fc983a..7c8b917fd7adde9fa59c16ca7b9e8837c6139cd9 100644 (file)
@@ -1,46 +1,46 @@
 [
        {
-               "name": "ari_a-d  ",
+               "name": "ari1",
                "dir": "tests/CI/output/ari1",
                "testcmd": "--test-regex=tests/rest_api/[Ca-d]"
        },
        {
-               "name": "ari_e-z  ",
+               "name": "ari2",
                "dir": "tests/CI/output/ari2",
                "testcmd": "--test-regex=tests/rest_api/[e-z]"
        },
        {
-               "name": "pjsip_a-f",
+               "name": "pjs1",
                "dir": "tests/CI/output/pjsip1",
                "testcmd": "--test-regex=tests/channels/pjsip/[a-f]"
        },
        {
-               "name": "pjsip_g-r",
+               "name": "pjs2",
                "dir": "tests/CI/output/pjsip2",
                "testcmd": "--test-regex=tests/channels/pjsip/[g-r]"
        },
        {
-               "name": "pjsip_s-z",
+               "name": "pjs3",
                "dir": "tests/CI/output/pjsip3",
                "testcmd": "--test-regex=tests/channels/pjsip/[s-z]"
        },
        {
-               "name": "sip_a-r  ",
+               "name": "sip1",
                "dir": "tests/CI/output/sip1",
                "testcmd": "--test-regex=tests/channels/SIP/[Sa-r]"
        },
        {
-               "name": "sip_s-z  ",
+               "name": "sip2",
                "dir": "tests/CI/output/sip2",
                "testcmd": "--test-regex=tests/channels/SIP/[s-z]"
        },
        {
-               "name": "iax2_locl",
+               "name": "iax ",
                "dir": "tests/CI/output/iax2_local",
                "testcmd": " -t tests/channels/iax2 -t tests/channels/local"
        },
        {
-               "name": "pjsip_mwi",
+               "name": "mwi ",
                "dir": "tests/CI/output/extmwi",
                "testcmd": "--test-regex=tests/channels/pjsip/.*mwi"
        }
index 7df6a8eb7760460befd6f905a7de9f12139cb9e2..0705ab7bfd4f1336935ac0c365ee8428bdc91777 100644 (file)
@@ -108,12 +108,13 @@ pipeline {
                                        def dockerOptions = "--ulimit core=0 --ulimit nofile=10240 " +
                                                " -v /srv/jenkins:/srv/jenkins:rw -v /srv/cache:/srv/cache:rw " +
                                                " --entrypoint=''"
+                                       def bt = env.BUILD_TAG.replaceAll(/[^a-zA-Z0-9_.-]/, '-')
                                        def outputdir = "tests/CI/output/Testsuite"
                                        def img = docker.image(randomImage)
                                        img.pull()
 
                                        stage ("Build") {
-                                               img.inside(dockerOptions + " --name ${BUILD_TAG}-build") {
+                                               img.inside(dockerOptions + " --name ${bt}-build") {
                                                        echo 'Building..'
                                                        env.CCACHE_DIR = "/srv/cache/ccache"
                                                        sh "./tests/CI/buildAsterisk.sh --output-dir=${outputdir} --cache-dir=/srv/cache"
@@ -139,7 +140,7 @@ pipeline {
                                                parallelTasks[groupName] = {
                                                        stage (groupName) {
 
-                                                               img.inside("${dockerOptions} --name ${BUILD_TAG}-${groupName}") {
+                                                               img.inside("${dockerOptions} --name ${bt}-${groupName}") {
 
                                                                        lock("${JOB_NAME}.${NODE_NAME}.installer") {
                                                                                sh 'sudo ./tests/CI/installAsterisk.sh  --user-group=jenkins:users'
index 4e60ba0fe1102fa44bed737c38b52e36d64155c0..b8c8e9b8ef05e731a1a2e1361a43d3af03caf00e 100644 (file)
@@ -1,31 +1,31 @@
 [
        {
-               "name": "ari      ",
+               "name": "ari ",
                "dir": "tests/CI/output/ari",
                "testcmd": "-t tests/rest_api/"
        },
        {
-               "name": "pjsip    ",
+               "name": "pjs ",
                "dir": "tests/CI/output/pjsip",
                "testcmd": "-t tests/channels/pjsip"
        },
        {
-               "name": "sip      ",
+               "name": "sip ",
                "dir": "tests/CI/output/sip",
                "testcmd": "-t tests/channels/SIP"
        },
        {
-               "name": "iax2_locl",
+               "name": "iax ",
                "dir": "tests/CI/output/iax2_local",
                "testcmd": " -t tests/channels/iax2 -t tests/channels/local"
        },
        {
-               "name": "agi-apps ",
+               "name": "apps",
                "dir": "tests/CI/output/agi-apps",
                "testcmd": " -t tests/agi -t tests/apps -t blind-transfer-parkingtimeout"
        },
        {
-               "name": "other    ",
+               "name": "othr",
                "dir": "tests/CI/output/other",
                "testcmd": " -T tests/(apps|agi|blind-transfer-parkingtimeout|rest_api|channels|realtime|example|skeleton_test|remote-test)"
        }
index b84334ae9666c45a0c100de92351d05d5ea57d74..fd9fa6b3556d8d35ade2506c5c6dd6a11b4f5fe8 100644 (file)
@@ -38,12 +38,13 @@ pipeline {
                                        def dockerOptions = "--ulimit core=0 --ulimit nofile=10240 " +
                                                " -v /srv/jenkins:/srv/jenkins:rw -v /srv/cache:/srv/cache:rw " +
                                                " --entrypoint=''"
+                                       def bt = env.BUILD_TAG.replaceAll(/[^a-zA-Z0-9_.-]/, '-')
                                        def outputdir = "tests/CI/output/Testsuite"
                                        def img = docker.image(randomImage)
                                        img.pull()
 
                                        stage ("Build") {
-                                               img.inside(dockerOptions + " --name ${BUILD_TAG}-build") {
+                                               img.inside(dockerOptions + " --name ${bt}-build") {
                                                        echo 'Building..'
                                                        env.CCACHE_DIR = "/srv/cache/ccache"
                                                        sh "./tests/CI/buildAsterisk.sh --output-dir=${outputdir} --cache-dir=/srv/cache"
@@ -69,7 +70,7 @@ pipeline {
                                                parallelTasks[groupName] = {
                                                        stage (groupName) {
 
-                                                               img.inside("${dockerOptions} --name ${BUILD_TAG}-${groupName}") {
+                                                               img.inside("${dockerOptions} --name ${bt}-${groupName}") {
 
                                                                        lock("${JOB_NAME}.${NODE_NAME}.installer") {
                                                                                sh 'sudo ./tests/CI/installAsterisk.sh  --user-group=jenkins:users'
index d9f28e7855b17b76863164f849186d0840f6a698..83fd462d49360ea4ee3226eb8333ad6218964ba8 100644 (file)
@@ -106,13 +106,12 @@ pipeline {
                                        def r = currentBuild.startTimeInMillis % images.length
                                        def ri = images[(int)r]
                                        def randomImage = env.DOCKER_REGISTRY + "/" + ri;
+                                       def bt = env.BUILD_TAG.replaceAll(/[^a-zA-Z0-9_.-]/, '-')
                                        def dockerOptions = "--ulimit core=0 --ulimit nofile=10240 " +
                                                " -v /srv/jenkins:/srv/jenkins:rw -v /srv/cache:/srv/cache:rw " +
-                                               " --entrypoint='' --name ${BUILD_TAG}-build"
-
+                                               " --entrypoint='' --name ${bt}-build"
                                        def outputdir = "tests/CI/output/UnitTests"
 
-
                                        def img = docker.image(randomImage)
                                        img.pull()
                                        img.inside(dockerOptions) {