From 5c7f1b96bd799da2c0b0b62556ae806b8971beca Mon Sep 17 00:00:00 2001 From: Joel Labes Date: Fri, 4 Oct 2024 10:02:55 +1300 Subject: [PATCH] tarball support (#168) --- schemas/latest/dependencies-latest.json | 43 +++++++++++++++++++++---- schemas/latest/packages-latest.json | 18 +++++++++++ tests/latest/valid/packages.yml | 5 ++- 3 files changed, 59 insertions(+), 7 deletions(-) diff --git a/schemas/latest/dependencies-latest.json b/schemas/latest/dependencies-latest.json index b17802a..adc3420 100644 --- a/schemas/latest/dependencies-latest.json +++ b/schemas/latest/dependencies-latest.json @@ -7,7 +7,9 @@ "type": "array", "items": { "type": "object", - "required": ["name"], + "required": [ + "name" + ], "properties": { "name": { "type": "string" @@ -22,11 +24,18 @@ "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": { @@ -38,7 +47,9 @@ "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\\-\\.]+$" } }, @@ -46,7 +57,9 @@ }, { "type": "object", - "required": ["git"], + "required": [ + "git" + ], "properties": { "git": { "title": "Git URL", @@ -65,6 +78,24 @@ }, "additionalProperties": false }, + { + "type": "object", + "required": [ + "tarball", + "name" + ], + "properties": { + "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 + }, { "type": "object", "properties": { @@ -80,4 +111,4 @@ } }, "additionalProperties": false -} +} \ No newline at end of file diff --git a/schemas/latest/packages-latest.json b/schemas/latest/packages-latest.json index 86cc8a9..e63ba55 100644 --- a/schemas/latest/packages-latest.json +++ b/schemas/latest/packages-latest.json @@ -66,6 +66,24 @@ }, "additionalProperties": false }, + { + "type": "object", + "required": [ + "tarball", + "name" + ], + "properties": { + "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 + }, { "type": "object", "properties": { diff --git a/tests/latest/valid/packages.yml b/tests/latest/valid/packages.yml index 5729aae..794e3c1 100644 --- a/tests/latest/valid/packages.yml +++ b/tests/latest/valid/packages.yml @@ -5,4 +5,7 @@ packages: - git: "https://github.com/dbt-labs/dbt-utils.git" revision: 1.0.0 - - local: /opt/dbt/redshift \ No newline at end of file + - local: /opt/dbt/redshift + + - tarball: abc123 + name: some_package \ No newline at end of file