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

GitLab CI/CD pipeline - OFC'24:

- Updated pipeline manifest
- Updated TFS deploy specs
parent 2a591801
No related branches found
No related tags found
2 merge requests!235Release TeraFlowSDN 3.0,!223Resolve "Fix OFC'24 end-to-end test for Optical Controller component"
......@@ -13,9 +13,9 @@
# limitations under the License.
# Build, tag, and push the Docker image to the GitLab Docker registry
build ofc22:
build ofc24:
variables:
TEST_NAME: 'ofc22'
TEST_NAME: 'ofc24'
stage: build
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
......@@ -36,13 +36,13 @@ build ofc22:
- .gitlab-ci.yml
# Deploy TeraFlowSDN and Execute end-2-end test
end2end_test ofc22:
end2end_test ofc24:
variables:
TEST_NAME: 'ofc22'
TEST_NAME: 'ofc24'
stage: end2end_test
# Disable to force running it after all other tasks
#needs:
# - build ofc22
# - build ofc24
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
......@@ -53,6 +53,9 @@ end2end_test ofc22:
- microk8s status --wait-ready
- kubectl get pods --all-namespaces
# Deploy Optical Device Node Agents
- ./src/tests/${TEST_NAME}/deploy-node-agents.sh
# 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
......@@ -87,6 +90,7 @@ end2end_test ofc22:
--volume "$PWD/src/tests/${TEST_NAME}:/opt/results"
$CI_REGISTRY_IMAGE/${TEST_NAME}:latest
after_script:
# Dump TeraFlowSDN component logs
- source src/tests/${TEST_NAME}/deploy_specs.sh
- kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server
- kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/deviceservice -c server
......@@ -94,8 +98,22 @@ end2end_test ofc22:
- kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/serviceservice -c server
- kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/sliceservice -c server
- kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/nbiservice -c server
- kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/opticalcontrollerservice -c server
- if docker ps -a | grep ${TEST_NAME}; then docker rm -f ${TEST_NAME}; fi
# Dump Optical Device Node Agents container status and logs
- docker ps -a
- docker logs na-t1
- docker logs na-t2
- docker logs na-r1
- docker logs na-r2
# Destroy Optical Device Node Agents
- ./src/tests/${TEST_NAME}/destroy-node-agents.sh
# Clean old docker images
- docker images --filter="dangling=true" --quiet | xargs -r docker rmi
#coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/'
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)'
......
......@@ -63,7 +63,7 @@ export TFS_K8S_NAMESPACE="tfs"
export TFS_EXTRA_MANIFESTS="manifests/nginx_ingress_http.yaml"
# Uncomment to monitor performance of components
export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/servicemonitors.yaml"
#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/servicemonitors.yaml"
# Uncomment when deploying Optical CyberSecurity
#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/cachingservice.yaml"
......
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