Advanced
The GitLab integration supports additional flags to provide additional configuration, making it easier to configure its behavior to your liking.
To use the advanced configuration and additional flags, add them as a root key to your integration configuration, for example to add the
createMissingRelatedEntities
flag:
createMissingRelatedEntities: true
resources:
- kind: merge-request
selector:
query: "true"
port:
entity:
mappings:
... mappings configuration
Using advanced configurationsโ
The following advanced configuration parameters are available and can be added to the integration configuration:
- branch
- Spec path
- Delete dependent entities
- Enable merge entity
- Create missing related entities
- Filter owned projects
- Filter projects
The branch
parameter determines the branch the integration will sync on.
By default this parameter is not set and the integration will sync all projects using their default branch.
The specPath
parameter specifies a list of globPatterns[] that Port's GitLab app will search for port.yml
files in.
- Default value:
**/port.yml
- Use case:
- If you want the app to scan a different file than
port.yml
(for example, change configure the app to scan files namedmy-port-config.yml
using the pattern**/my-port-config.yml
); - If you want the app to ignore
port.yml
files in certain paths.
- If you want the app to scan a different file than
The deleteDependentEntities
parameter is used to enable deletion of dependent Port entities. This is useful when you have two blueprints with a required relation, and the target entity in the relation should be deleted. In this scenario, the delete operation will fail if this flag is set to false
if the flag is set to true
, the source entity will be deleted as well.
- Default:
false
(disabled) - Use case: Deletion of dependent Port entities. Must be enabled, if you want to delete a target entity (and its source entities) in a required relation.
The enableMergeEntity
parameter specifies whether to use the create/update or create/override strategy when creating entities listed in a port.yml
file.
- Default value:
false
(use create/override) - Use case: use
false
if you want GitLab to be the source-of-truth for catalog entities. Usetrue
if you want to use GitLab as the source for some properties of entities in the catalog, and use other sources to for properties which are subject to change automatically.
The createMissingRelatedEntities
parameter is used to enable the creation of missing related Port entities automatically in cases where the target related entity does not exist in the software catalog yet.
- Default value:
false
(do not create missing related entities) - Use case: use
true
if you want GitLab app to create barebones related entities, in case those related entities do not exist in the software catalog.
By default the gitlab integration will sync only projects that are owned by the token provided in the integration configuration.
The filterOwnedProjects
parameter is used to filter out projects that are not owned by the token.
This parameter is useful when you want to sync projects that the token has access to but is not set as the owner of it.
The equivalent of this parameter in the gitlab API is the owned
parameter for the list projects endpoint.
By default this parameter is not set and the integration will sync all projects that the token has access to.
The projectVisibilityFilter
parameter is used to filter out projects based on their visibility level in GitLab (public, internal, private).
The equivalent of this parameter in the gitlab API is the visibility
parameter for the list projects endpoint.