是否可以为 Jenkins 中的文件夹中的所有项目设置一些环境变量?

Is it possible to set some environment variables for all projects in a folder in Jenkins?

我在 Jenkins 2.32.1 的一个文件夹中有一组项目,我希望它们(在这个文件夹中)在构建运行时加载几个环境变量。这可能吗?我有文件夹插件并查看了但没有看到任何地方可以配置它。

是的,这是可能的。从管理 Jenkins 中,找到 全局属性 。下面有一个 环境变量 的复选框。 Select key-value 对列表 并添加你的。

...根据 CloudBees 的说法,该功能在 "non-free" Folders-Plus 版本中可用。 go.cloudbees.com/docs/cloudbees-documentation/cje-user-guide‌ /…

是的,有可能,参见 https://wiki.jenkins.io/display/JENKINS/Folder+Properties+Plugin

A Jenkins plugin which allows users with config permission to define properties for a folder which can then be used by any jobs contained within it or any of its sub-folders.