diff --git a/backend/windmill-common/src/variables.rs b/backend/windmill-common/src/variables.rs index 17246ca936..c922d94b07 100644 --- a/backend/windmill-common/src/variables.rs +++ b/backend/windmill-common/src/variables.rs @@ -10,7 +10,7 @@ use magic_crypt::{MagicCrypt256, MagicCryptTrait}; use serde::{Deserialize, Serialize}; use sqlx::{Postgres, Transaction}; -use crate::{BASE_URL, DB}; +use crate::{worker::WORKER_GROUP, BASE_URL, DB}; lazy_static::lazy_static! { pub static ref SECRET_SALT: Option = std::env::var("SECRET_SALT").ok(); @@ -300,6 +300,12 @@ pub async fn get_reserved_variables( description: "OIDC JWT token (EE only)".to_string(), is_custom: false, }, + ContextualVariable { + name: "WM_WORKER_GROUP".to_string(), + value: WORKER_GROUP.clone(), + description: "name of the worker group the job is running on".to_string(), + is_custom: false, + }, ].into_iter().chain( sqlx::query_as::<_, (String, String)>( "SELECT name, value FROM workspace_env WHERE workspace_id = $1", )