This article deploys Jenkins+Maven+SVN+Tomcat through docker, installs Maven and its own OpenJDK on the base image Jenkins to form a new image, then checks out the project through SVN, and uses Jenkins' own plug-in or script to send the war package generated by Maven to the specified Tomcat's WebApps directory, and finally starts Tomcat to complete the automated deployment. Through the docker command: sudo docker run –d -p 9898:8080 -p 50000:50000 -v /alidata/projects/jenkins:/var/jenkins_home -u 0 jenkins exposes the port and mounts the container directory (to facilitate modification of the container) The Jenkins installation will prompt you to enter a password. This password will appear when Jenkins is started for the first time. You can copy and enter it. The rest of the default installation is not explained here. The following is an introduction to the use of Jenkins: For the first time use, you can click System Management à Click System Settings to make global settings. This is only set when global settings are needed. You can choose not to set it. In this way, when creating a project, you can make corresponding settings for each project. If you do not set it when creating a project, the setting mode in the system settings will be used. Regarding Global Tool Configuration, you can configure it according to the tool directory. If it is not available, Jenkins can automatically download it during the build. The Configure Global Security option is for permission management. You can set up automatic registration permissions to allow users to automatically register and perform project operations (operation service permissions have been enabled). Read settings: Abandon all the current settings in the memory and re-read from the configuration file. This is only used to re-read settings when you manually modify the configuration file. Manage plugins: Add, remove, disable or enable plugins to extend Jenkins functionality. The required plug-ins can be downloaded here. Currently, Jenkins provides a large number of plug-ins, which can basically meet the project requirements. If the plug-in download fails, you can download it from the official website: Official website plugin download address https://wiki.jenkins-ci.org/display/JENKINS/Plugins After downloading is complete, click Advanced and upload the plug-in: After the installation is complete, refresh the Jenkins WEB interface. Let’s create a new project and see: Our projects are all Maven projects, so select the Maven option, fill in the name of the project to be built, and confirm. Description: Fill in the description of the created project. GitHub project: The URL of the project hosted on GitHub. Throttle builds: Set the number and rate of builds within a specified time. Discard old builds: commonly used to avoid building more and more projects and occupying memory. In the source code management section, select SVN, fill in the URL and user password, and the project will be automatically checked out when it is built. In the Check-out Strategy section, select the SVN code update method. Readers can make changes according to their personal needs. Build triggers: This article mainly introduces the use of Build periodically and Poll SCM. Both of them are time schedules for periodically triggering builds. However, the function of Build periodically is that the project must be rebuilt when the set time is reached, but with Poll SCM, the build will only be performed if there is an update on SVN at the set time, otherwise it will not be built. The format of the set build time rule can be seen on the right? Help, detailed introduction. This is the Maven packaging command The build settings can send email notifications, and reports can be sent every time a build is completed. Please note that after the build, you need to enable the tomcat-users.xml permission in Tomcat This article is for beginners of Jenkins. Students who don't know Docker can change the startup steps to their own startup methods. The rest are the same. This article uses the software that comes with Jenkins for deployment. The advanced article will deploy through shell scripts edited by yourself. After all, they are all written by yourself and are easier to control. This is the end of this article about the tutorial for beginners on how to deploy Jenkins with docker. For more information about deploying Jenkins with docker, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: mysql implements importing only a specified table from the sql file of exported data
>>: Example code for element multiple tables to achieve synchronous scrolling
Table of contents 1. Check whether the docker env...
In my last post I talked about how to make a web p...
Data Sheet: Column to row: using max(case when th...
This article records the installation and configu...
Table of contents 1. Introduction to the Implemen...
Standalone hbase, let’s talk about it first. Inst...
In some interview experiences, you can often see ...
Achieve results Implementation Code html <div ...
Table of contents Preface Introduction to Session...
Table of contents 1. Vue life cycle 2. Hook funct...
MySQL DECIMAL data type is used to store exact nu...
Step 1: Change DATABASES in setting.py # Configur...
MySQL allows you to create multiple indexes on th...
Preface Before we begin, we should briefly unders...
1. Download the mysql-5.7.17-winx64.zip installat...