JFrog Artifactory · Arazzo Workflow

Artifactory Publish Build and Set Retention

Version 1.0.0

Publish build info, list the build runs, then apply a retention policy.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub ArtifactsDevOpsCI/CDdocker-registryMavenPackage ManagementRepositoryArazzoWorkflows

Provider

artifactory

Workflows

publish-build-and-set-retention
Publish build info, list its runs, and set a retention policy.
Publishes a build, lists the runs for that build name to verify it was recorded, and configures a retention policy capping the number of retained builds.
3 steps inputs: accessToken, buildName, buildNumber, retentionCount, started outputs: buildsNumbers, retentionStatus
1
publishBuild
Publish the build info record for the named build and number.
2
listRuns
List the runs recorded for the build name to confirm the publish was captured before configuring retention.
3
setRetention
Apply a retention policy that keeps at most the requested number of builds and deletes their artifacts on cleanup.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Artifactory Publish Build and Set Retention
  summary: Publish build info, list the build runs, then apply a retention policy.
  description: >-
    A build lifecycle-management flow for JFrog Artifactory. The workflow
    publishes build info, lists the runs recorded for that build name to confirm
    it exists, and then applies a retention policy that bounds how many builds
    are kept. Every step spells out its request inline so the flow can be read
    and executed without opening the underlying OpenAPI description.
  version: 1.0.0
  x-realizes-capability-ids:
  - BC-4210.10
  x-capability-derivation:
    method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
    min_confidence: 0.7
    sources:
    - capability_id: BC-4210.10
      capability_name: Continuous Integration Management
      spec: artifactory-build-info-api-openapi.yml
      confidence: 0.7
    model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: buildInfoApi
  url: ../openapi/artifactory-build-info-api-openapi.yml
  type: openapi
- name: buildManagementApi
  url: ../openapi/artifactory-build-management-api-openapi.yml
  type: openapi
workflows:
- workflowId: publish-build-and-set-retention
  summary: Publish build info, list its runs, and set a retention policy.
  description: >-
    Publishes a build, lists the runs for that build name to verify it was
    recorded, and configures a retention policy capping the number of retained
    builds.
  inputs:
    type: object
    required:
    - accessToken
    - buildName
    - buildNumber
    - started
    - retentionCount
    properties:
      accessToken:
        type: string
        description: Bearer access token for authenticating with Artifactory.
      buildName:
        type: string
        description: The name of the build.
      buildNumber:
        type: string
        description: The build number (version).
      started:
        type: string
        description: The build start timestamp in ISO8601 format.
      retentionCount:
        type: integer
        description: Maximum number of builds to keep (-1 means unlimited).
  steps:
  - stepId: publishBuild
    description: Publish the build info record for the named build and number.
    operationId: publishBuildInfo
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    requestBody:
      contentType: application/json
      payload:
        version: "1.0.1"
        name: $inputs.buildName
        number: $inputs.buildNumber
        started: $inputs.started
        type: GENERIC
    successCriteria:
    - condition: $statusCode == 204
    outputs:
      publishStatus: $statusCode
  - stepId: listRuns
    description: >-
      List the runs recorded for the build name to confirm the publish was
      captured before configuring retention.
    operationId: getBuildRuns
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: buildName
      in: path
      value: $inputs.buildName
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      buildsNumbers: $response.body#/buildsNumbers
  - stepId: setRetention
    description: >-
      Apply a retention policy that keeps at most the requested number of builds
      and deletes their artifacts on cleanup.
    operationId: setBuildRetention
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: buildName
      in: path
      value: $inputs.buildName
    requestBody:
      contentType: application/json
      payload:
        deleteBuildArtifacts: true
        count: $inputs.retentionCount
        buildNumbersNotToBeDiscarded: []
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      retentionStatus: $statusCode
  outputs:
    buildsNumbers: $steps.listRuns.outputs.buildsNumbers
    retentionStatus: $steps.setRetention.outputs.retentionStatus

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/artifactory-publish-build-set-retention-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.