functions: Use method instead of global var
Apparently variables are not expected to be accessible outside the library
definition. Instead, return a static list of strings from a function.
Change-Id: Ic9ebcad2a58675038e2cfc1ce2ccb68c2c76831e
diff --git a/cicd/pipelines/tasks/task_publish_unstable.jenkins b/cicd/pipelines/tasks/task_publish_unstable.jenkins
index 0a3d91a..4be1fe1 100644
--- a/cicd/pipelines/tasks/task_publish_unstable.jenkins
+++ b/cicd/pipelines/tasks/task_publish_unstable.jenkins
@@ -57,7 +57,7 @@
updateCorePublish();
- for (board in functions.SupportedBoards) {
+ for (board in functions.getSupportedBoards()) {
updateBspPublish(board);
}
}
diff --git a/vars/functions.groovy b/vars/functions.groovy
index 8f2ce4e..07c3759 100644
--- a/vars/functions.groovy
+++ b/vars/functions.groovy
@@ -1,9 +1,11 @@
#!/usr/bin/env groovy
-def SupportedBoards = [
- 'enterprise',
- 'excelsior'
-]
+List<String> getSupportedBoards() {
+ return [
+ 'enterprise',
+ 'excelsior'
+ ]
+}
String generateDateStamp() {
def date = new Date()