Loading scripts/run_tests_locally-nbi-all.sh +6 −4 Original line number Diff line number Diff line Loading @@ -59,10 +59,12 @@ docker run --name nbi -d \ --env "KFK_SERVER_ADDRESS=${KAFKA_IP}:9092" \ nbi:latest while ! docker logs nbi 2>&1 | grep -q 'Initialization completed'; do printf "." sleep 1; 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 $IMAGE_NAME || true) 2>&1 | grep -m1 -Fi 'Initialization completed' printf "\n" sleep 5 # Give extra time to NBI to get ready Loading src/nbi/.gitlab-ci.yml +1 −3 Original line number Diff line number Diff line Loading @@ -103,13 +103,11 @@ unit_test nbi: --env IETF_NETWORK_RENDERER=LIBYANG --env "KFK_SERVER_ADDRESS=${KAFKA_IP}:9092" $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG # 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' - (docker logs -f $IMAGE_NAME || 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
scripts/run_tests_locally-nbi-all.sh +6 −4 Original line number Diff line number Diff line Loading @@ -59,10 +59,12 @@ docker run --name nbi -d \ --env "KFK_SERVER_ADDRESS=${KAFKA_IP}:9092" \ nbi:latest while ! docker logs nbi 2>&1 | grep -q 'Initialization completed'; do printf "." sleep 1; 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 $IMAGE_NAME || true) 2>&1 | grep -m1 -Fi 'Initialization completed' printf "\n" sleep 5 # Give extra time to NBI to get ready Loading
src/nbi/.gitlab-ci.yml +1 −3 Original line number Diff line number Diff line Loading @@ -103,13 +103,11 @@ unit_test nbi: --env IETF_NETWORK_RENDERER=LIBYANG --env "KFK_SERVER_ADDRESS=${KAFKA_IP}:9092" $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG # 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' - (docker logs -f $IMAGE_NAME || 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