From 26b6d3e8365fd74afb36de6075d8916aa2a22a83 Mon Sep 17 00:00:00 2001 From: arriven <20084245+Arriven@users.noreply.github.com> Date: Sun, 31 Jul 2022 17:42:58 +0300 Subject: [PATCH] add version to the context --- src/job/runner.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/job/runner.go b/src/job/runner.go index da4ab9b9..d50d2d38 100644 --- a/src/job/runner.go +++ b/src/job/runner.go @@ -37,6 +37,7 @@ import ( "github.com/Arriven/db1000n/src/job/config" "github.com/Arriven/db1000n/src/utils" "github.com/Arriven/db1000n/src/utils/metrics" + "github.com/Arriven/db1000n/src/utils/ota" "github.com/Arriven/db1000n/src/utils/templates" ) @@ -200,6 +201,7 @@ func (r *Runner) runJobs(ctx context.Context, cfg *config.MultiConfig, metric *m ctx = context.WithValue(ctx, templates.ContextKey("global_config"), r.globalJobsCfg) ctx = context.WithValue(ctx, templates.ContextKey("goos"), runtime.GOOS) ctx = context.WithValue(ctx, templates.ContextKey("goarch"), runtime.GOARCH) + ctx = context.WithValue(ctx, templates.ContextKey("version"), ota.Version) ctx = context.WithValue(ctx, templates.ContextKey("metrics"), metric) for j := 0; j < cfg.Jobs[i].Count; j++ {