X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=smo-install%2Fjenkins%2Fgerrit%2Fmanual-tests-pipeline;fp=smo-install%2Fjenkins%2Fgerrit%2Fmanual-tests-pipeline;h=ce742460f6beac0d2d04567b902795e919775ad8;hb=dd88f8e183d4463db48e1db2abb5d101e3dfb02a;hp=0000000000000000000000000000000000000000;hpb=aed39eed3108410e207827c54b103581e45ae3ed;p=it%2Fdep.git diff --git a/smo-install/jenkins/gerrit/manual-tests-pipeline b/smo-install/jenkins/gerrit/manual-tests-pipeline new file mode 100644 index 00000000..ce742460 --- /dev/null +++ b/smo-install/jenkins/gerrit/manual-tests-pipeline @@ -0,0 +1,77 @@ +podTemplate(yaml: ''' + apiVersion: v1 + kind: Pod + spec: + containers: + - name: jenkins-ubuntu + image: ubuntu:20.04 + command: + - sleep + args: + - 99d +''') { + node(POD_LABEL) { + def proxies='' + stage('Checkout') { + sh 'printenv' + git branch: env.BRANCH, url:'https://gerrit.o-ran-sc.org/r/it/dep' + } + container('jenkins-ubuntu') { + stage ('Proxy settings') { + echo 'Proxy check' + script { + if (env.http_proxy) { + sh 'echo \'Acquire::http::Proxy "' + env.http_proxy + '";\' > /etc/apt/apt.conf.d/proxy.conf' + sh 'cat /etc/apt/apt.conf.d/proxy.conf' + sh 'echo "http_proxy = "'+env.http_proxy+' > ~/.wgetrc' + sh 'cat ~/.wgetrc' + + sh 'echo \'Acquire::https::Proxy "' + env.http_proxy + '";\' >> /etc/apt/apt.conf.d/proxy.conf' + sh 'cat /etc/apt/apt.conf.d/proxy.conf' + sh 'echo "https_proxy = "'+env.http_proxy+' >> ~/.wgetrc' + sh 'cat ~/.wgetrc' + + proxies='HTTPS_PROXY='+env.http_proxy+' ' + } + } + sh 'printenv' + } + + stage('Setup tools') { + sh 'apt-get update -y' + sh 'DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata' + sh 'apt-get install git wget sudo -y' + sh 'wget https://dl.k8s.io/release/v1.22.0/bin/linux/amd64/kubectl' + sh 'mv kubectl /usr/bin' + sh 'chmod a+x /usr/bin/kubectl' + sh 'kubectl version' + sh proxies+' ./smo-install/scripts/layer-0/0-setup-tests-env.sh' + sh proxies+' ./smo-install/scripts/layer-0/0-setup-charts-museum.sh' + sh proxies+' ./smo-install/scripts/layer-0/0-setup-helm3.sh' + + } + stage('Build TESTS charts') { + sh proxies+' ./smo-install/scripts/sub-scripts/build-tests.sh' + } + stage('Test ORAN') { + dir("smo-install/test/pythonsdk") { + try { + if (env.http_proxy) { + sh proxies+' NO_PROXY='+env.no_proxy+' tox' + } else { + sh 'tox' + } + } + catch(exec) { + echo 'TOX tests crashed' + } + } + } + stage('Get Results') { + archiveArtifacts artifacts: 'smo-install/test/pythonsdk/src/orantests/pythonsdk.debug.log, **/reports/junit/*.xml', fingerprint: true + junit '**/reports/junit/*.xml' + } + } + + } +}