From 3f82ecf09d225961dff7fa9cdef50fff273985f2 Mon Sep 17 00:00:00 2001 From: zyy17 Date: Mon, 2 Dec 2024 15:05:56 +0800 Subject: [PATCH] refactor(e2e): pull vector image and push to local registry --- tests/e2e/setup/create-cluster.sh | 11 +++++++++++ .../resources/cluster/enable-monitoring/cluster.yaml | 2 ++ 2 files changed, 13 insertions(+) diff --git a/tests/e2e/setup/create-cluster.sh b/tests/e2e/setup/create-cluster.sh index 867d8dc8..a1d42f25 100755 --- a/tests/e2e/setup/create-cluster.sh +++ b/tests/e2e/setup/create-cluster.sh @@ -38,6 +38,9 @@ DEFAULT_TIMEOUT=300s # We always use the latest released greptimedb image for testing. GREPTIMEDB_IMAGE=greptime/greptimedb:latest +# We always use the latest released vector image for testing. +VECTOR_IMAGE=timberio/vector:nightly-alpine + # Define the color for the output. RED='\033[1;31m' GREEN='\033[1;32m' @@ -107,6 +110,14 @@ function pull_greptimedb_image() { echo -e "${GREEN}<= Greptimedb image is pulled and pushed.${RESET}" } +function pull_vector_image() { + echo -e "${GREEN}=> Pull and push vector image...${RESET}" + docker pull "$VECTOR_IMAGE" + docker tag "$VECTOR_IMAGE" localhost:${REGISTRY_PORT}/timberio/vector:nightly-alpine + docker push localhost:${REGISTRY_PORT}/timberio/vector:nightly-alpine + echo -e "${GREEN}<= Vector image is pulled and pushed.${RESET}" +} + function create_kind_cluster() { echo -e "${GREEN}=> Create kind cluster...${RESET}" # check cluster diff --git a/tests/e2e/testdata/resources/cluster/enable-monitoring/cluster.yaml b/tests/e2e/testdata/resources/cluster/enable-monitoring/cluster.yaml index c3561f99..df0970f1 100644 --- a/tests/e2e/testdata/resources/cluster/enable-monitoring/cluster.yaml +++ b/tests/e2e/testdata/resources/cluster/enable-monitoring/cluster.yaml @@ -19,3 +19,5 @@ spec: replicas: 1 monitoring: enabled: true + vector: + image: localhost:5001/timberio/vector:nightly-alpine