Loading src/nbi/.gitlab-ci.yml +7 −1 Original line number Diff line number Diff line Loading @@ -103,7 +103,13 @@ unit_test nbi: --env IETF_NETWORK_RENDERER=LIBYANG --env "KFK_SERVER_ADDRESS=${KAFKA_IP}:9092" $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG - while ! docker logs $IMAGE_NAME 2>&1 | grep -q 'Initialization completed'; do sleep 5; done # Old version that gets blocked: #- while ! docker logs $IMAGE_NAME 2>&1 | grep -q 'Initialization completed'; do sleep 5; done # Wait until any worker logs "Initialization completed" (from the start of logs) # -m1 makes grep exit as soon as the line appears. # With set -o pipefail, docker logs will get SIGPIPE when grep exits; # `|| true` neutralizes that so the pipeline’s status reflects grep’s success. - (docker logs -f nbi || true) 2>&1 | grep -m1 -Fi 'Initialization completed' - sleep 5 # Give extra time to NBI to get ready - docker ps -a - docker logs kafka Loading Loading
src/nbi/.gitlab-ci.yml +7 −1 Original line number Diff line number Diff line Loading @@ -103,7 +103,13 @@ unit_test nbi: --env IETF_NETWORK_RENDERER=LIBYANG --env "KFK_SERVER_ADDRESS=${KAFKA_IP}:9092" $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG - while ! docker logs $IMAGE_NAME 2>&1 | grep -q 'Initialization completed'; do sleep 5; done # Old version that gets blocked: #- while ! docker logs $IMAGE_NAME 2>&1 | grep -q 'Initialization completed'; do sleep 5; done # Wait until any worker logs "Initialization completed" (from the start of logs) # -m1 makes grep exit as soon as the line appears. # With set -o pipefail, docker logs will get SIGPIPE when grep exits; # `|| true` neutralizes that so the pipeline’s status reflects grep’s success. - (docker logs -f nbi || true) 2>&1 | grep -m1 -Fi 'Initialization completed' - sleep 5 # Give extra time to NBI to get ready - docker ps -a - docker logs kafka Loading