In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "how to sign the Jenkins continuous integration environment based on Windows system". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to sign the Jenkins continuous integration environment based on Windows system".
First, download and install Jenkins: https://jenkins.io/
After the installation is complete, you can go to the administration page by visiting http://hostname:8080. Select: Manage Jenkins ".
Select "Configure Global Secuity" in the list on the right, select "Allow user to sign up", and then you can register the account to which you want to grant permissions in advance. If the registration of a new administrative account is not allowed in the future, cancel this selection.
Next, under agents, expand the agent agreement and select all of them. When checked here, "Java Web Start Agent" is enabled, otherwise it will be invisible when the slave is created. (to use this agent, you also need to install Java in advance and download an installation from Java's official website.)
Go back to the "Manage Jenkins" interface, select "Manage Node", click "New Node" to create a new slave, here we select "Permanent Agent", or you can choose to copy the new node from the existing slave. Fill in the name, remote root directory and label, and select the startup method as shown in the figure. The remote directory here is used to store Jenkins client running files. Other default values are fine:
All right, a node will be created here. We can go back to the Node management interface, where the newly created node is unconnected, you can visit your Jenkins page on your other server or on your local machine, click "Launch" to connect to node, and install it as a local service. If you are a Win10 system, there will be an installation error. Don't worry, restart your IE or the Edge as an administrator, and then visit Jenkins again to try to connect and install. When you think you want to enable this installation of service, stop the service first, and then type "sc delete servicename" in the cmd command window to delete the service. Servicename can be viewed in the right-click property of service.
Once the node is created, we are connected to a server, and then we need to create the job to do what we need to do.
Go back to the Jenkins main page and click "New Item". Here I choose to use "Freestyle Project". After editing the project name and description, we can clearly define the outdated build. Here I define it as keeping build within 7 days, and stipulating that only 10 build can be retained at most.
As mentioned earlier, the CI system responds to the trigger condition returned by git, so you need to set a parameter to receive the response returned, and set the node on which to execute the construction task, that is, enter the Label set when the node was created:
In addition to the default settings when creating a node, we can also set a custom workspace here, where the acquired code will be stored:
In the source code control item, we select Git, set the corresponding git project url and access username and password, and select the default master for the branch:
After getting the code, select the trigger mode, and if the polling method is scheduled, select "Poll SCM" and set the interval. I need to respond every time I submit. Here I choose to trigger "Trigger builds remotely" remotely and set a token value to be used.
At this point, we need to go to the Git website code management settings page, add a "Hooks & services", and enable "Pull request". The format of Payload URL is set according to the format prompted under token set above:
After completing the above steps, the running environment for Job is basically set up, and the next step is to build automation and run scripts.
Go back to the Job editing page, go further and click "Add build step". In the drop-down box, you can see that the scripting languages supported by Jenkins are very rich. We will use Window batch and Widows PowerShell here. Write your business processing script here and save it. For example, output "Jenkins CI", type "echo Jenkins CI" in the Windows batch box, and save it.
Finally, you need to send messages automatically after the script is complete. Let's see how it is configured:
Before configuring mail notifications, we need to go to "Configure System" to set up the basic configuration of the mail system.
First, fill in the Jenkins access address and the sender's email address.
Next, set the SMTP mail server and some default values, including receiving object, subject, content, and so on. In this way, the simplest mail delivery configuration is complete. Later, we will set up specific email notifications.
Go back to the Job editing page, find "Post-build Actions" and select "Editable Email Notification". Set the actual recipient, content format, and default theme. And set the default content, which can be parameterized and formatted with environment variables (not explained in detail here).
If you need to send an attachment, you can also set the path and name of the attachment. Finally, set the trigger condition for sending email to OK.
In this way, a complete CI system under the Windows platform is established.
Thank you for reading, the above is the content of "how to deploy the Jenkins continuous integration environment based on Windows system". After the study of this article, I believe you have a deeper understanding of how to build the Jenkins continuous integration environment based on Windows system, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.