From 4fbfaafe4be5b0a78cdf5fb0d7389a29d64326a2 Mon Sep 17 00:00:00 2001 From: Olga Naidjonoka Date: Wed, 20 Mar 2024 11:59:58 +0200 Subject: [PATCH] added kind setup --- .buildkite/deploy/kubernetes/deploy-k8s-pipeline.yml | 11 ++++++++--- .buildkite/deploy/kubernetes/scripts/install-kind.sh | 2 ++ .buildkite/hooks/pre-command | 6 ++++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.buildkite/deploy/kubernetes/deploy-k8s-pipeline.yml b/.buildkite/deploy/kubernetes/deploy-k8s-pipeline.yml index a357e04b756b..157e782db799 100644 --- a/.buildkite/deploy/kubernetes/deploy-k8s-pipeline.yml +++ b/.buildkite/deploy/kubernetes/deploy-k8s-pipeline.yml @@ -20,11 +20,16 @@ steps: machineType: "${GCP_HI_PERF_MACHINE_TYPE}" - label: "K8S Test" + key: "k8s-test" env: k8sTest: "v1.29.0,v1.28.0,v1.27.3,v1.26.6" - command: - - ".buildkite/deploy/kubernetes/scripts/setup-k8s-env.sh" - - "MODULE=kubernetes make -C metricbeat integration-tests" + command: echo hello +# - ".buildkite/deploy/kubernetes/scripts/setup-k8s-env.sh" +# - "MODULE=kubernetes make -C metricbeat integration-tests" + agents: + provider: "gcp" + image: "${IMAGE_UBUNTU_X86_64}" + machineType: "${GCP_HI_PERF_MACHINE_TYPE}" # setEnvVar('ONLY_DOCS', isGitRegionMatch(patterns: [ '(.*\\.(asciidoc|md)|deploy/kubernetes/.*-kubernetes\\.yaml)' ], shouldMatchAll: true).toString()) diff --git a/.buildkite/deploy/kubernetes/scripts/install-kind.sh b/.buildkite/deploy/kubernetes/scripts/install-kind.sh index 0da8076d0505..2584b41b319c 100755 --- a/.buildkite/deploy/kubernetes/scripts/install-kind.sh +++ b/.buildkite/deploy/kubernetes/scripts/install-kind.sh @@ -7,6 +7,8 @@ KIND_VERSION=${KIND_VERSION:?$MSG} HOME=${HOME:?$DEFAULT_HOME} KIND_CMD="${HOME}/bin/kind" +echo "---Kind setup starts here" + if command -v kind then set +e diff --git a/.buildkite/hooks/pre-command b/.buildkite/hooks/pre-command index 71d862d06fcf..2dd58b9d6923 100644 --- a/.buildkite/hooks/pre-command +++ b/.buildkite/hooks/pre-command @@ -41,6 +41,12 @@ if [[ "$BUILDKITE_PIPELINE_SLUG" == "filebeat" || "$BUILDKITE_PIPELINE_SLUG" == git config user.name "$github_username" git config user.email "$github_email" fi + + if [[ "$BUILDKITE_STEP_KEY" == "k8s-test" ]]; then + echo "--- Installing kind" + retry_with_count 5 .buildkite/deploy/kubernetes/scripts/install-kind.sh + retry_with_count 5 .buildkite/deploy/kubernetes/scripts/install-kubectl.sh + fi fi if [[ "$BUILDKITE_PIPELINE_SLUG" == "beats-metricbeat" || "$BUILDKITE_PIPELINE_SLUG" == "beats-libbeat" || "$BUILDKITE_PIPELINE_SLUG" == "beats-packetbeat" || "$BUILDKITE_PIPELINE_SLUG" == "beats-winlogbeat" || "$BUILDKITE_PIPELINE_SLUG" == "beats-xpack-libbeat" || "$BUILDKITE_PIPELINE_SLUG" == "beats-xpack-metricbeat" || "$BUILDKITE_PIPELINE_SLUG" == "beats-xpack-packetbeat" || "$BUILDKITE_PIPELINE_SLUG" == "beats-xpack-winlogbeat" || "$BUILDKITE_PIPELINE_SLUG" == "beats-xpack-dockerlogbeat" || "$BUILDKITE_PIPELINE_SLUG" == "beats-xpack-auditbeat" ]]; then