arazzo: 1.0.1 info: title: Artifactory Rename Build and Verify summary: Confirm a build exists, rename it, then read the runs under its new name. description: >- A build identity-management flow for JFrog Artifactory. The workflow reads the runs for an existing build name to confirm it exists, renames the build to a new name, and then reads the runs under the new name to verify the rename took effect. 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: artifactoryBuildApi url: ../openapi/artifactory-build-integration-api-openapi.yml type: openapi workflows: - workflowId: rename-build-and-verify summary: Verify a build, rename it, and confirm runs under the new name. description: >- Reads the runs for the original build name, renames the build, and reads the runs under the new name to confirm the rename succeeded. inputs: type: object required: - accessToken - buildName - newBuildName properties: accessToken: type: string description: Bearer access token for authenticating with Artifactory. buildName: type: string description: The current name of the build. newBuildName: type: string description: The new name to rename the build to. steps: - stepId: getOriginalRuns description: >- Read the runs for the existing build name to confirm the build exists before renaming it. operationId: getBuildRuns parameters: - name: Authorization in: header value: Bearer $inputs.accessToken - name: buildName in: path value: $inputs.buildName successCriteria: - condition: $statusCode == 200 outputs: originalRuns: $response.body#/buildsNumbers - stepId: renameBuild description: Rename the build to the new name. operationId: renameBuild parameters: - name: Authorization in: header value: Bearer $inputs.accessToken - name: buildName in: path value: $inputs.buildName - name: to in: query value: $inputs.newBuildName successCriteria: - condition: $statusCode == 200 outputs: renameStatus: $statusCode - stepId: getRenamedRuns description: >- Read the runs under the new build name to verify the rename took effect. operationId: getBuildRuns parameters: - name: Authorization in: header value: Bearer $inputs.accessToken - name: buildName in: path value: $inputs.newBuildName successCriteria: - condition: $statusCode == 200 outputs: renamedRuns: $response.body#/buildsNumbers outputs: renameStatus: $steps.renameBuild.outputs.renameStatus renamedRuns: $steps.getRenamedRuns.outputs.renamedRuns