Web System automated deployment script and web deployment script

Source: Internet
Author: User

Web System automated deployment script and web deployment script

Web development projects, in addition to running locally, may often need to be deployed on servers.

I wrote a script for automatic deployment for your reference only.

You need to configure the path in many places. We recommend that you use the absolute path instead of the path where the script is executed.


#! /Bin/sh

# Delete the source code directory and update the latest code

Echo 'delete git project dir'
Rm-rf project
Echo 'delete project done'
Echo 'start clone git Project'
Git clone http://git.company.com/project.git


If [$? -Eq 0]; then
Echo 'git clone OK! ';
Else
Echo 'git clone failed !!! ';
Exit;
Fi

# Package with maven

Cd project
Mvn install-Dmaven. test. skip = true


If [$? -Eq 0]; then
Echo 'mvn install OK! ';
Else
Echo 'mvn install failed !!! ';
Exit;

Fi


# Copy the war package to the Tomcat webapps directory

Path = ~ /Tomcat7/webapps/
SrcPath = ~ /Source
Echo $ srcPath
Echo $ path
Cp $ srcPath/login-center/target/login-center.war $ path/login-center.war
Echo 'Copy file login-center.war done'


# Restart Tomcat

./Shutdown. sh

./Startup. sh


Remote Automatic deployment of website version building (VS) in Windows

The main idea is to manage or control all or part of the web server's functions through the code of the web page or scripts in the web directory, similar to a website, you can use background programs to maintain the content and format of the front-end.
It is certainly feasible to trigger scripts or programs on remote servers through local programs. However, generally, you must have the appropriate operation permissions and set the web server to grant it the corresponding execution scope. For example, select "execute script" to allow execution of the script. However, if the server does not belong to itself, the permission to execute the script is forbidden. The permission to execute the script almost opens the door to the server and is vulnerable to various attacks.
If you are using your own server or a machine that can be controlled, it is recommended that you use Remote Desktop Management or many remote management software. If it is not your own server, you can try again first.

Want to learn web automation testing, ruby? Python? Javascript? The web automation language scripting language recommended by all heroes.

Automated web testing:
Commercial tools:
The QTP language is vbscript.
Open Source:
Selenium supports ruby and python
Ruby also has watir and python has PAMIE, but watir is better than PAMIE.
What to learn depends on the big environment:
What do companies learn when using tools for testing?
If you are looking for a job, search for "test ruby" and "test python" on the job-seeking website. I will learn more about this job. Haha
In addition, javascript is required for web Front-end testing, and more or less ~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.