Versions Compared

Key

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

...

  • 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.Only change is location of composite in Git repository.
  • 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