summaryrefslogtreecommitdiffstats
path: root/src/config
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@atos.net>2021-03-01 10:16:42 +0100
committerMatthias Beyer <mail@beyermatthias.de>2021-03-01 17:42:26 +0100
commit2d72cbed2495517dba84ec4d46e5f521ff46412b (patch)
tree6a0457bee61f0fb30e49ca3e8cdd1953399e83e9 /src/config
parent6387e8f333aa9f5b65a5ebb8ce3d8ebeaa0fa58c (diff)
Add feature to pass git author and git commit information to container
This patch implements the feature to be able to pass author and commit hash information from the repository to the container. This can be used to set packager or package description commit hash inside the build container, if desired. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
Diffstat (limited to 'src/config')
-rw-r--r--src/config/container_config.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/config/container_config.rs b/src/config/container_config.rs
index f117351..36cfe1a 100644
--- a/src/config/container_config.rs
+++ b/src/config/container_config.rs
@@ -24,4 +24,13 @@ pub struct ContainerConfig {
/// Allowed environment variables (names)
#[getset(get = "pub")]
allowed_env: Vec<EnvironmentVariableName>,
+
+ /// Pass the current git author to the container
+ /// This can be used to the the "packager" name in a package, for example
+ #[getset(get = "pub")]
+ git_author: Option<EnvironmentVariableName>,
+
+ /// Pass the current git hash to the container
+ #[getset(get = "pub")]
+ git_commit_hash: Option<EnvironmentVariableName>,
}