From dd6be011609937477516344d217a24aadf92fcd2 Mon Sep 17 00:00:00 2001 From: Sascha Roloff Date: Thu, 8 May 2025 13:39:53 +0200 Subject: Invocation logging: add new field context variables It allows to specify a list of environment variables, which are captured at invocation time and stored as key-value pairs in the metadata file. This allows to get some information about the invocation context such as username, merge-request ID or source branch (on a CI runner), or others. --- share/man/just-mrrc.5.md | 6 ++++++ share/man/just-profile.5.md | 5 +++++ 2 files changed, 11 insertions(+) (limited to 'share') diff --git a/share/man/just-mrrc.5.md b/share/man/just-mrrc.5.md index 956d8ad3..662717b7 100644 --- a/share/man/just-mrrc.5.md +++ b/share/man/just-mrrc.5.md @@ -183,6 +183,12 @@ The just-mrrc is given by a JSON object. directory the metadata file should be stored. If not given, no metadata file will be written. See **`just-profile`**(5) for details of the format. + - *`"context variables"`* An optional list of environment variables, + which are captured at invocation time and stored as key-value pairs + in the metadata file. These variables do not affect the build in + any way. Instead, they are supposed to provide useful context + information about the invocation like username, merge-request ID or + source branch. - *`"--dump-graph"`* A file name specifying the file in the invocation-log directory for an invocation-specific `--dump-graph` option. diff --git a/share/man/just-profile.5.md b/share/man/just-profile.5.md index 8fc1989e..54f1a10c 100644 --- a/share/man/just-profile.5.md +++ b/share/man/just-profile.5.md @@ -29,6 +29,11 @@ The metadata file contains the following information. - For the key *`"time"`* the time of the invocation in seconds since the epoch. +- For the key *`"context"`* a map of the environment variables requested + to be included in the metadata file with the variable name as key and + the value of the variable as value (see *`"context variables"`* field + of the *`"invocation log"`* key in the **`just-mrrc`**(5) file). + Profile file ------------ -- cgit v1.2.3