check Jenkins Configuration as Code
|
|
|
| | |
|
|
|
| |
Jenkins Configuration as Code
Jenkins – an open source automation server which enables developers around the
world to reliably build, test, an...
|
|
|
After installing the plugin, use the export to generate a 'representative'
piece of code for the type of jobs you want to use. Then you could run some
script to generate a new JCASC file with similar jobs, and import that. I
personally find the exact syntax of the JCASC yaml files still hard to
hand-write, but forsimple jobs like running a pipeline from SCM it's quite easy.
On Friday, June 12, 2020, 05:29:43 PM GMT+2, Al Silver
<[email protected]> wrote:
Thanks for all of the ideas. For now, I created a jenkins directory in my
pytest root directory (basically the root directory of the project). I then
created name specific directories under there for organization. Under those
directories, there are multiple jenkinsfiles (not named jenkinsFile). The
pipeline files call a python script which processes all of the parameters and
then generates a command line. The entire command line is stored as a variable
and then run through the shell. Glad I got it working and seems ok for now.
One thing I don't really like about the workflow is for each pipeline job that
is created, I still have to first create the job using the GUI and then I need
to manually enter the "Script Path" to point to the appropriate pipeline file.
Is there anyway to create the entire Jenkins Job in code so that when the
Jenkins GUI is opened up, the new jobs "magically" appear?
On Monday, June 1, 2020 at 11:37:46 AM UTC-4, Al Silver wrote:
I've used Jenkins a little but not in the traditional method of CI/CD. I'm
using Jenkins as a Web UI to run individual python scripts for networking
devices... Users would log into Jenkins and then select any one of numerous
Freestyle projects (with parameters) to run (there could be 100 or more...).
The job executes a shell which runs a pytest script that logs into (via ssh)
multiple networking devices and performs some actions... pretty straightforward
and it works ok but has some limitations. With that said, I think I'll have
more flexibility and power building and maintaining these jobs as pipelines and
treating them as code. My question is I guess I would need to convert my
pipelines into Jenkinsfiles? However, most of the docs I read show a single
Jenkinsfile (named "Jenkinsfile") I would need one for each job (a 100 or so).
I must be missing something here or not understanding. Can someone point in
the right direction for what I'm trying to accomplish?
ThxAl
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/ca571ee2-c842-4603-9c34-9a5b1dbd70d8o%40googlegroups.com.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/725072633.1201947.1592290321532%40mail.yahoo.com.