From 0625194fc96cfc8e1ac3d63a3a52b3d60a2ca3d1 Mon Sep 17 00:00:00 2001 From: Jean-Christophe LOSAPIO Date: Thu, 20 Feb 2025 17:42:04 +0100 Subject: [PATCH] add variable in Dockerfile to prepare renovate integration --- Dockerfile | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index f5a5b65..f386b5a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,22 @@ # Build the k6 binary with the extension FROM golang:1.23.4 as builder -RUN go install go.k6.io/xk6/cmd/xk6@latest -RUN xk6 build --output /k6 --with github.com/GhMartingit/xk6-mongo@v0.1.3 --with github.com/grafana/xk6-sql-driver-postgres@v0.1.0 --with github.com/grafana/xk6-sql-driver-mysql@v0.1.0 --with github.com/grafana/xk6-sql@v1.0.1 --with github.com/grafana/xk6-loki@v1.0.0 +ENV GRAFANA_K6_VERSION="0.56.0" +ENV XK6_MONGO_VERSION="0.1.3" +ENV XK6_SQL_DRIVER_POSTGRES_VERSION="0.1.0" +ENV XK6_SQL_DRIVER_MYSQL_VERSION="0.1.0" +ENV XK6_SQL_VERSION="1.0.1" +ENV XK6_LOKI_VERSION="1.0.0" +ENV XK6_BUILDER_VERSION="0.14.3" + +RUN go install go.k6.io/xk6/cmd/xk6@v${XK6_BUILDER_VERSION} +RUN xk6 build --output /k6 \ + --with github.com/GhMartingit/xk6-mongo@v${XK6_MONGO_VERSION} \ + --with github.com/grafana/xk6-sql-driver-postgres@v${XK6_SQL_DRIVER_POSTGRES_VERSION} \ + --with github.com/grafana/xk6-sql-driver-mysql@v${XK6_SQL_DRIVER_MYSQL_VERSION} \ + --with github.com/grafana/xk6-sql@v${XK6_SQL_VERSION} \ + --with github.com/grafana/xk6-loki@v${XK6_LOKI_VERSION} # Use the operator's base image and override the k6 binary -FROM grafana/k6:0.56.0 +FROM grafana/k6:${GRAFANA_K6_VERSION} COPY --from=builder /k6 /usr/bin/k6 \ No newline at end of file