Skip to content

Commit

Permalink
added kind setup
Browse files Browse the repository at this point in the history
  • Loading branch information
oakrizan committed Mar 20, 2024
1 parent 970138d commit 4fbfaaf
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .buildkite/deploy/kubernetes/deploy-k8s-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
2 changes: 2 additions & 0 deletions .buildkite/deploy/kubernetes/scripts/install-kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4fbfaaf

Please sign in to comment.