Project Source Control

Select Projects from the menu.

Open an existing project and click on Configuration, Source Control tab.

Source Configuration

Source configuration is is selecting the SCM Type and repositories for the project.

image-20241023-185234.png

Clicking Advanced allows for further configuration.

The inputs are in Groovy format, so you can use some variables in them. Static values should be quoted. Pressing Ctrl+Space shows different variables that are available.

Branch Configuration

Branch configuration is how you setup different copies of the same files in your source control system.

One branch is tagged as Main. This branch is the default branch to build from.

The Version Name Syntax input helps you to create a unique version identifier from each build.

The Next Branch Build Number increments with each build.

The Attributes are optional data that you can use to give different values to executions based on which branch you built from.

image-20241023-185303.png

 

Subversion Source Configurations

For Subversion one or more project sources can be configured with the details as described in the table below. FlexDeploy provides flexibility by supporting groovy script to define these values. Click on the expression button to include variables as part of the value. Additional sources can be added by Clicking on the Add Source button.

Defaults for Subversion source configurations can be configured using Project SVN Setup Defaults. This can be configured such that

  1. All Subversion project sources will get same values (including SVN Instance), or

  2. you can configure defaults by SVN Instance.

First approach works well if you have a single Subversion repository. If you have multiple Subversion repositories in your environment, then you can utilize second approach to configure project based on some criteria. You can accomplish this by placing an "if" statement within Groovy script for the defaults. With this approach all attributes in Subversion configurations will be empty initially, and when user selects SVN Instance, configuration values will be defaulted appropriately.

If Project Name is Project1 and Branch Names are trunk and fixpack1, here is what will be actual values of various configurations.

  • Trunk Path (used only for main Branch ) - /trunk/HumanResources/Project1

  • Branch Path (used for all Branch other than main) - /branches/HumandResources/Project1/fixpack1

  • Tag Path - /tags/HumanResources/Project1/1.0.0

This structure does not need to match with your Subversion repository. You just need to define Groovy scripts to match your repository structure.

Field Name

Required

Description

Field Name

Required

Description

SVN Instance

Yes

An SCM Instance representing a Subversion repository. See Instances section of this guide to create SCM Type Instance. Refer to the SCM Instances page for more information.

Trunk Path Script

Yes

Path for the trunk within selected repository.

Branch Path Script

No

Path for the branches within selected repository. Use the BranchName variable to identify branch name used at runtime.

Tag Path Script

No

Path for the tag within the selected repository. Use the ProjectVersion variable to specify identifier of current build.

Checkout Folder Script

No

Optional sub-folder to use for export/checkout operations during build workflow execution.

Git SCM Configurations

For Git one or more project sources can be configured with the details as described in table below. FlexDeploy provides flexibility by supporting groovy script to define these values. Click on expression button to include variables as part of the value. Additional sources can be added by Clicking on the Add Source button.

Defaults for Git source configurations can be configured using Project GIT Setup Defaults. This can be configured such that

  1. All Git project sources will get same values (including Git Instance), or

  2. You can configure defaults by Git Instance. First approach works well if you have a single Git repository.

If you have multiple Git repositories in your environment, then you can utilize the second approach to configure the project based on some criteria. You can accomplish this by placing an "if" statement within Groovy script for the defaults. With this approach all attributes in Git configurations will be empty initially, and when user selects Git Instance, configuration values will be defaulted appropriately.

If Project Name is Project1 and Branch Names are master and fixpack1, here is what will be actual values of various configurations.

  • Branch Name - master or fixpack1 depending what is selected during Build request

  • Tag Name - 1.0.0

This structure does not need to match your Git repository. You just need to define Groovy scripts to match your repository structure. In many cases you might be sharing Git repository with other folders, so you may have to configure Sparse Checkout Folders for efficient build process.

Field Name

Required

Description

Field Name

Required

Description

Git Instance

Yes

An SCM Instance representing a Git repository. See the Instances section to create SCM Type Instance. Refer to the SCM Instances page for more information.

Branch Name Script

Yes

Path for the branches within selected repository. Use BranchName variable to identify branch name used at runtime.

Tag Name Script

Yes

Path for the tag within the selected repository. Use ProjectVersion variable to specify identifier of current build.

Sparse Checkout Folders Script

No

This is very useful when you have many folders in your Git repository, but your project only needs few folders for build. Multiple folders can be separated by commas.

Continuous integration support will make sure to check for changes only in these folders as well if configured.

e.g. “HRDemoApp” -only pull HRDemoApp from Git repository.

e.g. “HRDemoApp,ConfigPlans” -only pull folders HRDemoApp and ConfigPlans (and their contents) from Git repository.

Checkout Folder Script

No

Optional sub-folder to use for clone operation during build workflow execution.

Advanced Git Integration

Prerequisites

This feature is available only if your FlexDeploy instance has a configured System Integration and you have authorized your FlexDeploy user profile. See the OAuth documentation for more information.

When using Git as your source control type you can leverage several additional features that are not available for other source control types.

Browsing Sparse Folders

Rather than having to manually specify any Sparse Folders (subfolders within the Git repository that should be cloned instead of the entire repo), you can click the Magnifying Glass button next to the Sparse Folder input. This will launch a popup that allows you to select your Sparse Folders from a file browser of the repository.

  1. Multiple Sparse Folders can be chosen. Here you can add additional folders by clicking the button. You can toggle which one you are currently editing with the button.

  2. You can change what branch you are viewing the contents for with this dropdown.

  3. Here you can choose which folder should be used as your Sparse Folder by clicking on the folder row.

Syncing Remote Branches

There 3 ways in which Branches on your remote Git repository can be synced with FlexDeploy Branches when working on the Source Control screen.

1. Creating the remote Branch when a FlexDeploy Branch is created

2. Delete the remote branch when a FlexDeploy Branch is deleted.

3. Lastly, you can import several remote branches at once by clicking the Import From Remote button next to the Branch Create button. Here you can pick and choose from a list of remote Branches that should be created in FlexDeploy.

CVS SCM Configurations

For CVS one or more project sources can be configured with the details as described in table below. FlexDeploy provides flexibility by supporting groovy script to define these values. Click on expression button to include variables as part of the value. Additional sources can be added by Clicking on the Add Source button.

Defaults for CVS source configurations can be configured using Project CVS Setup Defaults. This can be configured such that

  1. All CVS project sources will get same values (including CVS Instance), or

  2. You can configure defaults by CVS Instance. First approach works well if you have a single CVS repository.

If you have multiple CVS repositories in your environment, then you can utilize the second approach to configure the project based on some criteria. You can accomplish this by placing an "if" statement within Groovy script for the defaults. With this approach all attributes in CVS configurations will be empty initially, and when user selects CVS Instance, configuration values will be defaulted appropriately.

Field Name

Required

Description

Field Name

Required

Description

CVS Instance

Yes

An SCM Instance representing a CVS repository. See the Instances section to create SCM Type Instance. Refer to the SCM Instances page for more information.

Module Names Script

Yes

Module Names or Module subdirectories to be selected from repository. Module subdirectories should traverse starting at the Module Name. Multiple Modules may be selected by separating the names/paths with commas.

Branch Name Script

Yes

Path for the branches within selected repository. Use BranchName variable to identify branch name used at runtime.

Tag Script

Yes

Tag script to be used when creating tags for the project in the repository. Use ProjectVersion variable to specify identifier of current build.

Checkout Folder Script

No

Optional sub-folder to use for clone operation during build workflow execution.

TFVC SCM Configurations

For TFVC one or more project sources can be configured with the details as described in table below. FlexDeploy provides flexibility by supporting groovy script to define these values. Click on expression button to include variables as part of the value. Additional sources can be added by Clicking on the Add Source button.

Defaults for TFVC source configurations can be configured using Project TFVC Setup Defaults. This can be configured such that

  1. All TFVC project sources will get same values (including TFVC Instance), or

  2. You can configure defaults by TFVC Instance. First approach works well if you have a single TFVC repository.

If you have multiple TFVC repositories in your environment, then you can utilize the second approach to configure the project based on some criteria. You can accomplish this by placing an "if" statement within Groovy script for the defaults. With this approach all attributes in TFVC configurations will be empty initially, and when user selects TFVC Instance, configuration values will be defaulted appropriately.

Field Name

Required

Description

Field Name

Required

Description

TFVC Instance

Yes

An SCM Instance representing a TFVC repository. See the Instances section to create SCM Type Instance. Refer to the SCM Instances page for more information.

Main Path Script

Yes

Main Path to a project in the selected repository.

Branch Path Script

Yes

Path for the branches within selected repository. Use BranchName variable to identify branch name used at runtime.

Label Name Script

Yes

Label script to be used when creating labels for the project in the repository. Use ProjectVersion variable to specify identifier of current build.

Get Folder Script

No

Optional sub-folder to use for clone operation during build workflow execution.

PVCS SCM Configurations

For PVCS one or more project sources can be configured with the details as described in table below. FlexDeploy provides flexibility by supporting groovy script to define these values. Click on expression button to include variables as part of the value. Additional sources can be added by Clicking on the Add Source button.

Defaults for PVCS source configurations can be configured using Project PVCS Setup Defaults. This can be configured such that

  1. All PVCS project sources will get same values (including PVCS Instance), or

  2. You can configure defaults by PVCS Instance. First approach works well if you have a single PVCS repository.

If you have multiple PVCS repositories in your environment, then you can utilize the second approach to configure the project based on some criteria. You can accomplish this by placing an "if" statement within Groovy script for the defaults. With this approach all attributes in PVCS configurations will be empty initially, and when user selects PVCS Instance, configuration values will be defaulted appropriately.

Field Name

Required

Description

Field Name

Required

Description

PVCS Instance

Yes

An SCM Instance representing a PVCS repository. See the Instances section to create SCM Type Instance. Refer to the SCM Instances page for more information.

Project Path Script

Yes

Project Path Script to be used to get files from.  This will be a path present in the Project Database configured on the instance.  Use "/" to get all files in the Project Database.

Promotion Group Script

Yes

Promotion Group name to be used.  Use BranchName variable to identify Promotion Group name at runtime.

Use Promotion Group Script

Yes

Whether the Promotion Group script should be used to identify the Branch.  If false, then the branch script will be used.

Branch Name Script

Yes

Branch name to be used within selected repository. Use BranchName variable to identify branch name used at runtime.

Label Script

Yes

Label script to be used when creating labels for the project in the repository. Use ProjectVersion variable to specify identifier of current build.

Checkout Folder Script

No

Optional sub-folder to use for clone operation during build workflow execution.

Click the Save button to save the changes.





The following macros are not currently supported in the footer:
  • style