Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-SMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-SMF
Commits
6eecd52d
Commit
6eecd52d
authored
Mar 01, 2021
by
OAI Jenkins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CI: removed old sanity check deployment
Signed-off-by:
OAI Jenkins
<
jenkins@openairinterface.org
>
parent
6f0d879d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
273 deletions
+0
-273
ci-scripts/Jenkinsfile-GitLab-Docker
ci-scripts/Jenkinsfile-GitLab-Docker
+0
-273
No files found.
ci-scripts/Jenkinsfile-GitLab-Docker
View file @
6eecd52d
...
@@ -53,10 +53,6 @@ pipeline {
...
@@ -53,10 +53,6 @@ pipeline {
"Build SMF Image"
,
"Build SMF Image"
,
"Static Code Analysis"
,
"Static Code Analysis"
,
"Code Formatting Checker"
,
"Code Formatting Checker"
,
"Build AMF-server"
,
"Build UDM-server"
,
"Build AMF-client"
,
"Local SMF test"
,
"Test with DsTester"
"Test with DsTester"
])
])
...
@@ -239,258 +235,6 @@ pipeline {
...
@@ -239,258 +235,6 @@ pipeline {
}
}
}
}
}
}
stage
(
'Build Test Images'
)
{
stages
{
stage
(
'Create Builder-Image'
)
{
steps
{
script
{
BUILDER_SHA_ONE
=
myShRetCmd
(
'docker image ls | head -3 | grep none | sed -e "s#> *<#><#" | sed -e "s#<none><none> *##" | cut -d " " -f 1'
,
new_host_flag
,
new_host_user
,
new_host
)
myShCmd
(
'docker image tag '
+
BUILDER_SHA_ONE
+
' oai-smf-builder-installed:latest'
,
new_host_flag
,
new_host_user
,
new_host
)
}
}
}
stage
(
'Build Test AMF-server'
)
{
steps
{
script
{
gitlabCommitStatus
(
name:
"Build AMF-server"
)
{
myShCmd
(
'docker build --target test-amf-server --tag test-amf-server:test-deploy --file docker/test-images/Dockerfile.amf-server.ubuntu18.04 . > archives/amf_server_docker_image_build.log 2>&1'
,
new_host_flag
,
new_host_user
,
new_host
)
myShCmd
(
'docker image ls >> archives/amf_server_docker_image_build.log'
,
new_host_flag
,
new_host_user
,
new_host
)
}
}
}
post
{
always
{
script
{
copyFrom2ndServer
(
'archives/amf_server_docker_image_build.log'
,
'archives'
,
new_host_flag
,
new_host_user
,
new_host
)
}
}
success
{
sh
"echo 'TEST-AMF-SERVER DOCKER IMAGE BUILD: OK' >> archives/amf_server_docker_image_build.log"
}
unsuccessful
{
sh
"echo 'TEST-AMF-SERVER DOCKER IMAGE BUILD: KO' >> archives/amf_server_docker_image_build.log"
}
}
}
stage
(
'Build Test UDM-server'
)
{
steps
{
script
{
gitlabCommitStatus
(
name:
"Build UDM-server"
)
{
myShCmd
(
'docker build --target test-udm-server --tag test-udm-server:test-deploy --file docker/test-images/Dockerfile.udm-server.ubuntu18.04 . > archives/udm_server_docker_image_build.log 2>&1'
,
new_host_flag
,
new_host_user
,
new_host
)
myShCmd
(
'docker image ls >> archives/udm_server_docker_image_build.log'
,
new_host_flag
,
new_host_user
,
new_host
)
}
}
}
post
{
always
{
script
{
copyFrom2ndServer
(
'archives/udm_server_docker_image_build.log'
,
'archives'
,
new_host_flag
,
new_host_user
,
new_host
)
}
}
success
{
sh
"echo 'TEST-UDM-SERVER DOCKER IMAGE BUILD: OK' >> archives/udm_server_docker_image_build.log"
}
unsuccessful
{
sh
"echo 'TEST-UDM-SERVER DOCKER IMAGE BUILD: KO' >> archives/udm_server_docker_image_build.log"
}
}
}
stage
(
'Build Test AMF-client'
)
{
steps
{
script
{
gitlabCommitStatus
(
name:
"Build AMF-client"
)
{
myShCmd
(
'docker build --target test-amf-client --tag test-amf-client:test-deploy --file docker/test-images/Dockerfile.amf-client.ubuntu18.04 . > archives/amf_client_docker_image_build.log 2>&1'
,
new_host_flag
,
new_host_user
,
new_host
)
myShCmd
(
'docker image ls >> archives/amf_client_docker_image_build.log'
,
new_host_flag
,
new_host_user
,
new_host
)
}
}
}
post
{
always
{
script
{
copyFrom2ndServer
(
'archives/amf_client_docker_image_build.log'
,
'archives'
,
new_host_flag
,
new_host_user
,
new_host
)
}
}
success
{
sh
"echo 'TEST-AMF-CLIENT DOCKER IMAGE BUILD: OK' >> archives/amf_client_docker_image_build.log"
}
unsuccessful
{
sh
"echo 'TEST-AMF-CLIENT DOCKER IMAGE BUILD: KO' >> archives/amf_client_docker_image_build.log"
}
}
}
}
}
stage
(
'Deploy Simple Test'
)
{
stages
{
stage
(
'Create Networks'
)
{
steps
{
script
{
myShCmd
(
'docker network create --attachable --subnet 192.168.28.0/24 --ip-range 192.168.28.0/24 ci-sbi'
,
new_host_flag
,
new_host_user
,
new_host
)
myShCmd
(
'docker network create --attachable --subnet 192.168.29.0/24 --ip-range 192.168.29.0/24 ci-n4'
,
new_host_flag
,
new_host_user
,
new_host
)
}
}
}
stage
(
'Deploy Containers'
)
{
steps
{
script
{
myShCmd
(
'docker run --privileged --name ci-oai-smf -d oai-smf:'
+
smf_tag
+
' /bin/bash -c "sleep infinity"'
,
new_host_flag
,
new_host_user
,
new_host
)
// SBI --> eth1
myShCmd
(
'docker network connect ci-sbi ci-oai-smf'
,
new_host_flag
,
new_host_user
,
new_host
)
// N4 --> eth2
myShCmd
(
'docker network connect ci-n4 ci-oai-smf'
,
new_host_flag
,
new_host_user
,
new_host
)
// Test containers
myShCmd
(
'docker run --name ci-test-amf-server -d test-amf-server:test-deploy /bin/bash -c "sleep infinity"'
,
new_host_flag
,
new_host_user
,
new_host
)
myShCmd
(
'docker network connect ci-sbi ci-test-amf-server'
,
new_host_flag
,
new_host_user
,
new_host
)
myShCmd
(
'docker run --name ci-test-udm-server -d test-udm-server:test-deploy /bin/bash -c "sleep infinity"'
,
new_host_flag
,
new_host_user
,
new_host
)
myShCmd
(
'docker network connect ci-sbi ci-test-udm-server'
,
new_host_flag
,
new_host_user
,
new_host
)
myShCmd
(
'docker run --name ci-test-amf-client -d test-amf-client:test-deploy /bin/bash -c "sleep infinity"'
,
new_host_flag
,
new_host_user
,
new_host
)
myShCmd
(
'docker network connect ci-sbi ci-test-amf-client'
,
new_host_flag
,
new_host_user
,
new_host
)
// SPGWU as UPF
myShCmd
(
'docker run --privileged --name ci-oai-spgwu --entrypoint "/bin/bash" -d oai-spgwu-tiny:develop -c "sleep infinity"'
,
new_host_flag
,
new_host_user
,
new_host
)
// N4 --> eth1
myShCmd
(
'docker network connect ci-n4 ci-oai-spgwu'
,
new_host_flag
,
new_host_user
,
new_host
)
sh
"echo 'OAI-AMF-SERVER CONFIG: OK' >> archives/amf_server_config.log"
sh
"echo 'OAI-UDM-SERVER CONFIG: OK' >> archives/udm_server_config.log"
sh
"echo 'OAI-AMF-CLIENT CONFIG: OK' >> archives/amf_client_config.log"
// Configure containers
SMF_SBI_IP_ADDRESS
=
myShRetCmd
(
'docker exec ci-oai-smf /bin/bash -c "ifconfig eth1 | egrep inet" | sed -e "s@^.*inet @@" -e "s@ netmask.*@@"'
,
new_host_flag
,
new_host_user
,
new_host
)
SMF_N4_IP_ADDRESS
=
myShRetCmd
(
'docker exec ci-oai-smf /bin/bash -c "ifconfig eth2 | egrep inet" | sed -e "s@^.*inet @@" -e "s@ netmask.*@@"'
,
new_host_flag
,
new_host_user
,
new_host
)
UPF_N4_IP_ADDRESS
=
myShRetCmd
(
'docker exec ci-oai-spgwu /bin/bash -c "ifconfig eth1 | egrep inet" | sed -e "s@^.*inet @@" -e "s@ netmask.*@@"'
,
new_host_flag
,
new_host_user
,
new_host
)
AMF_IP_ADDRESS
=
myShRetCmd
(
'docker exec ci-test-amf-server /bin/bash -c "ifconfig eth1 | egrep inet" | sed -e "s@^.*inet @@" -e "s@ netmask.*@@"'
,
new_host_flag
,
new_host_user
,
new_host
)
UDM_IP_ADDRESS
=
myShRetCmd
(
'docker exec ci-test-udm-server /bin/bash -c "ifconfig eth1 | egrep inet" | sed -e "s@^.*inet @@" -e "s@ netmask.*@@"'
,
new_host_flag
,
new_host_user
,
new_host
)
sh
"python3 ci-scripts/generateConfigFiles.py --kind=SMF --sbi=eth1 --n4=eth2 --amf_ip_addr=${AMF_IP_ADDRESS} --udm_ip_addr=${UDM_IP_ADDRESS} --upf_ip_addr=${UPF_N4_IP_ADDRESS} --from_docker_file"
copyTo2ndServer
(
'smf-cfg.sh'
,
new_host_flag
,
new_host_user
,
new_host
)
myShCmd
(
'docker cp ./smf-cfg.sh ci-oai-smf:/openair-smf'
,
new_host_flag
,
new_host_user
,
new_host
)
myShCmd
(
'docker exec ci-oai-smf /bin/bash -c "cd /openair-smf && chmod 777 smf-cfg.sh && ./smf-cfg.sh" >> archives/smf_config.log'
,
new_host_flag
,
new_host_user
,
new_host
)
myShCmd
(
'docker cp ci-oai-smf:/openair-smf/etc/. archives/oai-smf-cfg'
,
new_host_flag
,
new_host_user
,
new_host
)
copyFrom2ndServer
(
'archives/oai-smf-cfg/*.*'
,
'archives/oai-smf-cfg'
,
new_host_flag
,
new_host_user
,
new_host
)
copyFrom2ndServer
(
'archives/smf_config.log'
,
'archives'
,
new_host_flag
,
new_host_user
,
new_host
)
sh
"wget --quiet https://raw.githubusercontent.com/OPENAIRINTERFACE/openair-spgwu-tiny/develop/ci-scripts/generateConfigFiles.py -O ci-scripts/generateSpgwuConfigFiles.py"
sh
"python3 ci-scripts/generateSpgwuConfigFiles.py --kind=SPGW-U --sxc_ip_addr=${SMF_N4_IP_ADDRESS} --sxu=eth1 --s1u=eth0 --from_docker_file"
copyTo2ndServer
(
'spgwu-cfg.sh'
,
new_host_flag
,
new_host_user
,
new_host
)
myShCmd
(
'docker cp ./spgwu-cfg.sh ci-oai-spgwu:/openair-spgwu-tiny'
,
new_host_flag
,
new_host_user
,
new_host
)
myShCmd
(
'docker exec ci-oai-spgwu /bin/bash -c "cd /openair-spgwu-tiny && chmod 777 spgwu-cfg.sh && ./spgwu-cfg.sh" >> archives/spgwu_config.log'
,
new_host_flag
,
new_host_user
,
new_host
)
copyFrom2ndServer
(
'archives/spgwu_config.log'
,
'archives'
,
new_host_flag
,
new_host_user
,
new_host
)
}
}
post
{
success
{
sh
"echo 'OAI-SMF CONFIG: OK' >> archives/smf_config.log"
sh
"echo 'OAI-SPGW-U CONFIG: OK' >> archives/spgwu_config.log"
}
unsuccessful
{
sh
"echo 'OAI-SMF CONFIG: KO' >> archives/smf_config.log"
sh
"echo 'OAI-SPGW-U CONFIG: KO' >> archives/spgwu_config.log"
}
}
}
stage
(
'Test'
)
{
steps
{
script
{
gitlabCommitStatus
(
name:
"Local SMF test"
)
{
SMF_SBI_IP_ADDRESS
=
myShRetCmd
(
'docker exec ci-oai-smf /bin/bash -c "ifconfig eth1 | egrep inet" | sed -e "s@^.*inet @@" -e "s@ netmask.*@@"'
,
new_host_flag
,
new_host_user
,
new_host
)
AMF_IP_ADDRESS
=
myShRetCmd
(
'docker exec ci-test-amf-server /bin/bash -c "ifconfig eth1 | egrep inet" | sed -e "s@^.*inet @@" -e "s@ netmask.*@@"'
,
new_host_flag
,
new_host_user
,
new_host
)
UDM_IP_ADDRESS
=
myShRetCmd
(
'docker exec ci-test-udm-server /bin/bash -c "ifconfig eth1 | egrep inet" | sed -e "s@^.*inet @@" -e "s@ netmask.*@@"'
,
new_host_flag
,
new_host_user
,
new_host
)
myShCmd
(
'docker exec -d ci-oai-smf /bin/bash -c "nohup ./bin/oai_smf -c ./etc/smf.conf -o > smf_check_run.log 2>&1"'
,
new_host_flag
,
new_host_user
,
new_host
)
sh
"sleep 2"
myShCmd
(
'docker exec -d ci-oai-spgwu /bin/bash -c "nohup ./bin/oai_spgwu -c ./etc/spgw_u.conf -o > spgwu_check_run.log 2>&1"'
,
new_host_flag
,
new_host_user
,
new_host
)
sh
"sleep 2"
myShCmd
(
'docker exec -d ci-test-udm-server /bin/bash -c "nohup ./bin/udm-server -i '
+
UDM_IP_ADDRESS
+
' > udm_server_check_run.log 2>&1"'
,
new_host_flag
,
new_host_user
,
new_host
)
sh
"sleep 2"
myShCmd
(
'docker exec -d ci-test-amf-server /bin/bash -c "nohup ./bin/amf-server -i '
+
AMF_IP_ADDRESS
+
' > amf_server_check_run.log 2>&1"'
,
new_host_flag
,
new_host_user
,
new_host
)
sh
"sleep 30"
myShCmd
(
'docker exec ci-test-amf-client /bin/bash -c "./bin/amf-client -i '
+
SMF_SBI_IP_ADDRESS
+
' > amf_client_check_run.log"'
,
new_host_flag
,
new_host_user
,
new_host
)
sh
"sleep 30"
myShCmd
(
'docker exec ci-oai-smf /bin/bash -c "killall --signal SIGINT oai_smf"'
,
new_host_flag
,
new_host_user
,
new_host
)
myShCmd
(
'docker exec ci-oai-spgwu /bin/bash -c "killall --signal SIGINT oai_spgwu"'
,
new_host_flag
,
new_host_user
,
new_host
)
myShCmd
(
'docker exec ci-test-amf-server /bin/bash -c "killall amf-server"'
,
new_host_flag
,
new_host_user
,
new_host
)
myShCmd
(
'docker exec ci-test-udm-server /bin/bash -c "killall udm-server"'
,
new_host_flag
,
new_host_user
,
new_host
)
sh
"sleep 5"
try
{
myShCmd
(
'docker exec ci-oai-smf /bin/bash -c "killall --signal SIGKILL oai_smf"'
,
new_host_flag
,
new_host_user
,
new_host
)
}
catch
(
Exception
e
)
{
echo
"No residual oai_smf processes"
}
try
{
myShCmd
(
'docker exec ci-oai-spgwu /bin/bash -c "killall --signal SIGKILL oai_spgwu"'
,
new_host_flag
,
new_host_user
,
new_host
)
}
catch
(
Exception
e
)
{
echo
"No residual oai_spgwu processes"
}
sh
"sleep 5"
// Retrieve all log files
myShCmd
(
'docker cp ci-oai-smf:/openair-smf/smf_check_run.log archives'
,
new_host_flag
,
new_host_user
,
new_host
)
myShCmd
(
'docker cp ci-oai-spgwu:/openair-spgwu-tiny/spgwu_check_run.log archives'
,
new_host_flag
,
new_host_user
,
new_host
)
myShCmd
(
'docker cp ci-test-amf-server:/test-amf-server/amf_server_check_run.log archives'
,
new_host_flag
,
new_host_user
,
new_host
)
myShCmd
(
'docker cp ci-test-udm-server:/test-udm-server/udm_server_check_run.log archives'
,
new_host_flag
,
new_host_user
,
new_host
)
myShCmd
(
'docker cp ci-test-amf-client:/test-amf-client/amf_client_check_run.log archives'
,
new_host_flag
,
new_host_user
,
new_host
)
copyFrom2ndServer
(
'archives/*_check_run.log'
,
'archives'
,
new_host_flag
,
new_host_user
,
new_host
)
sh
"python3 ./ci-scripts/verifySanityCheckDeployment.py --job_name=${JOB_NAME} --job_id=${BUILD_ID}"
sh
"python3 ./ci-scripts/verifySanityCheckDeployment.py --job_name=${JOB_NAME} --job_id=${BUILD_ID} --smf_pdu_check"
}
}
}
post
{
unsuccessful
{
script
{
// Retrieve all log files in case of failure
try
{
myShCmd
(
'docker cp ci-oai-smf:/openair-smf/smf_check_run.log archives'
,
new_host_flag
,
new_host_user
,
new_host
)
}
catch
(
Exception
e
)
{
echo
"No smf run logs"
}
try
{
myShCmd
(
'docker cp ci-oai-spgwu:/openair-spgwu-tiny/spgwu_check_run.log archives'
,
new_host_flag
,
new_host_user
,
new_host
)
}
catch
(
Exception
e
)
{
echo
"No spgwu run logs"
}
try
{
myShCmd
(
'docker cp ci-test-amf-server:/test-amf-server/amf_server_check_run.log archives'
,
new_host_flag
,
new_host_user
,
new_host
)
}
catch
(
Exception
e
)
{
echo
"No amf run logs"
}
try
{
myShCmd
(
'docker cp ci-test-udm-server:/test-udm-server/udm_server_check_run.log archives'
,
new_host_flag
,
new_host_user
,
new_host
)
}
catch
(
Exception
e
)
{
echo
"No udm run logs"
}
try
{
myShCmd
(
'docker cp ci-test-amf-client:/test-amf-client/amf_client_check_run.log archives'
,
new_host_flag
,
new_host_user
,
new_host
)
}
catch
(
Exception
e
)
{
echo
"No amf-client run logs"
}
try
{
copyFrom2ndServer
(
'archives/*_check_run.log'
,
'archives'
,
new_host_flag
,
new_host_user
,
new_host
)
}
catch
(
Exception
e
)
{
echo
"No run logs at all?"
}
}
}
}
}
stage
(
'Undeploy Containers'
)
{
steps
{
script
{
myShCmd
(
'docker rm -f ci-oai-smf ci-test-amf-server ci-test-udm-server ci-test-amf-client ci-oai-spgwu'
,
new_host_flag
,
new_host_user
,
new_host
)
}
}
}
stage
(
'Delete Networks'
)
{
steps
{
script
{
myShCmd
(
'docker network rm ci-sbi ci-n4'
,
new_host_flag
,
new_host_user
,
new_host
)
}
}
}
}
}
stage
(
'Testing in CN-5G-FED environment'
)
{
stage
(
'Testing in CN-5G-FED environment'
)
{
steps
{
steps
{
script
{
script
{
...
@@ -543,18 +287,6 @@ pipeline {
...
@@ -543,18 +287,6 @@ pipeline {
}
}
cleanup
{
cleanup
{
script
{
script
{
// Deleting containers in case of errors
try
{
myShCmd
(
'docker rm -f ci-oai-smf ci-test-amf-server ci-test-udm-server ci-test-amf-client ci-oai-spgwu'
,
new_host_flag
,
new_host_user
,
new_host
)
}
catch
(
Exception
e
)
{
echo
"We failed to remove any existing containers"
}
// Deleting networks in case of errors
try
{
myShCmd
(
'docker network rm ci-sbi ci-n4'
,
new_host_flag
,
new_host_user
,
new_host
)
}
catch
(
Exception
e
)
{
echo
"We failed to remove any existing networks"
}
// Removing temporary / intermediate images
// Removing temporary / intermediate images
try
{
try
{
if
(
"MERGE"
.
equals
(
env
.
gitlabActionType
))
{
if
(
"MERGE"
.
equals
(
env
.
gitlabActionType
))
{
...
@@ -563,11 +295,6 @@ pipeline {
...
@@ -563,11 +295,6 @@ pipeline {
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
echo
"We failed to delete the OAI-SMF temp image"
echo
"We failed to delete the OAI-SMF temp image"
}
}
try
{
myShCmd
(
'docker image rm --force oai-smf-builder-installed:latest test-amf-server:test-deploy test-udm-server:test-deploy test-amf-client:test-deploy'
,
new_host_flag
,
new_host_user
,
new_host
)
}
catch
(
Exception
e
)
{
echo
"We failed to delete the test temp images"
}
try
{
try
{
myShCmd
(
'docker image prune --force'
,
new_host_flag
,
new_host_user
,
new_host
)
myShCmd
(
'docker image prune --force'
,
new_host_flag
,
new_host_user
,
new_host
)
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment