Greetings,
I am working on simplification of pipeline flow in my team.
In Git I have 2 files: Jenkinsfile and steps.groovy.
In steps I have defined my pipeline steps in form of functions, e.g.:
def build(system){
> return {
> node ("BUILDER"){
> deleteDir()
> scm checkout
> env.BUILD_TARGET = architecture
> sh "builder/builder.sh"
>
> archive "*.zip"
> stash name: "build_artifacts", includes: "*.zip"
>
> }
> }
> }
>
> return this
>
In Jenkins I am checkouting Git repo, specific branch and run Jenkinsfile.
How can I make Jenkinsfile to consist only of functions calling like this:
> def steps = load "ci/steps.groovy"
>
> steps.build("linux")
>
> steps.build("linux2")
>
--
You received this message because you are subscribed to the Google Groups
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-dev/77dd7839-5121-482b-ae45-fa1646f2dd7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.