Skip to content

Commit 1c21e6f

Browse files
committed
WIP
1 parent e1eb7d6 commit 1c21e6f

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

docs/build-your-software-catalog/sync-data-to-catalog/git/gitlab-v2/example-files/_gitlab_integration_example_package_config.mdx

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<details>
22
<summary><b>Integration mapping (click to expand)</b></summary>
3-
```yaml showLineNumbers
3+
```yaml showLineNumbers title="Integration mapping JSON file"
44
resources:
55
- kind: file
66
selector:
@@ -23,4 +23,25 @@ resources:
2323
package: .item.key
2424
version: .item.value
2525
```
26+
27+
```yaml showLineNumbers title="Integration mapping YAML file"
28+
resources:
29+
- kind: file
30+
selector:
31+
query: 'true'
32+
files:
33+
path: config.yml
34+
repos:
35+
- getport-labs/my-project
36+
port:
37+
entity:
38+
mappings:
39+
# Note that when parsing a YAML file, you should specify the index the parsed document.
40+
identifier: .file.content.[0].identifier
41+
title: .file.content.[0].title
42+
blueprint: .file.content.[0].blueprint
43+
properties:
44+
slack_channel_name: .file.content.[0].properties.slack_channel_name
45+
description: .file.content.[0].properties.description
46+
```
2647
</details>

docs/build-your-software-catalog/sync-data-to-catalog/git/gitlab-v2/examples.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,9 @@ You can use the following Port blueprint definitions and integration configurati
164164

165165
<PackageConfig />
166166

167-
The example will parse the `package.json` file in your repository and extract the dependencies into Port entities.
168-
For more information about ingesting files and file contents, click [here](/build-your-software-catalog/sync-data-to-catalog/git/gitlab-v2/#ingest-files-from-your-repositories)
167+
The integration mapping example above demonstrates both a JSON file (`package.json`) and a YAML file (`config.yml`) configuration.
168+
The example will parse the file in your repository and extract the dependencies into Port entities.
169+
For more information about ingesting files and file contents, click [here](/build-your-software-catalog/sync-data-to-catalog/git/gitlab-v2/#ingest-files-from-your-repositories).
169170

170171

171172

0 commit comments

Comments
 (0)