Commit 77a4fa79 authored by Georgios P. Katsikas's avatar Georgios P. Katsikas
Browse files

fix: comply with the TFS stages

parent 6a9e484f
Loading
Loading
Loading
Loading
+4 −10
Changes for src/tests/p4-end-to-end/.gitlab-ci.yml: 4 added lines, 10 removed lines.
Original line number Diff line number Diff line
stages:
  - test_checkout
  - tfs_deploy
  - run_tests
  - cleanup

variables:
  TEST_NAME: 'p4-end-to-end'
  TFS_K8S_NAMESPACE: "tfs"     # has to be identical with the namespace in deploy_specs.sh
@@ -14,7 +8,7 @@ variables:
  REQ_COMPONENTS_FILE: "requested-components.txt"

clone_mininet_testing:
  stage: test_checkout
  stage: end2end_test

  script:
    - git clone --quiet https://labs.etsi.org/rep/tfs/mdg-dataplane-emulation/mininet/mininet-testing.git "${MININET_TESTING_DIR}"
@@ -31,7 +25,7 @@ clone_mininet_testing:
    - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)'

deploy_tfs_once:
  stage: deploy_tfs
  stage: end2end_test
  needs: ["clone_mininet_testing"]
  script:
    - export REQUESTED_COMPONENTS="$(cat ${REQ_COMPONENTS_FILE})"
@@ -49,13 +43,13 @@ deploy_tfs_once:
      - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)'

run_all_tests:
  stage: run_tests
  stage: end2end_test
  needs: ["deploy_tfs_once"]
  script:
    - echo "Test invoked"

cleanup:
  stage: cleanup
  stage: end2end_test
  when: always
  script:
    - kubectl delete namespaces ${TFS_K8S_NAMESPACE} || true