Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
# Conflicts:
#	port_ocean/config/settings.py
  • Loading branch information
yairsimantov20 committed Jun 4, 2024
2 parents 0529e0e + 807191e commit 7af594b
Show file tree
Hide file tree
Showing 10 changed files with 118 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,5 @@ cython_debug/
!.idea/watcherTasks.xml

# VSCode
.vscode/
.vscode/*
!.vscode/launch.json
74 changes: 74 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Run snyk integration",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}/integrations/snyk",
"program": "${workspaceFolder}/integrations/snyk/debug.py",
"console": "integratedTerminal",
"justMyCode": true,
"envFile": "${workspaceFolder}/integrations/snyk/.env"
},
{
"name": "Run pagerduty integration",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}/integrations/pagerduty",
"program": "${workspaceFolder}/integrations/pagerduty/debug.py",
"console": "integratedTerminal",
"justMyCode": true,
"envFile": "${workspaceFolder}/integrations/pagerduty/.env"
},
{
"name": "Run gitlab integration",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}/integrations/gitlab",
"program": "${workspaceFolder}/integrations/gitlab/debug.py",
"console": "integratedTerminal",
"envFile": "${workspaceFolder}/integrations/gitlab/.env"
},
{
"name": "Run argocd integration",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}/integrations/argocd",
"program": "${workspaceFolder}/integrations/argocd/debug.py",
"console": "integratedTerminal",
"justMyCode": true,
"envFile": "${workspaceFolder}/integrations/argocd/.env"
},
{
"name": "Run azure-devops integration",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}/integrations/azure-devops",
"program": "${workspaceFolder}/integrations/azure-devops/debug.py",
"console": "integratedTerminal",
"justMyCode": true,
"envFile": "${workspaceFolder}/integrations/azure-devops/.env"
},
{
"name": "Run GCP integration",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}/integrations/gcp",
"program": "${workspaceFolder}/integrations/gcp/debug.py",
"console": "integratedTerminal",
"justMyCode": false,
"envFile": "${workspaceFolder}/integrations/gcp/.env"
},
{
"name": "Run AWS integration",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}/integrations/aws",
"program": "${workspaceFolder}/integrations/aws/debug.py",
"console": "integratedTerminal",
"justMyCode": false,
"envFile": "${workspaceFolder}/integrations/aws/.env"
}
]
}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

<!-- towncrier release notes start -->

## 0.5.26 (2024-06-04)


### Bug Fixes

- Fixed an issue causing integrations with no configuration to fail during the initialization process


## 0.5.25 (2024-06-03)


Expand Down
3 changes: 3 additions & 0 deletions integrations/argocd/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
APPLICATION__LOG_LEVEL="DEBUG",
PORT_CLIENT_ID="<port-client-id>",
PORT_CLIENT_SECRET="<port-client-secret>",
8 changes: 8 additions & 0 deletions integrations/aws/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
OCEAN__PORT__CLIENT_ID="<port-client-id>"
OCEAN__PORT__CLIENT_SECRET="<port-client-secret>"
OCEAN__INTEGRATION__CONFIG__LIVE_EVENTS_API_KEY="1234"
OCEAN__INTEGRATION__CONFIG__ORGANIZATION_ROLE_ARN="arn:aws:iam::<account-id>:role/<role-name>"
OCEAN__INTEGRATION__CONFIG__ACCOUNT_READ_ROLE_NAME="<role-name>"
OCEAN__EVENT_LISTENER={"type": "POLLING"}
OCEAN__INTEGRATION__IDENTIFIER="my-aws-integration"
OCEAN__INTEGRATION__TYPE="aws"
6 changes: 6 additions & 0 deletions integrations/azure-devops/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
OCEAN__INTEGRATION__CONFIG__ORGANIZATION_URL="https://dev.azure.com/<organization-name>",
OCEAN__INTEGRATION__CONFIG__PERSONAL_ACCESS_TOKEN="<personal-access-token>",
OCEAN__PORT__CLIENT_ID="<port-client-id>",
OCEAN__PORT__CLIENT_SECRET="<port-client-secret>",
OCEAN__INTEGRATION__CONFIG__APP_HOST="<app-host>",
APPLICATION__LOG_LEVEL="DEBUG",
5 changes: 5 additions & 0 deletions integrations/gcp/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
OCEAN__PORT__CLIENT_ID = "<port-client-id>"
OCEAN__PORT__CLIENT_SECRET = "<port-client-secret>"
OCEAN__PORT__BASE_URL = "http://localhost:3000"
OCEAN__EVENT_LISTENER = {"type": "POLLING"}
OCEAN__INTEGRATION = {"identifier": "my-gcp-integration", "type": "gcp", "config": {}}
7 changes: 7 additions & 0 deletions integrations/gitlab/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
OCEAN__PORT__CLIENT_ID="<port-client-id>",
OCEAN__PORT__CLIENT_SECRET="<port-client-secret>",
OCEAN__PORT__BASE_URL="http://localhost:3000",
OCEAN__INTEGRATION__CONFIG__TOKEN_MAPPING="{\"<gitlab-repo-id>\": [\"getport-labs/**\"], \"<gitlab-repo-id>\": [\"getport-labs/**\"]}",
OCEAN__INTEGRATION__CONFIG__APP_HOST="<app-host>",
OCEAN__INTEGRATION__IDENTIFIER="gitlab",
OCEAN__INTEGRATION__CONFIG__TOKEN_GROUP_HOOKS_OVERRIDE_MAPPING="{\"<gitlab-repo-id>\":[\"getport-labs/tal-group\"]}"
7 changes: 4 additions & 3 deletions port_ocean/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ class PortSettings(BaseOceanModel, extra=Extra.allow):
class IntegrationSettings(BaseOceanModel, extra=Extra.allow):
identifier: str
type: str
config: dict[str, Any] | BaseModel
config: dict[str, Any] | BaseModel = Field(default_factory=dict)

@root_validator(pre=True)
def a(cls, values: dict[str, Any]) -> dict[str, Any]:
def root_validator(cls, values: dict[str, Any]) -> dict[str, Any]:
integ_type = values.get("type")

if not integ_type:
Expand All @@ -68,4 +68,5 @@ class IntegrationConfiguration(BaseOceanSettings, extra=Extra.allow):
send_raw_data_examples: bool = True
port: PortSettings
event_listener: EventListenerSettingsType
integration: IntegrationSettings
# If an identifier or type is not provided, it will be generated based on the integration name
integration: IntegrationSettings = IntegrationSettings(type="", identifier="")
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "port-ocean"
version = "0.5.25"
version = "0.5.26"
description = "Port Ocean is a CLI tool for managing your Port projects."
readme = "README.md"
homepage = "https://app.getport.io"
Expand Down

0 comments on commit 7af594b

Please sign in to comment.