From 04dfa0a56895f0b28cb449fe546733d6e3fa6be5 Mon Sep 17 00:00:00 2001 From: peusterm Date: Thu, 26 Sep 2019 21:25:09 +0200 Subject: [PATCH] CI: Remove the root rights from OSM stage2 tests Change-Id: Ie34780d463e75a8fa9755432363d387edeeedb93 Signed-off-by: peusterm --- Jenkinsfile | 6 +++++- devops-stages/stage-archive.sh | 2 +- devops-stages/stage-test.sh | 26 +------------------------- 3 files changed, 7 insertions(+), 27 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e429b6b..c314ea1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -43,8 +43,12 @@ node('docker') { // vim-emu: We need to use privileged mode, docker.sock, and host pids for the container // to test the emulator. Also needs -u 0:0 (root user inside container). - docker_args = "--privileged --pid='host' -v /var/run/docker.sock:/var/run/docker.sock -u 0:0 -t" + //docker_args = "--privileged --pid='host' -v /var/run/docker.sock:/var/run/docker.sock -u 0:0" + # TODO run the custom tests here + + // call the normal OSM devops jobs (without root rights) + docker_args = "" ci_helper = load "devops/jenkins/ci-pipelines/ci_stage_2.groovy" ci_helper.ci_pipeline( 'vim-emu', params.PROJECT_URL_PREFIX, diff --git a/devops-stages/stage-archive.sh b/devops-stages/stage-archive.sh index 7bda67b..63967f2 100755 --- a/devops-stages/stage-archive.sh +++ b/devops-stages/stage-archive.sh @@ -24,4 +24,4 @@ # the Horizon 2020 and 5G-PPP programmes. The authors would like to # acknowledge the contributions of their colleagues of the SONATA # partner consortium (www.sonata-nfv.eu). -echo "vim-emu stage archive: Not yet implemented!" +echo "vim-emu stage archive: Not implemented." diff --git a/devops-stages/stage-test.sh b/devops-stages/stage-test.sh index 2eadb1b..8db3b65 100755 --- a/devops-stages/stage-test.sh +++ b/devops-stages/stage-test.sh @@ -29,31 +29,7 @@ # the vim-emu Docker container by user "root". It requires the container # to be started in privileged mode. # -set -e -echo "vim-emu stage-test" -# debugging -echo "Tests executed inside: $(hostname)" -echo "Tests executed by user: $(whoami)" +echo "vim-emu stage archive: Not implemented. See stage-pre-test.sh instead." -# disable root-required test for now to play around some more. -echo "Stopping early." -exit 0 -# Attention: The following needs to be done as root -# trigger ovs setup since container entrypoint is overwritten by Jenkins -service openvswitch-switch start -# ensure the Docker image used during the unittests is there -docker pull 'ubuntu:trusty' - -cd /son-emu/ -# trigger pep8 style check -echo "flake8 version:" -flake8 --version -echo "Doing flake8 style check ..." -flake8 --exclude=.eggs,devops,build,examples/charms --ignore=E501,W605,W504 . -echo "done." -# trigger the tests -echo "Running unit tests ..." -pytest -v -echo "done." -- 2.25.1