Skip to content

Commit

Permalink
[buildkite] Fix integration docker test in buildkite pipeline (#4281)
Browse files Browse the repository at this point in the history
* uncomment integration docker test in pipeline

* change name to label

* fix indent
  • Loading branch information
kentzeng12 authored Jul 25, 2024
1 parent 9a4b26a commit c81f1ea
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 34 deletions.
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

0 comments on commit c81f1ea

Please sign in to comment.