17 git branch: env.BRANCH, url:'https://github.com/sebdet/oran-deployment.git'
19 container('jenkins-ubuntu') {
20 stage ('Proxy settings') {
24 sh 'echo \'Acquire::http::Proxy "' + env.http_proxy + '";\' > /etc/apt/apt.conf.d/proxy.conf'
25 sh 'cat /etc/apt/apt.conf.d/proxy.conf'
26 sh 'echo "http_proxy = "'+env.http_proxy+' > ~/.wgetrc'
29 sh 'echo \'Acquire::https::Proxy "' + env.http_proxy + '";\' >> /etc/apt/apt.conf.d/proxy.conf'
30 sh 'cat /etc/apt/apt.conf.d/proxy.conf'
31 sh 'echo "https_proxy = "'+env.http_proxy+' >> ~/.wgetrc'
34 proxies='HTTPS_PROXY='+env.http_proxy+' '
40 stage('Setup tools') {
41 sh 'apt-get update -y'
42 sh 'DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata'
43 sh 'apt-get install git wget sudo -y'
44 sh 'wget https://dl.k8s.io/release/v1.22.0/bin/linux/amd64/kubectl'
45 sh 'mv kubectl /usr/bin'
46 sh 'chmod a+x /usr/bin/kubectl'
48 sh proxies+' ./scripts/layer-0/0-setup-tests-env.sh'
49 sh proxies+' ./scripts/layer-0/0-setup-charts-museum.sh'
50 sh proxies+' ./scripts/layer-0/0-setup-helm3.sh'
53 stage('Build TESTS charts') {
54 sh proxies+' ./scripts/sub-scripts/build-tests.sh'
57 dir("test/pythonsdk") {
60 sh proxies+' NO_PROXY='+env.no_proxy+' tox'
64 currentBuild.result = 'SUCCESS'
67 echo 'TOX tests crashed'
68 currentBuild.result = 'FAILURE'
72 stage('Get Results') {
73 archiveArtifacts artifacts: 'test/pythonsdk/src/orantests/pythonsdk.debug.log, **/reports/junit/*.xml', fingerprint: true
74 junit '**/reports/junit/*.xml'