2017-03-14
1.0.0
Remco Dekkinga
10.0.302.0
All
All
Developer Tools
[Overview]
This plugin adds the functionality to deploy from third-party tools like Jenkins. The plugin has two parts, a configuration screen where you can create multiple configurations to select which apps you want to deploy automatically and a webservice that can be called from third party tools to deploy the selected applications from and to the selected environments. This webservice checks if your applications changed and creates new versions of those applications, creates a deployment packages of all applications that have differences between the source and destination environments and returns the status after deployment and the deployment log in JSON format. When you have extra requests for this plugin, don't hesitate to contact me.
[Detail]
Automatic Deployment Plugin
Download and install the Automatic Deployment plugin from the Forge
Part 1: Create a Service Account
Go to the User Management > Service Accounts
Create a new Service Account
Give a descriptive Username
Give a role that is allowed to publish from your selected source to your selected destination
Is Active should be switched on
Add a description where you use this account
Save the Service Account
Store the private key from the Authentication Parameter popup in a separate file
Update the “Token” Site Propery of the Automatic Deployment eSpace with the private key
Part 2: Create an Automatic Deployment Configuration
Go to LifeTime and click on More > Automatic Deployment
When an error is shown, then the private key is not correct or the Service Account doesn’t have enough rights.
Create a new Automatic Deployment
Give a descriptive name
Select a source and destination server
Select the applications you want to schedule for automatic deployment
Save the configuration
Store the Guid from the overview
Part 3: Create the url for the deployment webservice
URL: https://{lifetime-server}/AutomaticDeployment/rest/AutomaticDeployment/Deploy
HTTP Method: GET
ContentType: Application/JSON
Header: AuthenticationToken
Value: {private key from the Service Account}
Header: ConfigurationGuid
Value: {Guid from the Automatic Deployment Configuration}
Part 4: Configure your automation tool that is able to call webservices and reads the response.
Implement a deployment step where the webservice is called and the response is validated before continuing to the next step in your automated deployment plan.
Possible Outputs
200: Deployed successfully
201: Nothing to deploy
202: Deployed with warnings
301: Deployed with errors
302: User intervention needed
401: Error occurred before deployment started
402: Manually aborted the deployment
403: Unknown deployment status returned: {statuscode}
Site Properties
RequestTimeout: Default 1 hour (make sure your deployment finishes within this timeframe)
CheckStatusInterval: Default 1 minute (when 0, the interval will be 30 seconds)
Token: Default empty, should be filled with a token from a Service Account