JFrog · Arazzo Workflow

JFrog Promote Build

Version 1.0.0

Resolve a build run and promote it to a target repository.

1 workflow 1 source API 1 provider
View Spec View on GitHub ArtifactoryCI/CDContainer RegistryDevOpsMLOpsPackage ManagementSecuritySoftware Supply ChainArazzoWorkflows

Provider

jfrog

Workflows

promote-build
Confirm a build run then promote it to a release repository.
Fetches build information for the given name and number, then promotes the build to the target repository with the supplied status and comment.
2 steps inputs: buildName, buildNumber, comment, sourceRepo, status, targetRepo outputs: promotedStatus
1
getBuild
getBuildInfo
Read the build information for the given name and number to confirm the run exists before promoting it.
2
promote
promoteBuild
Promote the confirmed build run by copying its artifacts to the target repository and applying the new status.

Source API Descriptions

Arazzo Workflow Specification

jfrog-promote-build-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: JFrog Promote Build
  summary: Resolve a build run and promote it to a target repository.
  description: >-
    The standard CI promotion flow. The workflow reads the build info for a
    specific build name and number to confirm the run exists, then promotes the
    build by copying or moving its artifacts to a target repository with a new
    status. 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
sourceDescriptions:
- name: artifactoryApi
  url: ../openapi/jfrog-artifactory-openapi.yml
  type: openapi
workflows:
- workflowId: promote-build
  summary: Confirm a build run then promote it to a release repository.
  description: >-
    Fetches build information for the given name and number, then promotes the
    build to the target repository with the supplied status and comment.
  inputs:
    type: object
    required:
    - buildName
    - buildNumber
    - targetRepo
    - status
    properties:
      buildName:
        type: string
        description: The build name to promote.
      buildNumber:
        type: string
        description: The build number (run) to promote.
      targetRepo:
        type: string
        description: The target repository to promote artifacts into.
      sourceRepo:
        type: string
        description: The source repository the artifacts currently reside in.
      status:
        type: string
        description: The promotion status to apply (e.g. staged, released).
      comment:
        type: string
        description: A comment describing the promotion.
  steps:
  - stepId: getBuild
    description: >-
      Read the build information for the given name and number to confirm the
      run exists before promoting it.
    operationId: getBuildInfo
    parameters:
    - name: buildName
      in: path
      value: $inputs.buildName
    - name: buildNumber
      in: path
      value: $inputs.buildNumber
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      buildInfo: $response.body
  - stepId: promote
    description: >-
      Promote the confirmed build run by copying its artifacts to the target
      repository and applying the new status.
    operationId: promoteBuild
    parameters:
    - name: buildName
      in: path
      value: $inputs.buildName
    - name: buildNumber
      in: path
      value: $inputs.buildNumber
    requestBody:
      contentType: application/json
      payload:
        status: $inputs.status
        comment: $inputs.comment
        sourceRepo: $inputs.sourceRepo
        targetRepo: $inputs.targetRepo
        copy: true
        artifacts: true
        dependencies: false
        failFast: true
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      promotedStatus: $inputs.status
  outputs:
    promotedStatus: $steps.promote.outputs.promotedStatus