When I deploy a new version of stateful.co, a Java web application, to CloudBees, it takes 30 seconds of my time. Maybe even less. Recently, I deployed version 1.6.5. You can see how it all happened, in GitHub issue #6:
As you see, I gave a command to Rultor, and it packaged, tested and deployed a new version to CloudBees. I didn't do anything else.
Now let's see how you can do the same. How you can configure your project so that the deployment of its new version to CloudBees takes just a few seconds of your time.
Configure the CloudBees Maven Plugin
Add this profile to your
This plugin is not in Maven Central (unfortunately). That's why we have to specify that
Pay attention to the fact that we're also disabling
maven-deploy-plugin, since it would try to deploy your WAR package to the repository from the
<distributionManagement> section. We want to avoid this.
The profile gets activated only when the
bees.id property is defined. This won't happen during your normal development and testing, but it will occur during the deployment cycle initiated by Rultor, because we will define this property in
settings.xml (discussed below).
Secure Access to CloudBees
Create an account in CloudBees and register your web application there. CloudBees is free, as long as you don't need too much computing power. I believe that web applications should be light-weight by definition, so CloudBees' free layer is an ideal choice.
settings.xml file (but don't commit it to your repo!):
Encrypt this file using rultor remote:
me/test use the name of your GitHub project.
You should get a
settings.xml.asc file; add it to the root directory of your project, commit and push. This file contains your CloudBees credentials, but in an encrypted format. Nobody can read it, except the Rultor server.
Configure Versions Plugin
I recommend using jcabi-parent. It configures the required plugin out-of-the-box. If you're using it, skip this step.
Otherwise, add this plugin to your
.rultor.yml file in the root directory of your project (this reference page explains this format in detail):
You can compare your file with live Rultor configuration of stateful.co.
Now it's time to see how it all works. Create a new ticket in the GitHub issue tracker, and post something like that into it (read more about Rultor commands):
You will get a response in a few seconds. The rest will be done by Rultor.
BTW, if something doesn't work as I've explained, don't hesitate to submit a ticket to the Rultor issue tracker. I will try to help you.
Also, a similar configuration can be performed for Heroku (using jcabi-heroku-maven-plugin) and for AWS Elastic Beanstalk (using jcabi-beanstalk-maven-plugin). I'll probably dedicate individual posts to them, as well.