Skip to content

Port 14552 deployment environment tags releases #2557

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Aug 11, 2025
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
f6195ae
Add documentation examples for release, tags, deployments, and
melodyogonna Jul 16, 2025
ac205c0
Updated supported resources
melodyogonna Jul 16, 2025
43c0163
Update supported events
melodyogonna Jul 16, 2025
bed0370
Update required permissions
melodyogonna Jul 16, 2025
de5ea2e
Tiny correction to the event triggers
melodyogonna Jul 16, 2025
8d2dec6
Update repository key in deployment
melodyogonna Jul 16, 2025
523c11b
Update tag relation
melodyogonna Jul 16, 2025
b52001f
Merge branch 'main' of github.com:port-labs/port-docs into PORT-14552…
melodyogonna Jul 16, 2025
323c977
Change release-tag order
melodyogonna Jul 16, 2025
72303a6
Merge branch 'main' of github.com:port-labs/port-docs into PORT-14552…
melodyogonna Aug 4, 2025
ab9b385
Use double quotation in identifier
melodyogonna Aug 4, 2025
46f7e06
Merge branch 'main' into PORT-14552-deployment-environment-tags-releases
hadar-co Aug 4, 2025
11945c4
Merge branch 'main' into PORT-14552-deployment-environment-tags-releases
hadar-co Aug 5, 2025
82122af
Merge branch 'main' into PORT-14552-deployment-environment-tags-releases
mk-armah Aug 6, 2025
aef6ccf
Merge branch 'main' of github.com:port-labs/port-docs into PORT-14552…
melodyogonna Aug 6, 2025
2b0e6de
Merge branch 'PORT-14552-deployment-environment-tags-releases' of git…
melodyogonna Aug 6, 2025
0fe5072
Add missing showlinenumbers and improve consistency
melodyogonna Aug 6, 2025
0f74da2
Fix claude suggestions
melodyogonna Aug 6, 2025
b25e3fd
Merge branch 'main' into PORT-14552-deployment-environment-tags-releases
hadar-co Aug 10, 2025
28c74a6
Update docs/build-your-software-catalog/sync-data-to-catalog/git/gith…
sivanel97 Aug 11, 2025
46acf22
Update docs/build-your-software-catalog/sync-data-to-catalog/git/gith…
sivanel97 Aug 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
- [`repository`](https://docs.github.com/en/rest/repos/repos#get-a-repository)
- [`pull-request`](https://docs.github.com/en/rest/pulls/pulls#get-a-pull-request)
- [`file`](/build-your-software-catalog/sync-data-to-catalog/git/github/#ingest-files-from-your-repositories)

- [`environment`](https://docs.github.com/en/rest/deployments/environments#get-an-environment)
- [`deployment`](https://docs.github.com/en/rest/deployments/deployments#get-a-deployment)
- [`releases`](https://docs.github.com/en/rest/releases/releases#list-releases)
- [`tags`](https://docs.github.com/en/rest/repos/repos#list-repository-tags)
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<details>
<summary>Deployment blueprint</summary>

```json showLineNumbers
{
"identifier": "githubDeployment",
"title": "Deployment",
"icon": "Deployment",
"schema": {
"properties": {
"description": {
"title": "Description",
"type": "string"
},
"ref": {
"title": "Ref",
"type": "string"
},
"sha": {
"title": "Sha",
"type": "string"
},
"transientEnvironment": {
"title": "Transient Running Service",
"type": "boolean"
},
"productionEnvironment": {
"title": "Production Running Service",
"type": "boolean"
},
"createdAt": {
"title": "Created At",
"type": "string",
"format": "date-time"
},
"url": {
"title": "URL",
"type": "string",
"icon": "Link",
"format": "url"
}
},
"required": []
},
"mirrorProperties": {},
"calculationProperties": {},
"relations": {
"runningService": {
"title": "Running Service",
"target": "githubRepoEnvironment",
"required": false,
"many": false
}
}
}
```

</details>
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<details>

<summary> Port port-app-config.yml </summary>

```yaml
createMissingRelatedEntities: true
resources:
- kind: repository
selector:
query: "true" # JQ boolean query. If evaluated to false - skip syncing the object.
port:
entity:
mappings:
identifier: ".name" # The Entity identifier will be the repository name.
title: ".name"
blueprint: '"githubRepository"'
properties:
readme: file://README.md
url: .html_url
defaultBranch: .default_branch
- kind: environment
selector:
query: "true"
port:
entity:
mappings:
identifier: .__repository + "-" + .name
title: .name
blueprint: '"githubRepoEnvironment"'
properties:
url: .html_url
customBranchesPolicies: .deployment_branch_policy.custom_branches_policies
protectedBranches: .deployment_branch_policy.protected_branches
createdAt: .created_at
updatedAt: .updated_at
relations:
repository: .__repository
- kind: deployment
selector:
query: "true"
port:
entity:
mappings:
identifier: .__repository + "-" + (.id|tostring)
title: .task + "-" + .environment
blueprint: '"githubDeployment"'
properties:
description: .description
ref: .ref
sha: .sha
productionEnvironment: .production_environment
transientEnvironment: .transient_environment
createdAt: .created_at
url: .url
relations:
environment: .__repository + "-" + .environment
```

</details>
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<details>
<summary>Running Service blueprint</summary>

```json showLineNumbers
{
"identifier": "githubRepoEnvironment",
"title": "Running Service",
"icon": "Environment",
"schema": {
"properties": {
"url": {
"icon": "DefaultProperty",
"title": "URL",
"type": "string",
"format": "url"
},
"createdAt": {
"title": "Created At",
"type": "string",
"format": "date-time",
"icon": "DefaultProperty"
},
"updatedAt": {
"title": "Updated At",
"type": "string",
"format": "date-time"
},
"protectedBranches": {
"title": "Protected Branches",
"type": "boolean"
},
"customBranchPolicies": {
"title": "Custom Branch Policies",
"type": "boolean"
}
},
"required": []
},
"mirrorProperties": {},
"calculationProperties": {},
"relations": {
"repository": {
"target": "githubRepository",
"required": true,
"many": false
}
}
}
```

</details>
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<details>
<summary>Release blueprint</summary>

```json showLineNumbers
{
"identifier": "githubRelease",
"title": "Release",
"icon": "Github",
"schema": {
"properties": {
"release_creation_time": {
"icon": "DefaultProperty",
"type": "string",
"title": "Release creation time",
"format": "date-time"
},
"author": {
"type": "string",
"title": "Author"
},
"description": {
"type": "string",
"title": "Description"
}
},
"required": []
},
"mirrorProperties": {},
"calculationProperties": {},
"aggregationProperties": {},
"relations": {
"repository": {
"title": "Repository",
"target": "githubRepository",
"required": false,
"many": false
},
"tag": {
"title": "Tag",
"target": "githubTag",
"required": false,
"many": false
}
}
}
```

</details>
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<details>

<summary> Port port-app-config.yml </summary>

```yaml showLineNumbers
resources:
- kind: repository
selector:
query: "true" # JQ boolean query. If evaluated to false - skip syncing the object.
port:
entity:
mappings:
identifier: ".name" # The Entity identifier will be the repository name.
title: ".name"
blueprint: '"githubRepository"'
properties:
readme: file://README.md
url: .html_url
defaultBranch: .default_branch
- kind: tag
selector:
query: 'true'
port:
entity:
mappings:
identifier: .name
title: .name
blueprint: '"githubTag"'
properties:
commit_sha: .commit.sha
relations:
repository: .__repository
- kind: release
selector:
query: 'true'
port:
entity:
mappings:
identifier: .name
title: .name
blueprint: '"githubRelease"'
properties:
author: .author.login
description: .body
release_creation_time: .created_at
relations:
tag: .tag_name
repository: .__repository
```

</details>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<details>
<summary>Tag blueprint</summary>

```json showLineNumbers

{
"identifier": "githubTag",
"title": "Tag",
"icon": "Github",
"schema": {
"properties": {
"commit_sha": {
"icon": "DefaultProperty",
"type": "string",
"title": "Commit sha"
}
},
"required": []
},
"mirrorProperties": {},
"calculationProperties": {},
"aggregationProperties": {},
"relations": {
"repository": {
"title": "Repository",
"target": "githubRepository",
"required": false,
"many": false
}
}
}
```

</details>
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ import PRBlueprint from './\_github_exporter_example_pull_request_blueprint.mdx'
import PortAppConfig from './\_github_exporter_example_port_app_config.mdx'
import GitHubResources from '../\_github_exporter_supported_resources.mdx'

import RepoEnvironmentBlueprint from './example-deployments-environments/\_github_exporter_example_environment_blueprint.mdx'
import DeploymentBlueprint from './example-deployments-environments/\_github_exporter_example_deployment_blueprint.mdx'
import PortRepoDeploymentAndEnvironmentAppConfig from './example-deployments-environments/\_github_exporter_example_deployments_and_environments_port_app_config.mdx'

import TagBlueprint from './example-repository-release-tag/\_github_exporter_example_tag_blueprint.mdx'
import ReleaseBlueprint from './example-repository-release-tag/\_github_exporter_example_release_blueprint.mdx'
import RepositoryTagReleaseAppConfig from './example-repository-release-tag/\_github_exporter_example_release_tag_port_app_config.mdx'

import PackageBlueprint from './example-file-kind/\_example_package_blueprint.mdx'
import PackageAppConfig from './example-file-kind/\_package_json_app_config.mdx'
import FileBlueprint from './example-file-kind/\_example_file_blueprint.mdx'
Expand Down Expand Up @@ -48,6 +56,7 @@ The following example demonstrates ingestion of dependencies from a `package.jso
The example will parse the `package.json` file in your repository and extract the dependencies into Port entities.
For more information about ingesting files and file contents, click [here](/build-your-software-catalog/sync-data-to-catalog/git/github-ocean/#ingest-files-from-your-repositories).


## Map Files and Repositories

The following example demonstrates mapping files to repository.
Expand All @@ -57,6 +66,29 @@ The following example demonstrates mapping files to repository.
<RepoFileAppConfig />


## Map repositories, deployments and environments

In the following example you will ingest your GitHub repositories, their deployments and environments to Port, you may use the following Port blueprint definitions and `port-app-config.yml`:

<RepositoryBlueprint/>

<RepoEnvironmentBlueprint/>

<DeploymentBlueprint/>

<PortRepoDeploymentAndEnvironmentAppConfig/>

## Map repositories, repository releases and tags

In the following example you will ingest your GitHub repositories, their releases and tags to Port, you may use the following Port blueprint definitions and `port-app-config.yml`:

<RepositoryBlueprint/>

<TagBlueprint/>

<ReleaseBlueprint/>

<RepositoryTagReleaseAppConfig/>

## Map supported resources

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ This page outlines the following steps:
- Contents: Readonly (for reading port configuration files and repository files).
- Metadata: Readonly.
- Pull Request: Readonly
- Deployments: Readonly
- Environments: Readonly
- **Organization Permissions:**
- Webhooks: Read and Write (to allow the integration create webhook).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ To create a personal access token see Github's [managing your personal access to
- **Content**: Readonly
- **Metadata**: Readonly
- **Pull Requests**: Readonly
- **Deployments**: Readonly
- **Environments**: Readonly

**Organization permissions:**
- **Webhooks**: Read and Write (for managing webhook)
Expand Down
Loading