Versions Compared

Key

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

Templates provide the ability to create groovy scripts to manage the creation of FlexDeploy projects from an uploaded csv file. In addition, template can have inputs that allow data from the csv file to be are simple Groovy scripts and custom Inputs, which are then used create FlexDeploy projects using CSV file. Template can have inputs which map to CSV file headers which are passed into the groovy script for execution. This inputs Inputs allow the groovy script to be very dynamic and create projects with different attributes.

Templates can be accessed through the Administration menu.

Image RemovedImage Added

Predefined Templates

...

 

...

  •  

Additional Examples

Simple SOA Project

  • Create two template inputs of String type - ApplicationName, ProjectName. Use script code as shown below.
  • Most configurations are constant, i.e. workflow, instance, partition property etc.
  • Generated projects will have different
    • location in FlexDeploy project explorer
    • Sparse checkout folder script
Code Block
languagegroovy
// best practice is to have the projectName be the same as the composite name
CompositeName=ProjectName;
Project.setProjectName(ProjectName);
Project.setActive(true);
Project.setSCMType("GIT");
Project.setBuildWorkflowName("BuildSOA");
Project.setDeployWorkflowName("DeploySOA");
Project.setProjectPath("FlexDeploy/SOA/" + ApplicationName);
Project.setBuildInstanceName("SOA1");
Project.addDeployInstances("SOA1");

Project.addGITConfig(1,"GITREPO", "StreamName", "ProjectVersion", "ProjectName", "\"SOA/" + ApplicationName +   "/\" + ProjectName");
Project.getStreams().get(0).setStreamName("master");

Project.setDeployPriority(10);
Project.setDeployPriorityScope("Global");

Project.addProperty("FDSOA_COMPOSITE_NAME", CompositeName);
Project.addProperty("FDSOA_PARTITION", "default");

Project configured with this template would be like this for GetOrder as ProjectName and OrderServices as ApplicationName.

Image Added