Skip to content
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

add initial private package support #170

Merged
merged 4 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
48 changes: 29 additions & 19 deletions schemas/latest/dependencies-latest.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,11 @@
"anyOf": [
{
"type": "object",
"required": [
"package",
"version"
],
"required": ["package", "version"],
"properties": {
"version": {
"title": "Package version",
"type": [
"string",
"number",
"array"
],
"type": ["string", "number", "array"],
"description": "A semantic version string or range, such as [\">=1.0.0\", \"<2.0.0\"]"
},
"install-prerelease": {
Expand All @@ -47,19 +40,39 @@
"title": "Package identifier",
"type": "string",
"description": "Must be in format `org_name/package_name`. Refer to hub.getdbt.com for installation instructions",
"examples": [
"dbt-labs/dbt_utils"
],
"examples": ["dbt-labs/dbt_utils"],
"pattern": "^[\\w\\-\\.]+/[\\w\\-\\.]+$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"git"
],
"required": ["private"],
"properties": {
"revision": {
"title": "Revision",
"description": "Pin your package to a specific release by specifying a release name",
"type": "string"
},
"subdirectory": {
"title": "Repo subdirectory",
"description": "Subdirectory of the repo where the dbt package is located",
"type": "string"
},
"private": {
"title": "Package identifier",
"description": "Must be in format `org_name/package_name`. Refer to docs.getdbt.com for installation instructions",
"type": "string",
"examples": ["dbt-labs/private_dbt_utils"],
"pattern": "^[\\w\\-\\.]+/[\\w\\-\\.]+$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": ["git"],
"properties": {
"git": {
"title": "Git URL",
Expand All @@ -80,10 +93,7 @@
},
{
"type": "object",
"required": [
"tarball",
"name"
],
"required": ["tarball", "name"],
"properties": {
"tarball": {
"title": "Internally-hosted tarball URL",
Expand Down
56 changes: 41 additions & 15 deletions schemas/latest/packages-latest.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"title": "packages",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"required": [
"packages"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"packages": {
"type": "array",
Expand All @@ -19,22 +19,22 @@
"properties": {
"version": {
"title": "Package version",
"description": "A semantic version string or range, such as [\">=1.0.0\", \"<2.0.0\"]",
"type": [
"string",
"number",
"array"
],
"description": "A semantic version string or range, such as [\">=1.0.0\", \"<2.0.0\"]"
]
},
"install-prerelease": {
"title": "Install Prerelease",
"type": "boolean",
"description": "Opt in to prerelease versions of a package"
"description": "Opt in to prerelease versions of a package",
"type": "boolean"
},
"package": {
"title": "Package identifier",
"type": "string",
"description": "Must be in format `org_name/package_name`. Refer to hub.getdbt.com for installation instructions",
"type": "string",
"examples": [
"dbt-labs/dbt_utils"
],
Expand All @@ -43,6 +43,32 @@
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"private"
],
"properties": {
"revision": {
"title": "Revision",
"description": "Pin your package to a specific release by specifying a release name",
"type": "string"
},
"subdirectory": {
"title": "Repo subdirectory",
"description": "Subdirectory of the repo where the dbt package is located",
"type": "string"
},
"private": {
"title": "Package identifier",
"description": "Must be in format `org_name/package_name`. Refer to docs.getdbt.com for installation instructions",
"type": "string",
"examples": ["dbt-labs/private_dbt_utils"],
"pattern": "^[\\w\\-\\.]+/[\\w\\-\\.]+$"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
Expand All @@ -55,13 +81,13 @@
},
"revision": {
"title": "Revision",
"type": "string",
"description": "Pin your package to a specific release by specifying a release name"
"description": "Pin your package to a specific release by specifying a release name",
"type": "string"
},
"subdirectory": {
"title": "Subdirectory",
"type": "string",
"description": "Only required if the package is nested in a subdirectory of the git project"
"description": "Only required if the package is nested in a subdirectory of the git project",
"type": "string"
}
},
"additionalProperties": false
Expand All @@ -73,13 +99,13 @@
"name"
],
"properties": {
"name": {
"description": "dbt will create a subdirectory in your `packages-install-path` with this name, and the tarball's source code will be installed here.",
"type": "string"
},
"tarball": {
"title": "Internally-hosted tarball URL",
"type": "string"
},
"name": {
"type": "string",
"description": "dbt will create a subdirectory in your `packages-install-path` with this name, and the tarball's source code will be installed here."
}
},
"additionalProperties": false
Expand All @@ -99,4 +125,4 @@
}
},
"additionalProperties": false
}
}
6 changes: 5 additions & 1 deletion tests/latest/valid/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ projects:

packages:
- package: dbt-labs/dbt-utils
version: 1.0.0
version: 1.0.0

- private: dbt-labs/private_dbt_utils
revision: 1.0.0
subdirectory: mango
6 changes: 5 additions & 1 deletion tests/latest/valid/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ packages:
- local: /opt/dbt/redshift

- tarball: abc123
name: some_package
name: some_package

- private: dbt-labs/private_dbt_utils
revision: 1.0.0
subdirectory: banjo
Loading