0

I am deploying Environment Modules here at my company and would like to make sure that all use models are covered adequately. Since Groovy is not a supported language by modulecmd.tcl, and tampering with the code base is not an option, I'm wondering what would be simplest way to expose an environment to a Jenkins executor that is based on source $(module load <modulefile>) (BASH)?

Some possibilities:

  1. write a translator for stdout of subprocess .../modulecmd.tcl bash <modulefile>
  2. write a translator for stdout of subprocess module load <modulefile> | env; would need to do some diff'ing to support unload
  3. plugin?

I've looked at "environment script" and "environment injector" plugins but can't test these w/o upgrading Jenkins (plugins are not compatible). I got the impression scripts are supported but would have to output in specific format (more code to write).

Has anyone here been able to integrate Env Modules into a Pipeline, or could give some guidance as to best practice when needing to import an environment that is natively based on sourcing script output that is shell/interpreter specific?

4

1 回答 1

0

现在在 Environment Modules 中有一张 Groovy 支持的票:https ://github.com/cea-hpc/modules/issues/446

于 2022-02-23T08:34:35.263 回答