Skip to content
Snippets Groups Projects
Commit 892a1e93 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

GitLab CI/CD pipeline - OFC'22:

- Reactivated end-to-end test
- Updated CI/CD pipeline descriptor
parent 86279da9
No related branches found
No related tags found
2 merge requests!235Release TeraFlowSDN 3.0,!216Resolve "Automate end-to-end tests and integrate them in CI/CD pipeline"
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# include the individual .gitlab-ci.yml of each end-to-end integration test # include the individual .gitlab-ci.yml of each end-to-end integration test
include: include:
#- local: '/src/tests/ofc22/.gitlab-ci.yml' - local: '/src/tests/ofc22/.gitlab-ci.yml'
#- local: '/src/tests/oeccpsc22/.gitlab-ci.yml' #- local: '/src/tests/oeccpsc22/.gitlab-ci.yml'
- local: '/src/tests/ecoc22/.gitlab-ci.yml' - local: '/src/tests/ecoc22/.gitlab-ci.yml'
#- local: '/src/tests/nfvsdn22/.gitlab-ci.yml' #- local: '/src/tests/nfvsdn22/.gitlab-ci.yml'
......
...@@ -54,6 +54,14 @@ end2end_test ofc22: ...@@ -54,6 +54,14 @@ end2end_test ofc22:
- kubectl get pods --all-namespaces - kubectl get pods --all-namespaces
# Configure TeraFlowSDN deployment # Configure TeraFlowSDN deployment
# Uncomment if DEBUG log level is needed for the components
- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/contextservice.yaml
- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/deviceservice.yaml
- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="frontend").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/pathcompservice.yaml
- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/serviceservice.yaml
- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/sliceservice.yaml
- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/nbiservice.yaml
- yq -i '((select(.kind=="Deployment").spec.template.spec.containers.[] | select(.name=="server").env.[]) | select(.name=="LOG_LEVEL").value) |= "DEBUG"' manifests/monitoringservice.yaml
- source src/tests/${TEST_NAME}/deploy_specs.sh - source src/tests/${TEST_NAME}/deploy_specs.sh
#- export TFS_REGISTRY_IMAGES="${CI_REGISTRY_IMAGE}" #- export TFS_REGISTRY_IMAGES="${CI_REGISTRY_IMAGE}"
#- export TFS_SKIP_BUILD="" #- export TFS_SKIP_BUILD=""
...@@ -74,16 +82,11 @@ end2end_test ofc22: ...@@ -74,16 +82,11 @@ end2end_test ofc22:
# Run end-to-end tests # Run end-to-end tests
- if docker ps -a | grep ${TEST_NAME}; then docker rm -f ${TEST_NAME}; fi - if docker ps -a | grep ${TEST_NAME}; then docker rm -f ${TEST_NAME}; fi
- docker create --name ${TEST_NAME} --network=host -v "$PWD/src/tests/${TEST_NAME}:/opt/results" $CI_REGISTRY_IMAGE/${TEST_NAME}:latest - >
- docker cp ./tfs_runtime_env_vars.sh ${TEST_NAME}:/var/teraflow/ docker run -t --name ${TEST_NAME} --network=host
- docker start ${TEST_NAME} --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh"
- docker wait ${TEST_NAME} --volume "$PWD/src/tests/${TEST_NAME}:/opt/results"
- docker logs ${TEST_NAME} $CI_REGISTRY_IMAGE/${TEST_NAME}:latest
#- source tfs_runtime_env_vars.sh
#- pytest --verbose --log-level=INFO ./src/tests/${TEST_NAME}/tests/test_functional_bootstrap.py --junitxml=./src/tests/${TEST_NAME}/report_bootstrap.xml
#- pytest --verbose --log-level=INFO ./src/tests/${TEST_NAME}/tests/test_functional_create_service.py --junitxml=./src/tests/${TEST_NAME}/report_create_service.xml
#- pytest --verbose --log-level=INFO ./src/tests/${TEST_NAME}/tests/test_functional_delete_service.py --junitxml=./src/tests/${TEST_NAME}/report_delete_service.xml
#- pytest --verbose --log-level=INFO ./src/tests/${TEST_NAME}/tests/test_functional_cleanup.py --junitxml=./src/tests/${TEST_NAME}/report_cleanup.xml
- kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server
- kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/deviceservice -c server - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/deviceservice -c server
- kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/pathcompservice -c frontend - kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/pathcompservice -c frontend
......
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