Its possible, but Its somewhat a messy syntax.
# global variable
def Myclosure
Node {
# has to be in a node
Checkout scripts
Myclosure = # load scripts and call them
}
# call the closure.
Myclosure()
See triggering manual load
https://github.com/jenkinsci/pipeline-plugin/blob/master/TUTORIAL.md
I dont think its possible to execute plain pipeline scripts. You always have to define a function (closure) thats stored and later invoked
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b4f6e051-1cf7-4455-be12-9c7a52366b9e%40googlegroups.com.
The way I am planning on doing this is with the findFiles and load functions. I'll use findFiles in my Jenkinsfile to look for other build files further in the repo and create jobs from those to run. The other files will not necessarily be the same setup as a Jenkinsfile, but will use the pipeline syntax.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a855fa87-29a9-46e5-9309-f0a0fff4e781%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/nQ6p7xw5jqI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/9b429ce4-cffb-47f0-b8cd-ae7b0db2465a%40googlegroups.com.
I've tried the seed job-dsl method previously. Some automation was better then no automation, but I think the Jenkinsfile in repo is even better. If I make a change to the Jenkinsfile, that change can be isolated in each environment/branch until it has been promoted to next step. If I have one master seed job it's harder for me to control the promotion between environments.
I've tried the seed job-dsl method previously. Some automation was better then no automation, but I think the Jenkinsfile in repo is even better. If I make a change to the Jenkinsfile, that change can be isolated in each environment/branch until it has been promoted to next step. If I have one master seed job it's harder for me to control the promotion between environments.One other thing to Note, Job DSL, and Pipeline are both groovy, but they are not the same DSL. That may not matter in this case because you are orchestrating pipelines with job DSL.
--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/nQ6p7xw5jqI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a219dde2-d90c-4ab9-a738-51ab6487a800%40googlegroups.com.