-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updated dependencies. * Initial support commit for v2.2. - Added the fields - Fixed broken tests - The `uuid` dependency was added because `@actions/core` requires it now * Finished updating the field versions, tests pass now. * Adding a bit of debug code. * building, and adding debug. * Adding org rules file support for `type` and `language`. * Updating snapshots. * Adding some minor tests, and updating docs. - Also added `ci-pipeline-fingerprints` support in `action.yml` - Prepping to release.
- Loading branch information
1 parent
657aac0
commit 32b95db
Showing
17 changed files
with
974 additions
and
484 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ jobs: | |
- name: Datadog Service Catalog Metadata Provider Manual Test | ||
uses: ./ | ||
with: | ||
schema-version: v2.1 | ||
schema-version: v2.2 | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
datadog-hostname: api.us5.datadoghq.com | ||
datadog-key: ${{ secrets.DATADOG_API_KEY }} | ||
|
@@ -38,6 +38,11 @@ jobs: | |
description: This is a test of the Datadog Service Catalog Metadata Provider | ||
lifecycle: production | ||
tier: p3 | ||
type: function | ||
languages: | | ||
- javascript | ||
- hopes | ||
- dreams | ||
team: Team Name Here | ||
email: [email protected] | ||
slack-support-channel: 'https://fakeorg.slack.com/archives/A0000000000' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
218 changes: 218 additions & 0 deletions
218
__tests__/data/datadog-service-catalog-schema-v2.2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,218 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://github.com/DataDog/schema/tree/main/service-catalog/v2.2/schema.json", | ||
"title": "Service Definition Schema v2.2", | ||
"description": "A service definition for providing additional service metadata and integrations v2.2", | ||
"type": "object", | ||
"properties": { | ||
"schema-version": { | ||
"description": "Schema version being used", | ||
"examples": ["v2.2"], | ||
"type": "string", | ||
"default": "v2.2", | ||
"enum": ["v2.2"] | ||
}, | ||
"dd-service": { | ||
"description": "Unique identifier of the service. Must be unique across all services, and is used to match with a service in Datadog", | ||
"examples": ["my-service"], | ||
"type": "string" | ||
}, | ||
"team": { | ||
"description": "Team that owns the service. It is used to locate a team defined in Datadog Teams if it exists", | ||
"examples": ["my-team"], | ||
"type": "string" | ||
}, | ||
"application": { | ||
"description": "Identifier for a group of related services serving a product feature, which the service is a part of", | ||
"examples": ["my-app"], | ||
"type": "string" | ||
}, | ||
"description": { | ||
"description": "A short description of the service", | ||
"examples": ["My app description"], | ||
"type": "string" | ||
}, | ||
"tier": { | ||
"description": "Importance of the service", | ||
"examples": ["1", "High"], | ||
"type": "string" | ||
}, | ||
"lifecycle": { | ||
"description": "The current life cycle phase of the service.", | ||
"examples": ["sandbox", "staging", "production", "deprecated"], | ||
"type": "string" | ||
}, | ||
"type": { | ||
"description": "The type of service", | ||
"examples": [ | ||
"web", | ||
"db", | ||
"cache", | ||
"function", | ||
"browser", | ||
"mobile", | ||
"custom" | ||
], | ||
"type": "string", | ||
"enum": ["web", "db", "cache", "function", "browser", "mobile", "custom"] | ||
}, | ||
"languages": { | ||
"description": "The service's programming language. See examples for a list of recognizable languages", | ||
"examples": [ | ||
["dotnet", "go", "java", "js", "php", "python", "ruby", "c++"] | ||
], | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"contacts": { | ||
"description": "A list of contacts related to the services. ", | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/$defs/contact" | ||
} | ||
}, | ||
"links": { | ||
"description": "A list of links related to the services. ", | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/$defs/link" | ||
} | ||
}, | ||
"tags": { | ||
"description": "A set of custom tags", | ||
"examples": [["my:tag"]], | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"integrations": { | ||
"description": "Third party integrations that Datadog supports", | ||
"type": "object", | ||
"properties": { | ||
"pagerduty": { | ||
"description": "Pagerduty integration for the service", | ||
"type": "object", | ||
"properties": { | ||
"service-url": { | ||
"description": "Pagerduty Service URL", | ||
"examples": [ | ||
"https://my-org.pagerduty.com/service-directory/PMyService" | ||
], | ||
"type": "string", | ||
"pattern": "^(https?://)?[a-zA-Z\\d_\\-.]+\\.pagerduty\\.com/service-directory/(P[a-zA-Z\\d_\\-]+)/?$" | ||
} | ||
}, | ||
"required": ["service-url"], | ||
"additionalProperties": false | ||
}, | ||
"opsgenie": { | ||
"description": "Opsgenie integration for the service", | ||
"type": "object", | ||
"properties": { | ||
"service-url": { | ||
"description": "Opsgenie Service URL", | ||
"examples": [ | ||
"https://www.opsgenie.com/service/123e4567-e89b-12d3-a456-426614174000" | ||
], | ||
"type": "string", | ||
"pattern": "^(https?://)?[a-zA-Z\\d_\\-.]+\\.opsgenie\\.com/service/([a-zA-Z\\d_\\-]+)/?$" | ||
}, | ||
"region": { | ||
"description": "Opsgenie Instance Region", | ||
"type": "string", | ||
"examples": ["US", "EU"], | ||
"enum": ["US", "EU"] | ||
} | ||
}, | ||
"required": ["service-url"], | ||
"additionalProperties": false | ||
} | ||
}, | ||
"additionalProperties": false | ||
}, | ||
"extensions": { | ||
"description": "Custom extensions", | ||
"type": "object", | ||
"additionalProperties": true | ||
}, | ||
"ci-pipeline-fingerprints": { | ||
"description": "A set of CI pipeline fingerprints related to the service", | ||
"examples": [["j88xdEy0J5lc", "eZ7LMljCk8vo"]], | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"required": ["schema-version", "dd-service"], | ||
"$defs": { | ||
"link": { | ||
"additionalProperties": false, | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"description": "Link name", | ||
"examples": ["Runbook", "Dashboard"], | ||
"type": "string" | ||
}, | ||
"type": { | ||
"description": "Link type. See examples for a list of recognizable types", | ||
"examples": ["runbook", "doc", "repo", "dashboard", "other"], | ||
"type": "string", | ||
"default": "other" | ||
}, | ||
"url": { | ||
"description": "Link url", | ||
"examples": ["https://my-runbook"], | ||
"type": "string", | ||
"format": "uri" | ||
}, | ||
"provider": { | ||
"description": "Link provider. See examples for a list of recognizable providers", | ||
"examples": ["Github", "Confluence"], | ||
"type": "string" | ||
} | ||
}, | ||
"required": ["name", "type", "url"] | ||
}, | ||
"contact": { | ||
"additionalProperties": false, | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"description": "Contact name", | ||
"examples": ["Oncall Slack", "Team Email"], | ||
"type": "string", | ||
"minLength": 2 | ||
}, | ||
"type": { | ||
"description": "Contact type. See examples for a list of recognizable types", | ||
"examples": ["email", "slack", "microsoft-teams"], | ||
"type": "string" | ||
}, | ||
"contact": { | ||
"description": "Contact value", | ||
"examples": [ | ||
"[email protected]", | ||
"https://my-org.slack.com/archives/my-channel" | ||
], | ||
"type": "string" | ||
} | ||
}, | ||
"if": { | ||
"properties": { "type": { "const": "email" } } | ||
}, | ||
"then": { | ||
"properties": { "contact": { "format": "email" } } | ||
}, | ||
"else": { | ||
"properties": { "contact": { "format": "uri" } } | ||
}, | ||
"required": ["type", "contact"] | ||
} | ||
} | ||
} |
Oops, something went wrong.