Scopes

View as Markdown

The artifact scope determines its visibility and availability to pipelines. Three scopes are supported: Workspace, Project, and Environment.

Scope Availability
Workspace All projects within the workspace
Project A specific project
Environment Runs in the specified environment, provided the environment is assigned to the pipeline

Artifact scope and permissions are independent mechanisms. A pipeline requires the appropriate permission level configured on the artifact's Permissions tab, even if the artifact is within the pipeline's project scope.

Scope configuration

You choose the scope when you create the artifact. In the UI and the CLI you can pick Workspace or Project. Environment is available only through the REST API.

Scope configuration in the UI

You set the scope in the Scope field of the New artifact form.

Image loading...New Bucket artifact form

Scope configuration using the CLI

The --scope flag sets the scope, with the value WORKSPACE or PROJECT. bdy artifact create describes the other flags.

bash
bdy artifact create shared-base-images -t CONTAINER -b --scope WORKSPACE
$

Registry addresses do not include the project

Container image references and npm package names include the workspace and artifact identifiers, regardless of the artifact scope. The project identifier is not included. For example, an image stored in a Project-scoped artifact can be downloaded using the following command:

bash
docker pull container.registry.sh/my-workspace/my-app-images:1.0.0
$

A path with the project name, e.g. container.registry.sh/my-workspace/my-project/my-app-images, fails with denied. In npm, the package scope is the workspace name: the artifact my-lib is the package @my-workspace/my-lib.

docker push and npm publish to a name that does not exist in the workspace create an artifact with Workspace scope, even when you work in a project context. Container registry and npm registry describe this.

Environment-scoped artifacts

An environment-scoped artifact is available only to a run in that environment, and only when the pipeline has the environment assigned. You create such an artifact through the REST API, with scope: ENVIRONMENT and the environment ID:

json
{
  "name": "my-app-config",
  "type": "BUCKET",
  "scope": "ENVIRONMENT",
  "environment": { "id": "<environment-id>" }
}

Environment-scoped artifacts are not listed in the UI, including the environment resource list, or in artifact lists returned by the Buddy CLI and REST API. Requests to their html_url return an HTTP 404 Not Found response.

The Publish Artifact Version action has no environment field. Only a pipeline assigned to the artifact's environment publishes a version, in a run in that environment. Environments describes how to assign environments to pipelines.

Scope in pipeline context and triggers

In the pipeline's artifacts context, the scope field accepts WORKSPACE, PROJECT, ENVIRONMENT, and ANY. The default value is ANY. Entries using the default scope are stored in shorthand notation:

yaml
artifacts:
- my-app-build:3.*

Run a pipeline with an artifact version describes a run with a selected version and the artifacts context. On artifact event describes the scope filter in the trigger.

See also:

Last modified on Dec 3, 2026