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

fix(ci): typo in lock usage


Signed-off-by: Raphael Defosseux's avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent 713cd711
......@@ -228,28 +228,30 @@ pipeline {
}
stage ('Sanity Check Deployment') {
steps {
lock(params.SanityCheckDockerContainers)
script {
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Deploy --service mysql'
// 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 vpp-upf --upf_tag ' + upf_tag
// 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'
// GNB SIM as RAN emulator
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Deploy --docker_compose docker-compose-gnbsim.yaml --service gnbsim-vpp'
lock(params.SanityCheckDockerContainers) {
script {
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Deploy --service mysql'
// 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 vpp-upf --upf_tag ' + upf_tag
// 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'
// GNB SIM as RAN emulator
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Deploy --docker_compose docker-compose-gnbsim.yaml --service gnbsim-vpp'
// Check if deployment is OK
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Check --service all'
// Check if deployment is OK
sh 'python3 ./ci-scripts/sanityCheckDeployment.py --mode Check --service all'
// 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 --service all'
// 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 --service all'
}
}
}
post {
unsuccessful {
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'
}
}
......
......@@ -162,18 +162,28 @@ def undeployObject(service, compose_file):
return
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):
logging.info ('Performing Check')
subprocess_run_w_echo('sudo chmod 666 /tmp/ci-upf-vpp-sanity.pcap')
if not os.path.isdir('./archives'):
subprocess_run_w_echo('mkdir -p ./archives')
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('sudo chmod 666 /tmp/ci-upf-vpp-sanity.pcap')
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'
res = subprocess.check_output(cmd, shell=True, universal_newlines=True)
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