Artifacts

5 minute read

Artifacts are the output of a software development process, such as configuration files or test suites, and are often stored in a cloud storage service. Artifacts can be downloaded from storage and used in subsequent testing or deploy steps in your development pipeline.

Versioning of an artifact enables you to manage artifacts effectively, providing the following:

  • Traceability: Tie an artifact to the specific workflow run where it was created.

  • Reusability: Reuse artifacts with consistency across environments and deployments.

  • Reliability and compliance: Link artifacts to evidence such as image digests or chart names.

Prerequisites

Check that you have added the appropriate action to your workflow to collect artifact data:

Table 1. Required action, depending on workflow type.
If your workflow is: Required action to collect data

CloudBees platform workflow

GitHub Actions (GHA) workflow

Access an artifact

Use Artifacts to access information related to artifacts generated by workflow runs.

  1. Access artifacts from any of the following options:

    • Select Components, and then select a Component that has a workflow run producing a build artifact.

      1. Select Runs.

      2. Select a run, and then select Runs  Run details  Build artifacts.

        This view provides the following information for build artifacts:

        • Artifact name.

        • Artifact version.

        • A link to the artifact digest.

        • A link to the artifact location.

    • Select Components, and then select a Component that has a workflow run producing an artifact.

      1. Select Components  Artifacts to view associated artifacts.

        This view provides extra information for each listed artifact. In addition to name, version, digest, and location information (available above in Build artifacts), this view provides:

    • Select Applications, and then select an Application that has a release that includes an artifact.

      1. Select Applications  Releases, and then select a release Name.

      2. Select an Artifact to display the Components  Artifacts view described above.

  2. (Optional) Filter and search for artifact versions using the available options:

    The filter and search features are only available if you access your selected artifact from Components  Artifacts or Applications  Releases.
    • Search for a specific artifact by entering all or part of its name into Search.

    • Select Filter to select for only those artifacts with specific names and/or labels.

    • Select Toggled on to display the full version history. The default display (Toggled off) shows only the latest artifact versions.

Your artifact version information may not be listed yet because it is still waiting to be generated.

The artifacts built or deployed by a workflow run in that component or application are displayed accordingly, as in the example below.

Artifacts
Figure 1. An example component artifact list of just the latest versions.
  1. Select Create version to create an artifact version.

  2. Toggled off displays only the latest artifact versions. Select Toggled on to display the full version history.

  3. Add, edit, or remove artifact labels. You can filter the list via labels.

  4. Select Copy to copy a Digest or Location path.

  5. Select a run link to display the Run details of the run that published the artifact.

  6. Select View deployment history to display an artifact’s history.

Create an artifact version

Create an artifact version to:

  • Keep track of specific artifact versions linked to a workflow run.

  • Maintain observability for compliance reasons.

  • Manage dependencies effectively.

  • Automatically deploy newer versions of artifacts to different environments as part of automated workflows.

To create an artifact version:

  1. Select Components, and then select a Component.

  2. Select Components  Artifacts.

  3. Select Create version.

  4. Enter a Name for the artifact.

    You can include the path for the artifact in the name.
  5. Enter the version.

  6. Enter the URL location of the artifact version.

  7. (Optional) Enter the Job URL the URL of the workflow run that has built the artifact version.

  8. (Optional) Enter the Digest the signature of the artifact version binary (usually provided by the host repository).

  9. Select Save.

The artifact version is created accordingly.

Deployment and publish history

The deployment and publish history provides an information timeline for each artifact digest. The history can track an artifact across repositories using the digest, which serves as a unique digital signature for the artifact binary. In that case, the artifact name and version can be different.

To collect artifact deployment data, a workflow must contain the Register an artifact deployed to an environment action.

To access the history:

  1. Select Components, and then select a Component.

  2. Select Components  Artifacts to display the artifact list for that component.

  3. Select History for an artifact version.

The deployment and/or publish history of the artifact digest is displayed.

Deployment history
Figure 2. Example history of an artifact.

In the above history example:

  1. Select History to copy the digest.

  2. Each deployment or publishing event is specified, and listed by its timestamp, and includes the:

    • Event type: Deployed or Published.

    • Artifact name.

    • Artifact version.

    • Repository URL.

    • Link to the run details of the workflow that deployed the artifact.

If one or more of the above details are not available, nothing is listed. A message displays if no digest or history is available for the artifact.

Artifact labels

Create custom labels for your artifacts, and use them to organize and filter the artifacts listed in a component. Any text string is an acceptable label, and labels are reusable. You can add multiple labels to an artifact.

Artifact labels are useful for organizing your artifacts into groupings such as:

  • User or team.

  • Release or testing status.

  • Environment.

  • Version.

For example, you may want "Testing" and "Dev team" labels on an artifact in the development stage, and a "For release" label on all artifacts ready for production release. You can then filter the artifact list by the "For release" label, to get a convenient view of all artifacts ready for release.

If you have created multiple labels for an artifact, only one is displayed by default in the artifact list.

  • The link displays the number of additional labels not displayed.

  • Select more to display all the custom labels for an artifact.

Create or add artifact labels in the UI

Create custom labels for an artifact, and/or add existing labels. An artifact may have multiple labels.

Create an artifact label
Figure 3. Creating an artifact label, with steps highlighted.

To create or add an artifact label:

  1. Go to Components  Artifacts.

  2. Select the link next to the artifact you want to label. The link varies according to the label status:

    • Add label Add (an unlabeled artifact).

    • Edit (an artifact with a single label).

    • +n more (an artifact with n number of labels).

  3. Select Labels, and then use either of the following methods:

    • Enter a custom label, and then select Create "<custom label name>", where <custom label name> is your label name.

    • Select an existing label from the options to highlight it (not shown).

      Scroll to display all the options in the label list.
  4. (Optional) Add or create more labels using the above methods.

  5. Select Save.

The artifact is labeled accordingly.

Remove an artifact label in the UI

Remove label(s) from an artifact.

To remove an artifact label:

  1. Go to Components  Artifacts.

  2. Select either:

    • Edit, if your artifact has one label.

    • +n more, if your artifact has n number of labels.

  3. Select Labels to display the labels list, and then select either of the following methods to remove a currently used label:

    • Deselect the highlighted label in the label options.

    • Select next to the label.

  4. (Optional) Remove more labels using the above methods.

  5. Select Save.

Your selection of label(s) is removed from the artifact.

Once a label has been removed from all artifacts, it is deleted from the CloudBees platform.
If you are using GHA workflows, you can create, update, and remove labels on existing CloudBees platform artifacts with the Manage artifact labels action.