Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[buildkite] Fix integration docker test in buildkite pipeline #4281

Merged
merged 4 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 18 additions & 10 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,16 +139,24 @@ steps:
- |-
make clean lint
<<: *common
# - name: "Integration (:docker:)"
# command: make clean install-vendor-m3 docker-integration-test
# parallelism: 2
# env:
# CGO_ENABLED: 0
# GIMME_GO_VERSION: 1.18.x
# plugins:
# gopath-checkout#v1.0.1:
# import: github.com/m3db/m3
# <<: *common
- label: "Integration (:docker:)"
env:
CGO_ENABLED: 0
GIMME_GO_VERSION: 1.18.x
plugins:
docker-compose#v2.5.1:
run: app
workdir: /go/src/github.com/m3db/m3
kubernetes:
<<: *kubernetes
podSpec:
<<: *podSpec
containers:
- <<: *commandContainer
command:
- |-
make clean install-vendor-m3 docker-integration-test
<<: *common
- label: "M3 Cluster Integration Tests"
env:
CGO_ENABLED: 0
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM golang:1.18-bullseye

RUN apt-get update && apt-get install -y lsof
RUN apt-get update && apt-get install -y lsof netcat-openbsd docker.io jq
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ services:
- BUILDKITE_COMMIT
- BUILDKITE_PULL_REQUEST
- BUILDKITE_TAG
- BUILDKITE_PARALLEL_JOB=4
- BUILDKITE_PARALLEL_JOB_COUNT=4
- CODECOV_TOKEN
- SPLIT_IDX
- TOTAL_SPLITS
- GOPATH=/go
23 changes: 0 additions & 23 deletions scripts/docker-integration-tests/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,6 @@ TESTS=(
scripts/docker-integration-tests/prom_remote_write_backend/test.sh
)

# Some systems, including our default Buildkite hosts, don't come with netcat
# installed and we may not have perms to install it. "Install" it in the worst
# possible way.
if ! command -v nc && [[ "$BUILDKITE" == "true" ]]; then
echo "installing netcat"
NCDIR="$(mktemp -d)"

yumdownloader -y --destdir "$NCDIR" --resolve nc
(
cd "$NCDIR"
RPM=$(find . -maxdepth 1 -name '*.rpm' | tail -n1)
rpm2cpio "$RPM" | cpio -id
)

export PATH="$PATH:$NCDIR/usr/bin"

function cleanup_nc() {
rm -rf "$NCDIR"
}

trap cleanup_nc EXIT
fi

if [[ -z "$SKIP_SETUP" ]] || [[ "$SKIP_SETUP" == "false" ]]; then
scripts/docker-integration-tests/setup.sh
fi
Expand Down