Release Bundle V2

JFrog Pipelines Documentation

Products
JFrog Pipelines
Content Type
User Guide
ft:sourceType
Paligo

This Pipelines Task creates Release Bundle V2.

This task performs the following:

  • Creates release bundle from one or more build info.

  • Allows to create new release bundle from one or more existing release bundles.

  • Create release bundle from artifacts.

  • Creates release bundle from AQL.

  • Creates release bundle from release bundle.

  • Creates a new version of existing release bundle.

  • Creates a new release bundle with a different name from existing release bundle.

Prerequisites

A release bundle can be created from:

  • BuildInfo

  • Existing ReleaseBundle

  • Artifact

  • Artifactory Query Language

Note

The availability of dependencies depends on the source of the release bundle. For instance, if the release bundle is created from build info, the specified build info must be accessible; otherwise, the creation of the release bundle is halted.

Set the env variable JFROG_CLI_BUILD_PROJECT=<project_key> to create project specific release bundles.

Following is an example for creating release bundle AQL resource:

- name: releaseBundleAQL
    type: Aql
    configuration:
      sourceArtifactory: int_default_artifactory
      query: 'items.find({"$or" : [{"repo": {"$match": "demo-docker-local"}}, {"name": {"$match": "demo-docker-local"}}]})'

The releaseBundleAQL must be provided as inputResources for the step as shown below that utilizes the task.

  steps:
      - name: test_{{.Values.taskName }}
        type: Bash
        configuration:
          inputResources:
            - name: releaseBundleAQL
Usage

Provide a sample configuration for running.

Basic 

- task: jfrog/release-bundle@v0.0.1
  repository: pipelines-tasks-virtual
  id: my-app-release-bundle
  input:
    jfrogPlatformToken: <jfrog platform token integration>
    name: myApp
    version: 1.0.0
    sourceAQL: releaseBundleAQLResource
    sourceArtifactPaths: |
     - "path":"demo-docker-local/demo_microservice_1/10/manifest.json" "sha256":"37cb8b771b82e5fe36b385464096e493845youtc71a3cc924d35bb2d870e33bd9695b3"
    sourceReleaseBundles: |
     - "build_repository":"test-build-info" "project_key":"default" "repository_key":"release-bundles-v2" "release_bundle_name":"test_bhanu_rb" "release_bundle_version":"2.0.0"
    sourceBuildInfos: >
     - "build_name:demo_maven" "build_number:6" "include_dependencies:false"
    signing: <defaultSigningKeys>
Input Variables

Name

Required

Default

Description

jfrogPlatformToken

true

jfrog platform token integration used to create release bundle.

name

true

$JFROG_CLI_BUILD_PROJECT-$JFROG_CLI_BUILD_NAME

Name of the release bundle

version

true

$JFROG_CLI_BUILD_NUMBER

Version of the release bundle

sourceAQL

false

 

AQL type resource name, resource name should be part of inputResources

sourceArtifactPaths

false

 

Artifact paths used to create release bundle

sourceReleaseBundles

false

 

Release bundle used to create release bundle

sourceBuildInfos

false

Build Info used to create release bundles

signing

true

A generic integration with key and passphrase

Exported Environment Variables

ReleaseBundleName

How does it work?

It creates the JFrog Release Bundle task using the required input parameters, and specifies the source artifacts, release bundles, and build information required for the release bundle creation process.

It utilizes Artifactory REST APIs for creating release bundle.

Note

If all the inputs are provided such as AQL, artifactPath, releaseBundle, buildInfo. The order of priority is as follows:

  • buildinfo

  • releaseBundle

  • artifactPath

  • AQL

Troubleshooting

If a release bundle already exists with given name and version, the creation of release bundle fails with status code 409.

If AQL is given as preferred source for creating release bundle, make sure the created AQL resource is passed as input resource for the step.

Related Tasks