- Continuous Integration,Delivery,and Deployment
- Sander Rossel
- 716字
- 2021-07-02 15:42:13
Configuring Jenkins
The next page will ask you if you want to install suggested plugins, but you do not want that. In fact, you do not want anything at this moment, so just close the popup (on the Jenkins website, not the browser). Jenkins will inform you that it has created an admin user with the password you used earlier and then take you to the Jenkins home page (logged in as admin, as seen at the top-right). On the homepage find Manage Jenkins (in the left side menu) and, from Manage Jenkins, go to Manage Users. You should see your admin user, so you can either select it and then go to Configure on the left-hand side menu, or you can click on the cog on the right-hand side of the admin user to be taken to the configuration screen directly. On the configuration screen, you can enter (and re-enter) a password you can actually remember (like 1234) and save your settings. Try logging out (in the top right of the screen) and logging back in without your new password.
The next thing we are going to do is try and get our Git project pulled into Jenkins. Jenkins alone does not do a lot. Luckily, there is a Jenkins plugin for practically everything. Go to Manage Jenkins and from there to Manage Plugins. Many plugins require other plugins to be installed too, but Jenkins will handle that for you. You can browse through all the different plugins at your leisure, but for now we are interested in just one plugin, which is the Git plugin. You can filter for Git in the upper-right corner (NOT the Search bar, quite confusing). You will find GitHub, GitLab (which we will look at later), Git client, Git server... just a whole lot of Git really. We want the vanilla Git Plugin. So check it and hit Install without restart at the bottom. This will install the Git Plugin and thirteen other plugins that are needed to run the Git plugin.
Now, we can create a job. Go back to the Jenkins homepage and either click New item on the left-hand side menu or click on Please create new jobs to get started right in the middle of your screen. Choose Freestyle project and a name such as Test or whatever. The next screen is the job configuration screen. What you see here depends on your kind of job and on the plugins you have installed. The only thing we will do right now is get our source from Git and into Jenkins. Under Source Code Management, select Git. You can find the Repository URL in your GitLab project; mine is http://ciserver/sander/test.git. Then, choose to add a credential. We want the Username with password kind and your username and password are the ones you use to log in to GitLab. Also, give it an ID so you can recognize it later. That should do the trick. Save your configuration and you will be taken to the project page. On the left-hand side menu, you can view the workspace (which includes the files that are currently in your job). You do not have a workspace yet, but that will change as soon as you build the job. So click Build Now and you will notice that a build is added to the build history and that, when you refresh your workspace, you will see your text files.
Congratulations, you have successfully installed and configured Jenkins! That is all we are going to do with Jenkins for now, but we will be using Jenkins a lot throughout this book.
- Learning Docker
- JavaScript語言精髓與編程實(shí)踐(第3版)
- Xcode 7 Essentials(Second Edition)
- Cassandra Data Modeling and Analysis
- Java Web應(yīng)用開發(fā)技術(shù)與案例教程(第2版)
- Web Application Development with MEAN
- Hands-On Functional Programming with TypeScript
- Mastering Drupal 8 Views
- 前端HTML+CSS修煉之道(視頻同步+直播)
- SQL基礎(chǔ)教程(第2版)
- JSP程序設(shè)計(jì)實(shí)例教程(第2版)
- 從Excel到Python數(shù)據(jù)分析:Pandas、xlwings、openpyxl、Matplotlib的交互與應(yīng)用
- Python計(jì)算機(jī)視覺和自然語言處理
- App Inventor少兒趣味編程動(dòng)手做
- IBM RUP參考與認(rèn)證指南