Sometimes, errors appear in your code and there are multiple ways of identifying and fixing these errors. In such cases various automated tools which deploy software updates, can be utilised. We created a special script which checks the changes in your repository at certain time periods. This new Jelastic feature will greatly increase your productivity as a developer. From now on, you can set periodical automatic project deployments based on the changes you have committed via GIT or SVN repository.
This feature allows you to work with your repository, without ever leaving it and switching between the repository and the Jelastic dashboard. You can simply update your code, make commits as you usually do, and all the changes will be pushed to your Jelastic environment automatically in the specified time period. Moreover as a distinction from GIT hooks, the Jelastic auto-deploy feature does not require configuration on the GIT side and works with SVN.
Let’s look at how this works in the Jelastic Cloud:
1. First of all, create your environment with the necessary topology to which you can add your Git project. You can find more details on how to add your project in our documentation sections for Java and for PHP.
2. Click on the Add project button.
3. In the appeared dialog box enter the Name of your project, Path to it, Branch, Login and Password (if needed). Choose the Environment where you plan to deploy the project and specify the Context.
To deploy software updates automatically based on your commits in GIT, tick the Check and Auto-deploy Updates check-box and specify the interval for verification in minutes (Check every). The Jelastic system will be performing the check if you have made any commits with such periods. Your Java project will be built and deployed or just updated automatically if it's a PHP project.
Note: If the check interval is smaller than the time needed to deploy and build the project, the next task will wait in the queue until it completes.
4. You can re-configure your GIT/SVN project's automatic deployment by clicking the Edit button next to your project.
In the opened dialog box state the new value for the Interval or untick the Check and Auto-deploy Updates check box to turn off automatic GIT/SVN updating.
5. Look through the logs of Maven or your application server to check if auto-deployment was performed successfully:
- Maven (vcs_update file) for Java project;
- App server (svn_log, git_log files) for PHP project.
With just a few simple configurations, you can work with your code through the GIT/SVN repository without having to switch to the Jelastic dashboard each time you need to deploy software updates. Enjoy this new Jelastic feature and be sure that everything is up-to-date in your production environments, automatically.