-
Notifications
You must be signed in to change notification settings - Fork 5k
Description
Follow up to #18592. In #18592, we set the MODULE environment variable at a global scope. As such, once the MODULE is determined and set, it gets used by all stages of the Jenkins CI pipeline. This can cause errors when the value of MODULE isn't valid for a a stage (e.g. X-Pack Filebeat doesn't implement the module specified in MODULE).
One fix would be to move the setting of MODULE from the global scope into each relevant stage of the Jenkins CI pipeline. We would only set it in those stages that implement Beats modules, viz. OSS Filebeat, OSS Metricbeat, OSS Auditbeat, X-Pack Filebeat, X-Pack Metricbeat, X-Pack Auditbeat, and X-Pack Winlogbeat. In each stage, the pattern used to determine whether module files have changed would need to be scoped to files relevant to that stage, e.g. x-pack/filebeat/module/* for the X-Pack Filebeat stage.