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