Skip to content

Commit

Permalink
feat: use fixed version for xk6 (#145)
Browse files Browse the repository at this point in the history
* feat: use fixed version for xk6

Signed-off-by: Jorge Turrado <[email protected]>

* fix version

Signed-off-by: Jorge Turrado <[email protected]>

---------

Signed-off-by: Jorge Turrado <[email protected]>
  • Loading branch information
JorTurFer authored Dec 4, 2023
1 parent 50f35f3 commit 1bf7429
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
KEDA_TOOLS_GO_VERSION = 1.20.8
K6_VERSION = v0.47.0

IMAGE_REGISTRY ?= ghcr.io
IMAGE_REPO ?= kedacore
Expand Down Expand Up @@ -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) .
5 changes: 3 additions & 2 deletions k6-runner/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 1bf7429

Please sign in to comment.