Microservice architectures are increasingly being used in product development. With the segmentation of microservices, 7 or 8 databases were designed for one product, and script upgrade for each library became an urgent problem to be solved. Of course, development is generally only responsible for writing scripts, as for the operation and maintenance side of the company, generally handed over to professionals. But I’m a small team here, and I have to do operations and maintenance on the side, so automate it!

1. Jenkins Tools

When it comes to automating, Jenkins, of course, is at the top of the list. The upgrade script is nothing more than connecting to the library, executing the script file, and printing out the log. That’s really three steps to putting an elephant in the fridge. Ha ha!

Configuration plug-in: nailing. Nail is also a team development weapon, went wrong of course to nail group cast. And @someone, see where you go. MySql script failed to build! Portal has been opened, heroes, hurry up and eliminate bugs!

The script uses gitlab management and Jenkins also needs to be configured to pull Jenkins content.

The build uses an automated build and is configured for H 08-13/4 * * * to be executed in the period from 8pm to 12pm.

Configure the plug-in Color ANSI Console Output, there are errors in the light of a little bit, it is correct.

2. Talk about script structure

In order to bright SAO automated script execution, the development partner needs a little bit of small requirements.