capabilities.work

Publish Build and Set Retention

A 3-step recipe with JFrog Artifactory. We can help you get access.

Recipe · 3 steps

Publish Build and Set Retention

with JFrog Artifactory · Continuous Integration Management

Publish build info, list its runs, and set a retention policy.

  1. Publish the build info record for the named build and number.
  2. List the runs recorded for the build name to confirm the publish was captured before configuring retention.
  3. Apply a retention policy that keeps at most the requested number of builds and deletes their artifacts on cleanup.
What you'll need to have ready
  • accessToken: Bearer access token for authenticating with Artifactory.
  • buildName: The name of the build.
  • buildNumber: The build number (version).
  • started: The build start timestamp in ISO8601 format.
  • retentionCount: Maximum number of builds to keep (-1 means unlimited).
For your developer

Arazzo workflow artifactory:publish-build-and-set-retention, 3 operations: publishBuildInfo → getBuildRuns → setBuildRetention. Specs on APIs.io.