How to use Jenkins for automatic project construction or project rollback under Ubuntu system

Source: Internet
Author: User

Although the above implementation of the automatic deployment of the project, but sometimes when the deployment fails, we need to roll back to the specified version of the build, in order to more flexible project build deployment. We can choose "parameterized build process" to pass different parameters to choose whether to make a new build or rollback

If you are implementing rollback, be sure to archive the completed files after the build to facilitate later rollback.

  • If you are implementing rollback, be sure to archive the completed files after the build, making it easier to roll back later


    Post-Build Archive
  • Use the parameterized build process so that the following footsteps can perform different actions depending on the variable. Add the "Choice" parameter to configure different options, let's choose to publish or rollback, add a "String Parameter" parameter to pass the version number to be rolled back.


    Parameters and build process
  • Build a script that chooses "Execute Shell", customizing the build itself according to the variables, at this point, if the build process that installs Maven is released for a new build, if it is rolled back, know the history of the built file, copy it to the current build results directory.


    Build Scripts
  • Click Build, choose Publish or rollback according to different parameters, and roll back the historical version number


    Build Page

How to use Jenkins for automatic project construction or project rollback under Ubuntu system

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.