Commit 2c752560 authored by Raphael Defosseux's avatar Raphael Defosseux

fix(ci): typo in lock usage

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent 713cd711
...@@ -228,28 +228,30 @@ pipeline { ...@@ -228,28 +228,30 @@ pipeline {
} }
stage ('Sanity Check Deployment') { stage ('Sanity Check Deployment') {
steps { steps {
lock(params.SanityCheckDockerContainers) lock(params.SanityCheckDockerContainers) {
script { script {
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Deploy --service mysql' sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Deploy --service mysql'
// NRF SHALL BE DEPLOYED BEFORE UPF-VPP // NRF SHALL BE DEPLOYED BEFORE UPF-VPP
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Deploy --service oai-nrf' sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Deploy --service oai-nrf'
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Deploy --service vpp-upf --upf_tag ' + upf_tag sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Deploy --service vpp-upf --upf_tag ' + upf_tag
// SMF is dependant on AMF and EXT-DN: they will be deploy as well // SMF is dependant on AMF and EXT-DN: they will be deploy as well
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Deploy --service oai-smf' sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Deploy --service oai-smf'
// GNB SIM as RAN emulator // GNB SIM as RAN emulator
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Deploy --docker_compose docker-compose-gnbsim.yaml --service gnbsim-vpp' sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Deploy --docker_compose docker-compose-gnbsim.yaml --service gnbsim-vpp'
// Check if deployment is OK // Check if deployment is OK
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Check --service all' sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Check --service all'
// Undeploy once OK // Undeploy once OK
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode UnDeploy --docker_compose docker-compose-gnbsim.yaml --service gnbsim-vpp' sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode UnDeploy --docker_compose docker-compose-gnbsim.yaml --service gnbsim-vpp'
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode UnDeploy --service all' sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode UnDeploy --service all'
}
} }
} }
post { post {
unsuccessful { unsuccessful {
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Check --service all || true' sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Check --service all || true'
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode UnDeploy --docker_compose docker-compose-gnbsim.yaml --service gnbsim-vpp'
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode UnDeploy --service all || true' sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode UnDeploy --service all || true'
} }
} }
......
...@@ -162,18 +162,28 @@ def undeployObject(service, compose_file): ...@@ -162,18 +162,28 @@ def undeployObject(service, compose_file):
return return
os.chdir('docker-compose') os.chdir('docker-compose')
subprocess_run_w_echo('docker-compose -p vpp-sanity -f ./ci-' + compose_file + ' down') if not os.path.exists('./ci-' + compose_file):
subprocess_run_w_echo('docker-compose -p vpp-sanity -f ./ci-' + compose_file + ' down')
else:
subprocess_run_w_echo('docker-compose -p vpp-sanity -f ./' + compose_file + ' down')
if os.path.exists('/tmp/ci-upf-vpp-sanity.pcap'):
subprocess_run_w_echo('sudo rm -f /tmp/ci-upf-vpp-sanity.pcap')
def checkDeployment(service, compose_file): def checkDeployment(service, compose_file):
logging.info ('Performing Check') logging.info ('Performing Check')
subprocess_run_w_echo('sudo chmod 666 /tmp/ci-upf-vpp-sanity.pcap')
if not os.path.isdir('./archives'): if not os.path.isdir('./archives'):
subprocess_run_w_echo('mkdir -p ./archives') subprocess_run_w_echo('mkdir -p ./archives')
if os.path.exists('/tmp/ci-upf-vpp-sanity.pcap'): if os.path.exists('/tmp/ci-upf-vpp-sanity.pcap'):
subprocess_run_w_echo('cp /tmp/ci-upf-vpp-sanity.pcap archives') subprocess_run_w_echo('cp /tmp/ci-upf-vpp-sanity.pcap archives')
subprocess_run_w_echo('sudo chmod 666 /tmp/ci-upf-vpp-sanity.pcap')
os.chdir('docker-compose') os.chdir('docker-compose')
if not os.path.exists('./ci-' + compose_file):
return
cmd = 'docker-compose -p vpp-sanity -f ./ci-' + compose_file + ' ps -a' cmd = 'docker-compose -p vpp-sanity -f ./ci-' + compose_file + ' ps -a'
res = subprocess.check_output(cmd, shell=True, universal_newlines=True) res = subprocess.check_output(cmd, shell=True, universal_newlines=True)
for line in res.split('\n'): for line in res.split('\n'):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment