Commit 75be3903 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

GitLab CI/CD pipeline:

- Upgraded CI/CD end-to-end tests to wait for MicroK8s to be ready
- Expanded test timeout to 45 minutes
parent 3436a7f8
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ build ecoc22:

# Deploy TeraFlowSDN and Execute end-2-end test
end2end_test ecoc22:
  timeout: 20m
  timeout: 45m
  variables:
    TEST_NAME: 'ecoc22'
  stage: end2end_test
@@ -56,6 +56,19 @@ end2end_test ecoc22:

    # Check MicroK8s is ready
    - microk8s status --wait-ready
    - LOOP_MAX_ATTEMPTS=10
    - LOOP_COUNTER=0
    - >
      while ! kubectl get pods --all-namespaces &> /dev/null; do
        printf "%c" "."
        sleep 1
        LOOP_COUNTER=$((LOOP_COUNTER + 1))
        if [ "$LOOP_COUNTER" -ge "$LOOP_MAX_ATTEMPTS" ]; then
          echo "Max attempts reached, exiting the loop."
          exit 1
        fi
      done
    - kubectl get pods --all-namespaces

    # Always delete Kubernetes namespaces
    - export K8S_NAMESPACES=$(kubectl get namespace -o jsonpath='{.items[*].metadata.name}')
+14 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ build eucnc24:

# Deploy TeraFlowSDN and Execute end-2-end test
end2end_test eucnc24:
  timeout: 90m
  timeout: 45m
  variables:
    TEST_NAME: 'eucnc24'
  stage: end2end_test
@@ -59,6 +59,19 @@ end2end_test eucnc24:

    # Check MicroK8s is ready
    - microk8s status --wait-ready
    - LOOP_MAX_ATTEMPTS=10
    - LOOP_COUNTER=0
    - >
      while ! kubectl get pods --all-namespaces &> /dev/null; do
        printf "%c" "."
        sleep 1
        LOOP_COUNTER=$((LOOP_COUNTER + 1))
        if [ "$LOOP_COUNTER" -ge "$LOOP_MAX_ATTEMPTS" ]; then
          echo "Max attempts reached, exiting the loop."
          exit 1
        fi
      done
    - kubectl get pods --all-namespaces

    # Always delete Kubernetes namespaces
    - export K8S_NAMESPACES=$(kubectl get namespace -o jsonpath='{.items[*].metadata.name}')
+14 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ build ofc22:

# Deploy TeraFlowSDN and Execute end-2-end test
end2end_test ofc22:
  timeout: 20m
  timeout: 45m
  variables:
    TEST_NAME: 'ofc22'
  stage: end2end_test
@@ -56,6 +56,19 @@ end2end_test ofc22:

    # Check MicroK8s is ready
    - microk8s status --wait-ready
    - LOOP_MAX_ATTEMPTS=10
    - LOOP_COUNTER=0
    - >
      while ! kubectl get pods --all-namespaces &> /dev/null; do
        printf "%c" "."
        sleep 1
        LOOP_COUNTER=$((LOOP_COUNTER + 1))
        if [ "$LOOP_COUNTER" -ge "$LOOP_MAX_ATTEMPTS" ]; then
          echo "Max attempts reached, exiting the loop."
          exit 1
        fi
      done
    - kubectl get pods --all-namespaces

    # Always delete Kubernetes namespaces
    - export K8S_NAMESPACES=$(kubectl get namespace -o jsonpath='{.items[*].metadata.name}')
+14 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ build ofc24:

# Deploy TeraFlowSDN and Execute end-2-end test
end2end_test ofc24:
  timeout: 90m
  timeout: 45m
  variables:
    TEST_NAME: 'ofc24'
  stage: end2end_test
@@ -56,6 +56,19 @@ end2end_test ofc24:

    # Check MicroK8s is ready
    - microk8s status --wait-ready
    - LOOP_MAX_ATTEMPTS=10
    - LOOP_COUNTER=0
    - >
      while ! kubectl get pods --all-namespaces &> /dev/null; do
        printf "%c" "."
        sleep 1
        LOOP_COUNTER=$((LOOP_COUNTER + 1))
        if [ "$LOOP_COUNTER" -ge "$LOOP_MAX_ATTEMPTS" ]; then
          echo "Max attempts reached, exiting the loop."
          exit 1
        fi
      done
    - kubectl get pods --all-namespaces

    # Always delete Kubernetes namespaces
    - export K8S_NAMESPACES=$(kubectl get namespace -o jsonpath='{.items[*].metadata.name}')
+14 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ build qkd_end2end:

# Deploy TeraFlowSDN and Execute end-2-end test
end2end_test qkd_end2end:
  timeout: 30m
  timeout: 45m
  variables:
    TEST_NAME: 'qkd_end2end'
  stage: end2end_test
@@ -56,6 +56,19 @@ end2end_test qkd_end2end:

    # Check MicroK8s is ready
    - microk8s status --wait-ready
    - LOOP_MAX_ATTEMPTS=10
    - LOOP_COUNTER=0
    - >
      while ! kubectl get pods --all-namespaces &> /dev/null; do
        printf "%c" "."
        sleep 1
        LOOP_COUNTER=$((LOOP_COUNTER + 1))
        if [ "$LOOP_COUNTER" -ge "$LOOP_MAX_ATTEMPTS" ]; then
          echo "Max attempts reached, exiting the loop."
          exit 1
        fi
      done
    - kubectl get pods --all-namespaces

    # Always delete Kubernetes namespaces
    - export K8S_NAMESPACES=$(kubectl get namespace -o jsonpath='{.items[*].metadata.name}')