Quick start

View as Markdown

An artifact stores build output as versions that another pipeline, a sandbox or the CLI downloads by name. You can also upload files to a version in the UI or with the bdy artifact publish command, without a pipeline (Bucket).

Create an artifact

You create a Bucket artifact in the UI or from the CLI. Before a pipeline can publish anything, it needs access to the artifact in the Permissions tab.

Create an artifact in the UI

In the project sidebar, open Artifacts, click New artifact and select Bucket.

Image loading...Artifact types in the New artifact menu

The form has four fields:

  • Name - the artifact name, which its ID is created from, for example my-app-build,
  • Scope - workspace, project or environment,
  • Initial version name - the name of the first version, 1.0.0 by default,
  • Access control - access to the files from outside Buddy: Buddy Auth, HTTP BA or Public.

Image loading...New Bucket artifact form

When you save the form, an empty 1.0.0 version is created right away.

Create an artifact using the CLI

bash
bdy artifact create my-app-build -b -p my-project
$
Warning
The flag you pass to bdy artifact create sets access to the artifact files: - -b - enables Buddy Auth, requiring authentication with a Buddy account - -a user:pass - enables HTTP Basic Authentication with the specified username and password - Without -b or -a - the artifact is public, and its versions are accessible without authentication at https://<version>-my-app-build-<workspace>.bucket-2.registry.sh bdy artifact publish with the -c flag also creates a public artifact.

Configure pipeline permissions

Before the first run, open the Permissions tab of the artifact and, in the Pipeline section, use the + button to add the pipelines that will use the artifact. The All pipelines row can stay on Deny, so the other pipelines have no access to the versions. The minimum level depends on the action:

Action Minimum permission level
Download Artifact Version Read-only
Publish Artifact Version Read-write

Image loading...Pipeline entry with its own access level while All pipelines is set to Deny

Permissions and access describes the other levels and access for sandboxes. Troubleshooting lists the access errors and how to fix them.

Publish a version from a pipeline

The Publish Artifact Version action publishes files from the pipeline filesystem as one or more artifact versions. The following pipeline generates a sample file in the dist directory and publishes the directory contents as build-<run ID> and latest:

yaml
- pipeline: build-and-publish
  name: Build and publish
  refs:
  - refs/heads/main
  actions:
  - action: Build
    type: BUILD
    docker_image_name: library/ubuntu
    docker_image_tag: "24.04"
    commands: |-
      mkdir -p dist
      echo "build $BUDDY_RUN_ID" > dist/index.html
  - action: Publish artifact version
    type: PUBLISH_ARTIFACT_VERSION
    artifact: my-app-build
    versions:
    - build-$BUDDY_RUN_ID
    - latest
    input_type: BUILD_ARTIFACTS
    local_path: /dist

Replace the commands in the Build action with your own build. input_type: BUILD_ARTIFACTS means files from the pipeline filesystem, and local_path points to the directory to publish.

In the run log, the action has a separate setup step and a separate step for each version in the versions list. The next actions have access to the BUDDY_ARTIFACT_* variables:

BUDDY_ARTIFACT=my-app-build
BUDDY_ARTIFACT_VERSION=build-3
BUDDY_ARTIFACT_VERSION_RAW_URL=https://build-3-my-app-build-my-workspace.bucket-2.registry.sh
BUDDY_ARTIFACT_VERSION_URL=https://app.buddy.works/my-workspace/my-project/artifacts/<id>/versions/<versionId>

Image loading...Publish artifact version action log with output variables

Download the version in another pipeline

The Download Artifact Version action copies the files of the selected version to the pipeline filesystem. The second pipeline downloads the latest version to the downloaded directory and lists the files:

yaml
- pipeline: use-build
  name: Use build
  refs:
  - refs/heads/main
  actions:
  - action: Download artifact version
    type: DOWNLOAD_ARTIFACT_VERSION
    artifact: my-app-build
    version: latest
    destination_path: /downloaded
    overwrite: true
  - action: List downloaded
    type: BUILD
    docker_image_name: library/ubuntu
    docker_image_tag: "24.04"
    commands: |-
      find downloaded -type f

The pipeline filesystem persists between runs. In the second run, the downloaded directory already contains the files from the first one, so the download fails without overwrite: true.

Warning
latest is a literal version name explicitly published by the first pipeline on every run. It does not automatically reference the most recently published version. If the latest version is not published, specify an existing version name in the action, e.g. build-3.

Publish and download versions using the CLI

Without a pipeline, you publish and download a directory with the CLI:

bash
bdy artifact publish my-app-build:1.1.0 ./dist -p my-project
bdy artifact download my-app-build:1.1.0 ./out -p my-project
$$
  • Without a version number, publish saves the files to the latest version.
  • Publishing the same version again fails with Artifact version exists. Change version name or use --force flag. The -f flag replaces the whole content of the version, without merging it with the previous files.
  • download to a non-empty directory requires -m (keeps local files) or -r (clears the directory before the download).

The CLI reference describes all flags.

Browsing artifact versions

The list of versions is in the Versions tab. The content of the selected version is in the Browse tab, where you can download each file (Download) or open it in raw form (Raw).

Image loading...Versions tab of an artifact

Image loading...Browse tab with the files of an artifact version

See also:

Last modified on Dec 3, 2026