Jenkins uses FTP for one-click Deployment and Rollback (Windows)

Source: Internet
Author: User

Prerequisites:

1, there must be two servers, one is the production environment, the other is the test environment.

2. Jenkins must be installed on both servers.

3, wherein, the production environment of Jenkins has opened the permissions of the CLI (Windows reference: http://www.cnblogs.com/EasonJim/p/6086018.html).

Specific implementation steps:

1, in the production environment Jenkins configuration an decompression operation of the project for deployment and a restore project for rollback

Extract:

Command line:

Echo [INFO] Backup compression operation Pager C: \ "program Files" \winrar\rar.exe a-x*\upload*-x*\ueditor*-x*\uploadfolder*%filepath%.bak. rar%unzippath% Echo [INFO] decompression Operation  call c \ "program Files" \winrar\rar.exe x-ep2-o+-%filepath%%unzippath%

Description

Backup is done before the decompression, that is, every operation before the backup.

1) When deploying, such as uploading a file name of 1.rar, then the backup file is 1.rar.bak.rar.

Restores:

Command line:

Echo [INFO] Backup compression operation Pager C: \ "program Files" \winrar\rar.exe a-x*\upload*-x*\ueditor*-x*\uploadfolder*%filepath%.restorebak. rar%unzippath% Echo [INFO] decompression Operation  call c \ "program Files" \winrar\rar.exe x-ep2-o+-%filepath%%unzippath%

Description

Backup is done before the decompression, that is, every operation before the backup.

1) rollback, such as the file name of the uploaded backup is 1.rar.bak.rar, then the rollback operation backup file is 1.rar.restorebak.rar.

Jenkins uses FTP for one-click Deployment and Rollback (Windows)

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.