From 1bf7429d2dac4c5c5fd5e44c8b4eaf39b2737926 Mon Sep 17 00:00:00 2001 From: Jorge Turrado Ferrero Date: Mon, 4 Dec 2023 11:19:27 +0100 Subject: [PATCH] feat: use fixed version for xk6 (#145) * feat: use fixed version for xk6 Signed-off-by: Jorge Turrado * fix version Signed-off-by: Jorge Turrado --------- Signed-off-by: Jorge Turrado --- Makefile | 5 +++-- k6-runner/Dockerfile | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 38c1962..03ad3cf 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ KEDA_TOOLS_GO_VERSION = 1.20.8 +K6_VERSION = v0.47.0 IMAGE_REGISTRY ?= ghcr.io IMAGE_REPO ?= kedacore @@ -36,7 +37,7 @@ push-keda-tools: ################################################## build-keda-k6-runner: - docker build -f k6-runner/Dockerfile -t $(IMAGE_KEDA_K6_RUNNER):latest -t ${IMAGE_KEDA_K6_RUNNER}:$(IMAGE_TAG) . + docker build -f k6-runner/Dockerfile -t ${IMAGE_KEDA_K6_RUNNER}:$(K6_VERSION) --build-arg K6_VERSION=$(K6_VERSION) . push-keda-k6-runner: - docker buildx build --push --platform=${BUILD_PLATFORMS} -f k6-runner/Dockerfile -t ${IMAGE_KEDA_K6_RUNNER}:latest -t ${IMAGE_KEDA_K6_RUNNER}:$(IMAGE_TAG) . + docker buildx build --push --platform=${BUILD_PLATFORMS} -f k6-runner/Dockerfile -t ${IMAGE_KEDA_K6_RUNNER}:$(K6_VERSION) --build-arg K6_VERSION=$(K6_VERSION) . diff --git a/k6-runner/Dockerfile b/k6-runner/Dockerfile index f4bffcf..892701f 100644 --- a/k6-runner/Dockerfile +++ b/k6-runner/Dockerfile @@ -4,10 +4,11 @@ RUN apk --no-cache add git ARG TARGETOS ARG TARGETARCH +ARG K6_VERSION RUN go install go.k6.io/xk6/cmd/xk6@latest -RUN GOOS="${TARGETOS}" GOARCH="${TARGETARCH}" xk6 build \ +RUN GOOS="${TARGETOS}" GOARCH="${TARGETARCH}" xk6 build "${K6_VERSION}" \ --output /tmp/k6 \ - --with github.com/grafana/xk6-kubernetes@e666215 \ + --with github.com/grafana/xk6-kubernetes@latest \ --with github.com/grafana/xk6-disruptor@latest \ --with github.com/JorTurFer/xk6-input-prometheus@latest