ork packages
Manage versioned function, source, and sink package artifacts in your Orca Workspace with the ork packages commands.
The ork packages commands manage versioned package artifacts through the Workspace registry API. A package is an uploaded artifact - a function JAR or Python or Go binary, or a source or sink NAR - that functions, sources, and sinks deploy from. These commands require the cloud.sn.io extension and are unavailable on a self-hosted engine.
Commands read --registry-url / ORCA_REGISTRY_URL and exactly one credential: --access-token / ORCA_ACCESS_TOKEN or --api-key / ORCA_API_KEY. See ork CLI for setup.
Package URLs
Package commands identify artifacts with a package URL of the form:
<type>://<package_name>[@<version>]<type> is one of function, source, or sink. Some commands require a version (@<version>) and some require its absence:
list-versionstakes a URL without a version, for examplefunction://word-count.get-metadata,update-metadata,upload,download, anddeletetake a URL with a version, for examplefunction://word-count@1.0.0.
ork packages
├── list List packages of a type
├── list-versions List versions of a package
├── get-metadata Get version metadata
├── update-metadata Update version metadata
├── upload Upload a version
├── download Download a version
└── delete Delete a versionork packages list
List the package URLs of a given type. The --type flag is required.
ork packages list --type <type> [flags]| Flag | Shorthand | Default | Description |
|---|---|---|---|
--type | Package type: function, source, or sink. Required. | ||
--output | -o | text | Output format: text, json, or yaml. |
ork packages list --type function \
--registry-url "$ORCA_REGISTRY_URL" \
--access-token "$ORCA_ACCESS_TOKEN"The returned URLs have no version suffix, so you can pass them straight to list-versions.
ork packages list-versions
List all uploaded versions of a package. The package URL must not include a version.
ork packages list-versions [package-url] [flags]| Flag | Shorthand | Default | Description |
|---|---|---|---|
--output | -o | text | Output format: text, json, or yaml. |
ork packages list-versions function://word-countork packages get-metadata
Get the stored metadata for a specific package version. The package URL must include a version.
ork packages get-metadata [package-url] [flags]| Flag | Shorthand | Default | Description |
|---|---|---|---|
--output | -o | text | Output format: text, json, or yaml. |
ork packages get-metadata function://word-count@1.0.0 -o yamlork packages update-metadata
Update the description, contact, or custom properties of a package version without re-uploading the artifact. The package URL must include a version, and at least one of --description, --contact, --properties, or --clear-properties is required.
ork packages update-metadata [package-url] [flags]| Flag | Shorthand | Default | Description |
|---|---|---|---|
--description | Package description. | ||
--contact | Package contact. | ||
--properties | -P | Package properties as key=value. Repeatable. | |
--clear-properties | Remove all package properties. Cannot be combined with --properties. |
ork packages update-metadata function://word-count@1.0.0 \
--registry-url "$ORCA_REGISTRY_URL" \
--access-token "$ORCA_ACCESS_TOKEN" \
--description "Word count function" \
--properties team=streamingork packages upload
Upload a local artifact to a specific package version. The package URL must include the type, name, and version, and --path must point to the local file. You can attach metadata at upload time with the same metadata flags as update-metadata.
ork packages upload [package-url] --path <file> [flags]| Flag | Shorthand | Default | Description |
|---|---|---|---|
--path | Path to the local package file. Required. | ||
--description | Package description. | ||
--contact | Package contact. | ||
--properties | -P | Package properties as key=value. Repeatable. |
ork packages upload function://word-count@1.0.0 \
--registry-url "$ORCA_REGISTRY_URL" \
--access-token "$ORCA_ACCESS_TOKEN" \
--path ./word-count.jar \
--description "Word count function"ork packages download
Download the artifact for a package version to a local file. The package URL must include a version, and --path selects where the file is written.
ork packages download [package-url] --path <file>| Flag | Default | Description |
|---|---|---|
--path | Path to write the package file to. Required. |
ork packages download function://word-count@1.0.0 --path ./word-count.jarork packages delete
Delete a specific package version from the Workspace registry. The package URL must include the version to remove.
ork packages delete [package-url]ork packages delete function://word-count@1.0.0 \
--registry-url "$ORCA_REGISTRY_URL" \
--access-token "$ORCA_ACCESS_TOKEN"