Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Introduction

Jenkins is used by Automatics for following activities. 

  • To perform test execution.
  • To deploy Automatics Core to maven artifact repository.

Jenkins Setup

Automatics jenkins setup documentation can be found in the page : Automatics Jenkins Setup

Automatics 3.0 Custom API can be added by the partner by following the below steps

Steps to develop custom API 

  • Api Development 

Refer Automatics 3.0 - API Development to get more details on how to define Automatics API

  • Deploy the latest code to articraft

Jenkins Job can be triggered to deploy the latest code changes of project where new API is developed

Refer Jenkins Deployment Jobs for deployment jobs configurations.

  • Parse the project to update newly added API to data base

Utility parser need to be triggered for latest code changes to parse the new API and update the API details to micro service for test executions.

Refer Automatics 3.0 Utility Parser Jobs for Parser job configurations.

Automate the Deployment and Parsing jobs

...

For automating the deployment and parser jobs for Automatics, a new Pipeline job is introduced. What this pipeline job will do is it will invoke the existing jenkins freestyle jobs which does the deployment and API scanning in the correct order. The overview of jenkins pipeline job as well as the steps to create the Automatics pipeline job below.

Why use Jenkins pipeline?

Jenkins is an open continuous integration server which has the ability to support the automation of software development processes. You can create multiple automation jobs with the help of use cases, and run them as a Jenkins pipeline.

Here are the reasons why you use should use Jenkins pipeline:

  • Jenkins pipeline is implemented as a code which allows multiple users to edit and execute the pipeline process.
  • Pipelines are robust. So if your server undergoes an unforeseen restart, the pipeline will be automatically resumed.
  • You can pause the pipeline process and make it wait to resume until there is an input from the user.
  • Jenkins Pipelines supports big projects. You can run multiple jobs, and even use pipelines in a loop.

Jenkins pipeline concept

...

Term

...

Description

...

Pipeline

...

The pipeline is a set of instructions given in the form of code for continuous delivery and consists of instructions needed for the entire build process. With pipeline, you can build, test, and deliver the application.

...

Node

...

.

...

Stage

...

A stage block contains a series of steps in a pipeline. That is, the build, test, and deploy processes all come together in a stage. Generally, a stage block is used to visualize the Jenkins pipeline process.

...

Step

...

A step is nothing but a single task that executes a specific process at a defined time. A pipeline involves a series of steps.

...

Deployment and Parser Job creation

URL:<<Jenkins url>>

Go to the Dashboard of after logging in to Jenkins UI.

    • Click on New Item in the Jenkins dashboard.

Image Modified

    • Click on the New Item and Create a job name.

Image Modified

Code Block
languagegroovy
titleAutomatics 3.0 Deployment and parser Jobscript
linenumberstrue
node {
   
    stage('Deployment DEPLOY_AUTOMATICS_CORE') {
       echo "Calling CIDeployment-Automatics-Core Job"
       build job: 'CI-Automatics-Core<<Name_of_Deployment_Job_for_automatics_core>>', wait: true, propagate: true
    }
    
    stage('Deployment RDKM_DEPLOY_RDKB_TEST_UTILS') {
       echo "Calling CIDeployment-RDKB-Utils Job"
       build job: 'CI-RDKB-Utils<<Name_of_Deployment_Job_for_rdkb_utils>>', wait: true, propagate: true
    }
    
    stage('Deployment RDKM_DEPLOY_RDKV_TEST_UTILS') {
       echo "Calling CIDeployment-RDKV-Utils Job"
       build job: 'CI-RDKV-Utils<<Name_of_Deployment_Job_for_rdkv_utils>>', wait: true, propagate: true
    }
    
     stage('Run utility parser for Automatics Core') {
       echo "Calling RDKM_AUTOMATICS_API_SCAN_FOR_AUTOMATICS_CORE Job"
       build job: 'AUTOMATICS<<Name_of_APIUtility_SCANParser_FORfor_AUTOMATICSAutomatics_CORECore>>', wait: true, propagate: true
    }
    
    stage('Run utility parser for Scriptless Automation') {
       echo "Calling RDKM_AUTOMATICS_API_SCAN_FOR_SCRIPTLESS_AUTOMATION Job"
       build job: 'AUTOMATICS<<Name_of_APIUtility_SCANParser_FORfor_SCRIPTLESSscriptless_AUTOMATIONautomation>>', wait: true, propagate: true
    }
    
      stage('Run utility parser for RDKB Test Utils') {
       echo "Calling RDKM_AUTOMATICS_API_SCAN_FOR_RDKB_UTILS Job"
       build job: 'AUTOMATICS<<Name_of_APIUtility_SCANParser_FORfor_RDKBrdkb_UTILSutils>>', wait: true, propagate: true
    }
    
    stage('Run utility parser for RDKV Test Utils') {
       echo "Calling RDKM_AUTOMATICS_API_SCAN_FOR_RDKV_UTILS Job"
       build job: 'AUTOMATICS<<Name_of_APIUtility_SCANParser_FORfor_RDKVrdkv_UTILSutils>>', wait: true, propagate: true
    }
}