...
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.
Tip |
---|
In example below, if Project Name is Project1 and Stream Names are master and fixpack1, here is what will be actual values of various configurations.
This structure does not need to match with 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 |
---|---|---|
Git Instance | Yes | An SCM Instance representing a Git repository. See the Instances section to create SCM Type Instance. Refer to the Instances page for more on SCM Instances. |
Branch Name Script | Yes | Path for the branches within selected repository. Use StreamName 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. This can be specified as one more values by using comma. For example, HRDemoApp, which will only pull HRDemoApp from Git repository. Continuous integration support will make sure to check for changes only in these folders as well if configured. |
Checkout Folder Script | No | Optional sub-folder to use for clone operation during build workflow execution. |
...
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 |
---|---|---|
CVS Instance | Yes | An SCM Instance representing a CVS repository. See the Instances section to create SCM Type Instance. Refer to the Instances page for more on SCM Instances. |
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 StreamName 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. |
...
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 |
---|---|---|
TFVC Instance | Yes | An SCM Instance representing a TFVC repository. See the Instances section to create SCM Type Instance. Refer to the Instances page for more on SCM Instances. |
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 StreamName 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. |
...