This is currently my jenkinsfile setup for the jenkins pipeline:
def getIds() { ids_list = [] //if-else logic here to add into ids_list return ids_list } p