Hi, Enrique.
One approach is to create your custom shell macro, which would
receive both include list and actual script (not tested, just an
example):
Macro file:
----------------------------------
builder:
name: my-shell
builders:
- shell: !j2: |
#/bin/bash -e
{{ for file in includes }}
source "{{ file }}"
{{ endfor }}
{{ shell-script }}
----------------------------------
Job template file:
----------------------------------
builders:
- my-shell:
includes:
- functions-1.sh
- functions-2.sh
shell-script:
# echo_notification function defined in the
above functions.sh file
echo_notification hello
----------------------------------
You can also use defaults for includes, or have some of them
hardcoded in macro, etc.
Vsevolod.
--
You received this message because you are subscribed to the Google Groups "jenkins-job-builder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkins-job-bui...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkins-job-builder/fa546e47-e2b6-4f1a-a05a-c6738b257052n%40googlegroups.com.