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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@

# include the individual .gitlab-ci.yml of each end-to-end integration test
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/ecoc22/.gitlab-ci.yml'
  #- local: '/src/tests/nfvsdn22/.gitlab-ci.yml'
+13 −10
Original line number Diff line number Diff line
@@ -54,6 +54,14 @@ end2end_test ofc22:
    - kubectl get pods --all-namespaces

    # 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
    #- export TFS_REGISTRY_IMAGES="${CI_REGISTRY_IMAGE}"
    #- export TFS_SKIP_BUILD=""
@@ -74,16 +82,11 @@ end2end_test ofc22:

    # Run end-to-end tests
    - 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 start ${TEST_NAME}
    - docker wait ${TEST_NAME}
    - docker logs ${TEST_NAME}
    #- 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
    - >
      docker run -t --name ${TEST_NAME} --network=host 
      --volume "$PWD/tfs_runtime_env_vars.sh:/var/teraflow/tfs_runtime_env_vars.sh"
      --volume "$PWD/src/tests/${TEST_NAME}:/opt/results"
      $CI_REGISTRY_IMAGE/${TEST_NAME}:latest
    - 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/pathcompservice -c frontend