Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Objective

You have a Java application that is built with Maven and the source code is managed in a GIT repository. The goal of this tutorial is to automate the build and deployment across multiple environments. This automation will include:

...

Click on source repository dropdown. If you have already created a connection to your source code repository, select it from the list. Enter the sparse checkout folder, if any.

...

Otherwise add one by clicking on “Create new Source Repository. Enter the sparse checkout folders script, if any.

...

Inputs Info

Field

Required

Description

Name

Yes

A descriptive name for this SCM instance.

Code

Yes

A technical code for the instance, without any spaces.  The codes are available as variables to shell and Groovy scripts, and therefore needs to comply with their limitations. 

Source Control Type

Yes

Type of Source Control Management System.  We will use Git for this tutorial.

Supported Source Control Management Systems are:

  • Subversion

  • Git

  • Microsoft TFS Version Control

  • PVCS

  • CVS

  • Perforce

  • File System

Description

No

 

SCM Properties

Yes

The remaining properties are specific to the selected SCM.

For Git:

  • Git URL

  • Git User

  • Git Password

  • Git Timeout (optional)

  • Git File Content (optional)

  • Git File Content Commit URL (optional)

...

The Folder path is auto updated to FlexDeploy/JAVA/ and click on “Create”.

...

We can see the Folder hierarchy on the top of the project.

...

Change the branch name similar to the git repositories branch name. Click on Save.

...

SCM Instance

Viewing the current list of Integrations is achieved by selecting Topology from the menu, then the Integrations tab from the left-hand pane.  There are eleven types of integrations in FlexDeploy, but we will focus on Source Control in this tutorial.

...

Target Properties

...

Build Execution

...

  1. select the environment we want to build the application in, the environments that had the Build Environment checkbox will appear in the dropdown.

  2. select the SCM Branch that was configured on the project, this will be pre-populated if there is only one configured Branch.

  3. submit the request, this will initiate the mavenBuild  mavenBuild workflow.

...

Upon submission, the build workflow is initiated and the workflow steps are executed on the Maven instance in the BLD environment, utilizing the LOCALHOST endpoint.  Upon completion of the workflow, the execution status will be successful. More information about the workflow execution can be viewed from the Execution Id link.

...

Now that you have configured FlexDeploy for one application, it is extremely easy to add more applications.  Simply use the Copy Project feature or use the blueprints feature again and a new project will be created with all of the configuration completed already. With everything copied, you can simply change the configuration as needed and be ready to build/deploy in minutes. After the first run through, the blueprint will remember some of your values, and only properties that are different on each project should need any changes.