CloudBees action: Get artifact details

1 minute read

Use this action to retrieve an artifact’s name, version, URL, and unique digest, using the artifact ID output from CloudBees Unify.

All CloudBees action repositories are listed at CloudBees, Inc. on GitHub.
Table 1. Input details
Input name Data type Required? Description

artifact-id

String

Yes

The unique identifier of the artifact ID output from CloudBees Unify.

Outputs

Table 2. Output details
Output name Data type Description

name

String

The name of the artifact reported to CloudBees Unify.

version

String

The version of the artifact reported to CloudBees Unify.

url

String

The URL where the artifact version is located. For example, docker.io/myapp/myimg:1.0.0.

digest

String

The hash or checksum that uniquely identifies the artifact version.

Usage examples

Basic example

The following is a basic example of using the action:

- name: get-details uses: cloudbees-io/get-artifact-details@v1 with: artifact-id: 1234abcd-56ef-ab78-9012-cdef78903456

Full workflow example

The following workflow example uses the action to fetch and print the details for an artifact.

apiVersion: automation.cloudbees.io/v1alpha1 kind: workflow name: My workflow on: workflow_dispatch: jobs: getArtifactDetailsAndPrint: steps: - name: Get artifact details id: getArtifactDetails uses: cloudbees-io/get-artifact-details@v1 with: artifact-id: 1234abcd-56ef-ab78-9012-cdef78903456 - name: Print artifact details id: printArtifactDetails uses: docker://golang:1.20.3-alpine3.17 shell: sh run: | echo "Output from getArtifactDetails: " echo "name: ${{ steps.getArtifactDetails.outputs.name }}" echo "version: ${{ steps.getArtifactDetails.outputs.version }}" echo "url: ${{ steps.getArtifactDetails.outputs.url }}" echo "digest: ${{ steps.getArtifactDetails.outputs.digest }}"