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

Merge branch 'ci-docker-compose' into 'master'

CI docker compose with NRF

See merge request oai/cn5g/oai-cn5g-fed!4
parents 1608dd78 c120f07a
......@@ -60,14 +60,14 @@ def scmEvent = false
def upstreamEvent = false
// Default tags / branches --> could be passed on by upstream job or by PR content
def nrfTag = 'develop'
def nrfBranch = 'dockerfile'
def amfTag = 'develop'
def amfBranch = 'develop'
def smfTag = 'develop'
def smfBranch = 'develop'
def spgwuTag = 'v1.1.0'
def spgwuBranch = 'master'
def nrfTag = params.nrfTag
def nrfBranch = params.nrfBranch
def amfTag = params.amfTag
def amfBranch = params.amfBranch
def smfTag = params.smfTag
def smfBranch = params.smfBranch
def spgwuTag = params.spgwuTag
def spgwuBranch = params.spgwuBranch
//-------------------------------------------------------------------------------
// Pipeline start
......@@ -241,7 +241,7 @@ pipeline {
echo '\u2705 \u001B[32mDeploy CN5G in idle mode\u001B[0m'
// Prepare all needed files for docker-compose
// First put all correct tags to test
sh 'sed -e "s#NRF_IMAGE_TAG#' + nrfTag + '#" -e "s#AMF_IMAGE_TAG#' + amfTag + '#" -e "s#SMF_IMAGE_TAG#' + smfTag + '#" ci-scripts/dsTesterDockerCompose/docker-compose.tplt > ci-scripts/dsTesterDockerCompose/docker-compose.yml'
sh 'sed -e "s#NRF_IMAGE_TAG#' + nrfTag + '#" -e "s#AMF_IMAGE_TAG#' + amfTag + '#" -e "s#SMF_IMAGE_TAG#' + smfTag + '#" -e "s#SPGWU_IMAGE_TAG#' + spgwuTag + '#" ci-scripts/dsTesterDockerCompose/docker-compose.tplt > ci-scripts/dsTesterDockerCompose/docker-compose.yml'
// Entrypoints are modified to be inactive for dsTester framework
sh 'sed -e "s@exec.*@sleep infinity@" component/oai-nrf/scripts/entrypoint.sh > ci-scripts/dsTesterDockerCompose/nrf-entrypoint-sleep.sh'
sh 'sed -e "s@exec.*@sleep infinity@" component/oai-amf/scripts/entrypoint.sh > ci-scripts/dsTesterDockerCompose/amf-entrypoint-sleep.sh'
......@@ -316,7 +316,7 @@ pipeline {
lock (ds_tester_ci_resource) {
script {
sh 'cd ' + dsTestFrameworkLocation + ' && git clean -x -d -f > /dev/null'
sh 'cd ' + dsTestFrameworkLocation + '/scripts && export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:.:/usr/local/devsol/bin && CI_ENV=True SRC_BASE_DIR=' + WORKSPACE + ' ./run-5gc.bash -pt --shark --detach --get-results --5g > ' + WORKSPACE + '/archives/run-5g-dstester.log 2>&1'
sh 'cd ' + dsTestFrameworkLocation + '/scripts && export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:.:/usr/local/devsol/bin && CI_ENV=True SRC_BASE_DIR=' + WORKSPACE + ' ./run-5gc.bash -pt --shark --detach --get-results --5g --pcap-test > ' + WORKSPACE + '/archives/run-5g-dstester.log 2>&1'
sh 'cd ' + dsTestFrameworkLocation + ' && git stash > /dev/null'
sh 'cd ' + dsTestFrameworkLocation + ' && git stash clear > /dev/null'
}
......
......@@ -44,10 +44,9 @@ class HtmlReport():
self.generateFooter()
self.file.close()
try:
if finalStatus:
sys.exit(0)
except:
if finalStatus:
sys.exit(0)
else:
print("DS-TESTER testing FAILED")
def generateHeader(self):
......
......@@ -9,6 +9,7 @@ services:
volumes:
- ../../docker-compose/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql:rw
environment:
- TZ=Europe/Paris
- MYSQL_DATABASE=oai_db
- MYSQL_USER=test
- MYSQL_PASSWORD=test
......@@ -29,6 +30,7 @@ services:
- 80
- 9090
environment:
- TZ=Europe/Paris
- NRF_INTERFACE_NAME_FOR_SBI=eth0
- NRF_INTERFACE_PORT_FOR_SBI=80
- NRF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
......@@ -81,9 +83,11 @@ services:
- SMF_INSTANCE_ID_0=1
- SMF_IPV4_ADDR_0=192.168.61.197
- SMF_HTTP_VERSION_0=v1
- SELECTED_0=true
- SMF_INSTANCE_ID_1=2
- SMF_IPV4_ADDR_1=192.168.61.197
- SMF_HTTP_VERSION_1=v1
- SELECTED_1=false
- MYSQL_SERVER=cicd-mysql-svr
- MYSQL_USER=root
- MYSQL_PASS=linux
......@@ -91,6 +95,8 @@ services:
- OPERATOR_KEY=63bfa50ee6523365ff14c1f45f88737d
- NRF_IPV4_ADDRESS=192.168.61.195
- NRF_PORT=80
- NF_REGISTRATION=yes
- SMF_SELECTION=yes
- NRF_API_VERSION=v1
- AUSF_IPV4_ADDRESS=192.168.61.210
- AUSF_PORT=80
......@@ -116,7 +122,9 @@ services:
image: oai-smf:SMF_IMAGE_TAG
ports:
- 80
- 9090
environment:
- TZ=Europe/Paris
- INSTANCE=1
- PID_DIRECTORY=/var/run
- SMF_INTERFACE_NAME_FOR_N4=eth0
......@@ -136,6 +144,8 @@ services:
- NRF_IPV4_ADDRESS=192.168.61.195
- NRF_PORT=80
- NRF_API_VERSION=v1
- REGISTER_NRF=yes
- DISCOVER_UPF=yes
depends_on:
- cicd_oai_nrf
- cicd_oai_amf
......@@ -154,32 +164,38 @@ services:
cicd_oai_upf:
container_name: cicd-oai-upf
image: oai-spgwu-tiny:v1.1.0
image: oai-spgwu-tiny:SPGWU_IMAGE_TAG
ports:
- 2152
- 8805
environment:
- TZ=Europe/Paris
- PID_DIRECTORY=/var/run
- SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0
- SGW_INTERFACE_NAME_FOR_SX=eth0
- PGW_INTERFACE_NAME_FOR_SGI=eth0
- NETWORK_UE_NAT_OPTION=yes
#- NETWORK_UE_NAT_OPTION=yes
- NETWORK_UE_IP=12.0.0.0/24
- THREAD_S1U_PRIO=9090
- S1U_THREADS=16
- THREAD_SX_PRIO=64
- SX_THREADS=1
- THREAD_SGI_PRIO=64
- SGI_THREADS=16
#- THREAD_S1U_PRIO=9090
#- S1U_THREADS=16
#- THREAD_SX_PRIO=64
#- SX_THREADS=1
#- THREAD_SGI_PRIO=64
#- SGI_THREADS=16
- SPGWC0_IP_ADDRESS=192.168.61.197
- BYPASS_UL_PFCP_RULES=no
- MCC=208
- MNC=95
- MNC03=095
- TAC=40960
- GW_ID=1
- REALM=openairinterface.org
#- BYPASS_UL_PFCP_RULES=no
#- MCC=208
#- MNC=95
#- MNC03=095
#- TAC=40960
#- GW_ID=1
#- REALM=openairinterface.org
- NRF_IPV4_ADDRESS=192.168.61.195
- NRF_PORT=80
- NRF_API_VERSION=v1
- REGISTER_NRF=yes
depends_on:
- cicd_oai_nrf
- cicd_oai_smf
cap_add:
- NET_ADMIN
......
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