In the previous chapter, we studied the on the details about what is Jenkins, its usage and best practices to be made while working with Jenkins. Now, let us see configuring Jenkins in our local machines.
在上一章中,我们详细研究了什么是Jenkins,其用法以及与Jenkins合作时应采取的最佳做法。 现在,让我们看看在本地计算机中配置Jenkins。
Note : The below steps shows how to install and configure Jenkins a windows environment and using Apache Tomcat web server.
注意:以下步骤显示了如何在Windows环境中安装和配置Jenkins以及如何使用Apache Tomcat Web服务器。
詹金斯设置 (Jenkins Setup)
Download the latest Jenkins.war from https://jenkins-ci.org/. Towards the right top click on the link latest and greatest to download the latest war file.
从https://jenkins-ci.org/下载最新的Jenkins.war。 在右上方,单击最新和最重要的链接以下载最新的war文件。
Deploy the Jenkins.war file in the local web server of our machine. E.g. Tomcat
在我们机器的本地Web服务器上部署Jenkins.war文件。 例如Tomcat
Start the server and open the browser and hit the URL http://localhost:8080/jenkins
启动服务器并打开浏览器,然后单击URL http:// localhost:8080 / jenkins
Click on the create new jobs link to configure a project for build automation. Enter the details of the project as shown below and click OK.
单击“ 创建新作业”链接以配置用于构建自动化的项目。 输入项目的详细信息,如下所示,然后单击“确定”。
In the next page, fill all the required details like - description, path of the project's pom.xml and other details and click save.
在下一页中,填写所有必需的详细信息,例如-描述,项目的pom.xml的路径以及其他详细信息,然后单击“保存”。
A project/job is created in Jenkins. As shown below:
在詹金斯中创建了一个项目/职位。 如下所示:
Click on the Build now option as shown above. This will read the pom.xml and pull out the latest code and executes a build process and generates the jar/war file accordingly.
单击上面所示的“立即构建”选项。 这将读取pom.xml并提取最新代码,并执行构建过程并相应地生成jar / war文件。
Click on the build number link and it opens up the build details. Click on the console output to see the logs of the build.
单击内部版本号链接,它会打开内部版本详细信息。 单击控制台输出以查看生成的日志。
翻译自: https://www.studytonight.com/jenkins/configuring-jenkins