Generate explicit seed job and run it once during start-up
See original GitHub issueFeature Request
I have multiple groovy job DSL scripts stored in a Git repository like this:
.
└───job-dsl
javaapi-job-dsl.groovy
webapps-job-dsl.groovy
webservices-job-dsl.groovy
I would like to define only one pipeline seed job which checks out the Git repository and runs all groovy scripts it can find under the job-dsl
sub-directory once during JCASC start-up phase (or when triggered manually through the UI or automatically (SCM Poll) later on).
Creating this seed job seems possible with the jobs
directive but AFAICS there is no possibility to have it run once during the JCASC start-up phase, correct?
Would it make sense to add this feature or is there something fundamentally wrong in my approach?
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (4 by maintainers)
Top Results From Across the Web
Jenkins Tutorial: Implementing a Seed Job - HappyCoders.eu
Tutorial, part 3: Configure Jenkins Script Security - Create a seed job to automatically generate Jenkins jobs for new Java projects.
Read more >Start jenkins job immediately after creation by seed job
To queue the job only if it's new, you need to use the Jenkins API to test if the job already exists.
Read more >Random Seeds and Reproducibility - Towards Data Science
Completely deterministic! Once you set the random seed to 42 (obviously!), the first four generated integers are 10, 1, 0, and 4, in...
Read more >How To Automate Jenkins Job Configuration Using Job DSL
In this step, you will run the seed job and confirm that the jobs defined within the Job DSL script are indeed created....
Read more >Numpy Random Seed, Explained - Sharp Sight
Once you understand pseudo-random numbers, numpy.random.seed will make more sense. WTF is a pseudo-random number? At the risk of being a bit of ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Well I may have found a workaround that works for me. Using startup-trigger-plugin:2.9.3 and adding a trigger to my pipeline I was able to get the job to start on start up. There are still issues with trying to queue the job with - script: queue(‘unit-tests’).
we use the following
queue
command to trigger the DSL run after the JCasC plugin runs.However it only seems to work 50% of the time…
After some additional research this could be related to https://github.com/jenkinsci/configuration-as-code-plugin/issues/619
I wonder if I’m just using an older version of the JCasC plugin.