Jenkinsfile-GitLab-Container: declare local vars in slave job triggers
Declare `localStatus` and `localResult` as local variables in `triggerSlaveJob` and `triggerCN5GSlaveJob` functions by adding `def`. This prevents unintended use of global variables in pipeline and avoids potential variable leakage or conflicts between stages. Follows the Jenkins recommendation: Did you forget the `def` keyword? WorkflowScript seems to be setting a field named localStatus (to a value of type RunWrapper) which could lead to memory leaks or other issues. Did you forget the `def` keyword? WorkflowScript seems to be setting a field named localResult (to a value of type String) which could lead to memory leaks or other issues.
Showing
Please register or sign in to comment