Upload Build Artifact
Publish a build output to Loha artifact storage as a download for people.
Reference: loha/upload-artifact@v1
Category: build
Runtime: curlimages/curl:8.5.0 (non-root, digest-pinned)
License: Apache-2.0
When to use
Use this step to publish a file people should download after the build: a release binary, a ZIP, a test report. It is not how one job hands files to another. To pass files between jobs of the same build, declare artifacts: { paths: [...] } on the producing job and needs: it from the consuming job; Loha saves and restores the files for you (see the "Passing files between jobs" guide).
Parameters
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
PATH | string | — | Yes | File path relative to WORKING_DIRECTORY. |
NAME | string | — | Yes | Stable logical name used to make retries idempotent. |
KIND | enum: archive, binary, report, file | file | No | Artifact kind. |
CONTENT_TYPE | string | application/octet-stream | No | MIME type served when the artifact is downloaded. |
WORKING_DIRECTORY | string | . | No | Directory relative to the source workspace. |
Workspaces
source(required): bound from pipeline workspacesource
Results
| Result | Description |
|---|---|
ARTIFACT_ID | Published artifact identifier |
How it works
The task reads PATH below WORKING_DIRECTORY and publishes it under the stable logical NAME, which makes a retry idempotent: publishing the same name again in the same build does not create a second artifact. KIND and CONTENT_TYPE describe the output, and ARTIFACT_ID identifies the published artifact. The file appears on the build page and on the Artifacts page, where it can be downloaded until it expires.
Published artifacts count against the workspace artifact quota and are kept for the deployment-wide retention window (14 days by default). The step fails if the file does not exist, or if artifact storage is not available on the deployment.
Which one do I use
loha/upload-artifactpublishes a download for people. A later job does not receive it.artifacts:on a job passes files to the jobs thatneedsit, at the same paths. A declared path that matches nothing fails the job. Each job's files are listed on the build page under "Job outputs".cache:speeds builds up across runs. It is never required for correctness.
A job can use more than one: save dist/ with artifacts: for the next job and also publish a zipped copy with this step.
Troubleshooting
Problem: "build artifact storage is not available for this run".
Solution: The deployment has no artifact storage configured, so nothing can be published. Ask your Loha administrator to enable it.
Problem: "artifact file not found".
Solution: Check that PATH exists relative to WORKING_DIRECTORY when the step runs. The file must be produced by an earlier step of the same job, or restored by artifacts: from a job this one needs.
Problem: A later job cannot find the file I uploaded.
Solution: This step publishes a download; it does not feed later jobs. Declare artifacts: { paths: [...] } on the producing job and add it to needs: of the consuming job.