- we can find latest Jenkins version from https://www.jenkins.io/download/, if we select Docker, to use the latest LTS:
docker pull jenkins/jenkins:lts
- git clone https://github.com/zhuby1973/jenkins-docker-groovy.git
root@ubunu2004:~/jenkins-docker-groovy# ls build.sh config.xml create-seed-job.groovy Dockerfile plugins.groovy plugins.txt README.md security.groovy seeddsl.groovy root@ubunu2004:~/jenkins-docker-groovy# cat Dockerfile FROM jenkins/jenkins:lts ENV JAVA_OPTS="-Djenkins.install.runSetupWizard=false" COPY security.groovy /usr/share/jenkins/ref/init.groovy.d/security.groovy COPY seeddsl.groovy /usr/share/jenkins/seeddsl.groovy COPY config.xml /usr/share/jenkins/seed-job-config.xml COPY create-seed-job.groovy /usr/share/jenkins/ref/init.groovy.d/create-seed-job.groovy COPY plugins.txt /usr/share/jenkins/ref/plugins.txt RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/ref/plugins.txt root@ubunu2004:~/jenkins-docker-groovy# cat build.sh #!/bin/bash docker rm -f `docker ps -a -q` docker build -t local/jenkins . && docker run --name jenkins -d -p 80:8080 -p 50000:50000 local/jenkins && docker logs -f `docker ps -a -q`
3. sh build.sh you will get Jenkins Docker image build and running on port 80, you can login with admin/admin (which we created from security.groovy
4. run “seed” job, you will find another job “DSL-Tutorial-1-Test” created successfully!
5. we installed two important plugins: Seed Jenkins plug-in and Authorize Project for this automation. you can manually approve groovy script in “In-process Script Approval”, or you can install Authorize Project, then update “Configure Global Security” => “Access Control for Builds” as below:
6. reference link:
https://plugins.jenkins.io/job-dsl/
https://github.com/jenkinsci/seed-plugin/wiki/Generation
https://github.com/jenkinsci/job-dsl-plugin/wiki/Tutorial—Using-the-Jenkins-Job-DSL
Sweet web site, super design and style, very clean and apply pleasant. Phil Christos Bain
You are my inspiration , I own few web logs and often run out from to brand. Daphna Tomas O’Toole
Amazing! Its actually remarkable paragraph, I have got much clear idea about from this piece of writing. Austina Lionello Ji
Looking forward to reading more. Great blog. Really looking forward to read more. Keep writing. Glynis Nathan Ainsworth
Marvelous, what a blog it is! This blog gives valuable data to us, keep it up. Sophia Jehu Christen
Thank you Sophia!
Im grateful for the blog post. Much thanks again. Great. Daisie Clarence Marsha
Good respond in return of this matter with real arguments and telling the whole thing concerning that. Vikki Ward Tien
There is visibly a bunch to identify about this. I suppose you made certain nice points in features also. Ashely Yurik Jurgen
Muchos Gracias for your post. Thanks Again. Fantastic. Dix Sheffie Danuloff
You are welcome Dix!
Hey, thanks for the blog. Really thank you! Awesome. Antonina Eddy Eugenides
Hello there. I discovered your site by the use of Google even as searching for a related matter, your website got here up. It appears great. I have bookmarked it in my google bookmarks to come back then. Bryna Lanny Elora
Someone essentially help to make seriously articles I would state. This is the first time I frequented your web page and thus far? I amazed with the research you made to make this particular publish incredible. Great job! Tomi Giordano Kirkwood
I have read so many posts about the blogger lovers except this piece of writing is genuinely a fastidious post, keep it up. Ruthy Klement Hubble
I have been exploring for a little bit for any high-quality articles or blog posts on this sort of house . Filide Germain Josi
Wonderful beat ! I would like to apprentice while you amend your site, how can i subscribe for a blog site? The account helped me a acceptable deal. I had been tiny bit acquainted of this your broadcast provided bright clear concept Rose Keary Crary
Really appreciate you sharing this blog. Much obliged. Erinna Thebault Buschi Noelyn Kiley Lucila
Greetings! Very useful advice in this particular article! It is the little changes which will make the most significant changes. Many thanks for sharing! Gert Stearne Sladen
Wow, amazing blog format! How lengthy have you been running a blog for? you make running a blog look easy. The entire glance of your website is excellent, as neatly as the content! Delphinia Nevil Adna
You actually make it seem so easy with your presentation but I find this matter to be really something which I think I would never understand. It seems too complicated and very broad for me. I am looking forward for your next post, I will try to get the hang of it! Laney Grantley Theran
Hi colleagues, good post and pleasant urging commented at this place, I am truly enjoying by these. Winnah Cleveland Ethbinium
Hello there! This article could not be written much better! Looking at this post reminds me of my previous roommate! He constantly kept talking about this. I most certainly will send this article to him. Fairly certain he will have a great read. Thanks for sharing! Berti Kerwinn Liman