loading...
Cover image for JFrog Platform - Distribution automation using Pipelines
JFrog

JFrog Platform - Distribution automation using Pipelines

dishameswania profile image Disha Meswania ・3 min read

Several organizations that are looking forward to adopting complete DevOps, need a one-stop solution for their CI/CD processes. With the newest addition of JFrog Pipelines, the JFrog platform provides end-to-end automation of your DevOps workflow.

As Continuous integrations with JFrog Pipelines is a major amendment for many organizations - modifying the build processes can be a slow and gradual process. However, the Continuous delivery process can be automated easily with the one-stop solution of the JFrog Platform using Distribution and Pipelines.

In this blog, we will be focusing on the step-by-step configuration of the JFrog Pipeline to automate the Distribution flow to various Edge nodes.

Pre-requisites:


Step1:
Creating a release bundle in Distribution using Pipeline native steps and resources

For Example:

      - name: Create_ReleaseBundle
        type: CreateReleaseBundle
        configuration:
          releaseBundleName:        Demo_RB
          releaseBundleVersion:     V1.2.${run_number}
          inputResources:
            - name:                final_docker_gradleBuild_Info
            - name:                final_docker_npmBuild_Info 
          outputResources:
            - name:                New_ReleaseBundle
          description:              Release Bundle of gradle and npm 
          releaseNotes:
            syntax:                 markdown
            content: |
              ## Heading
                * Bullet
                * Points

(Please note; the inputResources here are defined as build info resources in this Pipeline)

Once the bundle is created, we can view it in JFrog Distribution as below;
Alt Text


Step2:
Sign the release bundle (Can be done with the above step by adding the sign parameter as ‘true’)

For example:

   - name: Sign_ReleaseBundle
     type: SignReleaseBundle
     configuration:
     inputResources:
       - name:    New_ReleaseBundle
         trigger: true
     outputResources:
       - name:  Signed_ReleaseBundle

Step3:
Creating the Distribution rule resource to define the Edge nodes where we want to distribute our releases

For example:

   - name:           Distribution_Rule
     type:           DistributionRule
     configuration:
       sourceDistribution:   distribution
       serviceName:          edge-jpd
       siteName:             "edge-jpd"
       cityName:             "*"
       countryCodes:
         - "*"

Step4:
Distributing the release bundle by using the input resources - Release bundle + Distribution rule created in the above steps

For example:

   - name: Distribute_ReleaseBundle
     type: DistributeReleaseBundle
     configuration:
       dryRun: false
       inputResources:
         - name: Signed_ReleaseBundle
           trigger: true
         - name: Distribution_Rule

After the Distribution is complete - we can view the release bundle completion in JFrog UI of both Source and Destination Edge nodes as below:

In Source - Distribution tracking
Alt Text

In Edge node - Available packages that were Distributed
Alt Text


Thus, in some simple steps - we can automate the whole process of distribution using JFrog Pipelines.

In other words, our continuous delivery processes can be streamlined along with our Continuous integration processes and we are able to have an end-to-end CI/CD implementation.

Wishing you fast and healthy software deliveries!
The JFrog Platform

Posted on Jun 2 by:

dishameswania profile

Disha Meswania

@dishameswania

An Enterprise Solutions Lead at JFrog, a DevOps enthusiast and a keen learner.

JFrog

JFrog products seamlessly integrate with practically any development environment on Earth, from legacy code to the most recent containers and micro-services.

Discussion

markdown guide