Skip to content
Snippets Groups Projects
Commit aae8e4d1 authored by Raphael Defosseux's avatar Raphael Defosseux
Browse files

CI: 1st step with proper use of submodules

parent 72fdbe78
No related branches found
No related tags found
No related merge requests found
......@@ -152,22 +152,26 @@ pipeline {
sh "git clean -x -d -f > /dev/null 2>&1"
sh "zip -r -qq oai-cn5g-fed.zip .git"
sh "mkdir -p archives DS-TEST-RESULTS"
sh './scripts/syncComponents.sh --amf-branch ' + amfBranch + ' --smf-branch ' + smfBranch
if (new_host_flag) {
// Prepare the workspace in remote server
copyTo2ndServer('oai-cn5g-fed.zip', new_host_flag, new_host_user, new_host)
myShCmd('git clean -x -d -f > /dev/null 2>&1', new_host_flag, new_host_user, new_host)
myShCmd('mkdir -p archives DS-TEST-RESULTS', new_host_flag, new_host_user, new_host)
myShCmd('./scripts/syncComponents.sh --amf-branch ' + amfBranch + ' --smf-branch ' + smfBranch, new_host_flag, new_host_user, new_host)
}
}
if (scmEvent) {
sh "git clean -x -d -f > /dev/null 2>&1"
sh "zip -r -qq oai-cn5g-fed.zip .git"
sh "mkdir -p archives DS-TEST-RESULTS"
sh './scripts/syncComponents.sh'
if (new_host_flag) {
// Prepare the workspace in remote server
copyTo2ndServer('oai-cn5g-fed.zip', new_host_flag, new_host_user, new_host)
myShCmd('git clean -x -d -f > /dev/null 2>&1', new_host_flag, new_host_user, new_host)
myShCmd('mkdir -p archives DS-TEST-RESULTS', new_host_flag, new_host_user, new_host)
myShCmd('./scripts/syncComponents.sh', new_host_flag, new_host_user, new_host)
}
}
}
......
......@@ -68,9 +68,12 @@ class deployForDsTester():
except:
pass
cwd = os.getcwd()
if not os.path.isfile(cwd + '/component/oai-amf/build/scripts/oai_db.sql'):
sys.exit(-1)
subprocess_run_w_echo('docker run --name cicd-mysql-svr --network cicd-oai-public-net --ip ' + CICD_MYSQL_PUBLIC_ADDR + ' -d -e MYSQL_ROOT_PASSWORD=secretPassword mysql/mysql-server:5.7')
# TEMPORARY: TODO --> when repos public, use component strategy
subprocess_run_w_echo('docker cp ci-scripts/temp/oai_db.sql cicd-mysql-svr:/home')
subprocess_run_w_echo('docker cp component/oai-amf/build/scripts/oai_db.sql cicd-mysql-svr:/home')
subprocess_run_w_echo('sed -e "s@CICD_AMF_PUBLIC_ADDR@' + CICD_AMF_PUBLIC_ADDR + '@" ci-scripts/mysql-script.cmd > ci-scripts/mysql-complete.cmd')
subprocess_run_w_echo('docker cp ci-scripts/mysql-complete.cmd cicd-mysql-svr:/home')
# waiting for the service to be properly started
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment