Versions Compared

Key

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

Table of Contents

...

Introduction

Automatics 3.0

...

Before configuring scripts, ensure that device models are mapped against corresponding device category in Automatics Orchestration.

  1. Execute Jenkins Job for Porting 3.0 APIs in Automatics Core project
  2. Execute Jenkins Job for Porting 3.0 APIs in Automatics Scriptless Automation project
  3. Execute Jenkins Job for Porting 3.0 APIs in RDKV Test Utils
  4. Execute Jenkins Job for Porting 3.0 APIs in RDKB Test Utils
  5. Import the json file for Test Utility from <Release page> via Automatics Orchestration
  6. Import the json file for Test Scripts from <Release page> via Automatics Orchestration
  7. Import the test script details in excel sheet in 1.0 format via Automatics Orchestration

Please follow the below steps to deploy automatics core to Artifact repositories from Jenkins job

1.Creating Jenkins job

  • From Jenkins, select “New Item”,
    Image Removed
  • Specify name of the new job to be created.
  • Select ‘OK’ button.

2. Configuration of Jenkins Job

Configure General Settings

  • In ‘General’ settings, add proper description in the ‘Description’ section
  • Check ‘Discard old builds’ checkbox

Configure Source Code Management

  • In ‘Source Code Management’, select git and under ‘Repository’ add the repo detail

 eg : ‘https://code.rdkcentral.com/r/rdk/tools/automatics/automatics-core’ and also add the repo credentials

Image Removed

  • Also add the branch of the repository in ‘Branches to build’

    eg : */rdk-next

    Image Removed

Configure Build Triggers

  • In build triggers section select ‘Poll SCM’ and enter the schedule. By this configuration, there will be a polling to the repo for any changes periodically and if there are any changes then the Jenkins build will be executed

    Eg : @hourly means the job will check for any changes in the remote repo for every 1 hour and if there are any changes, then the build will run

    Image Removed

Configure Build Environment

  • In ‘Build Environment’, select ‘Delete workspace before build starts’
    Image Removed

Configure Build Settings

  • In the ‘Build’ settings, Click on ‘Add build step’ and Select ‘Invoke top-level Maven level targets’

           Image Removed

  • Add the following maven step in the text box
    clean deploy -DaltDeploymentRepository=<id>::default::<Artifact repository path>
    altDeploymentRepository – Specifies an alternative repository to which the project artifacts should be deployed
  • Click on Advanced button in ‘Invoke top-level Maven level targets’ and add following maven configuration. In the image shown below, maven settings.xml is place at /mnt/maven directory.  Update the settings.xml path based on its location in partner's VM.

           Image Removed

           Reference - https://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html

Save the Configuration

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.

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 Added

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

Image Added

    • Select Pipeline option from the List of options
    • Navigate to the Pipeline section of the job setup page.
    • The below is a sample groovy script for creating the pipeline job. What the below script does is invoke the existing jobs in sequential order. It should invoke the job deploy Automatics Core, RDB/RDKV Utils, and the jobs needs for Automatics 3.0 which are API Scan job for Automatics Core, Scriptless Automation, RDKB/ RDKV Utils projects.
Code Block
languagegroovy
titleAutomatics 3.0 Deployment and parser Jobscript
linenumberstrue
node {
   
    stage('Deployment DEPLOY_AUTOMATICS_CORE') {
       echo "Calling Deployment-Automatics-Core Job"
       build job: '<<Name_of_Deployment_Job_for_automatics_core>>', wait: true, propagate: true
    }
    
    stage('Deployment RDKM_DEPLOY_RDKB_TEST_UTILS') {
       echo "Calling Deployment-RDKB-Utils Job"
       build job: '<<Name_of_Deployment_Job_for_rdkb_utils>>', wait: true, propagate: true
    }
    
    stage('Deployment RDKM_DEPLOY_RDKV_TEST_UTILS') {
       echo "Calling Deployment-RDKV-Utils Job"
       build job: '<<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: '<<Name_of_Utility_Parser_for_Automatics_Core>>', wait: true, propagate: true
    }
    
    stage('Run utility parser for Scriptless Automation') {
       echo "Calling RDKM_AUTOMATICS_API_SCAN_FOR_SCRIPTLESS_AUTOMATION Job"
       build job: '<<Name_of_Utility_Parser_for_scriptless_automation>>', wait: true, propagate: true
    }
    
      stage('Run utility parser for RDKB Test Utils') {
       echo "Calling RDKM_AUTOMATICS_API_SCAN_FOR_RDKB_UTILS Job"
       build job: '<<Name_of_Utility_Parser_for_rdkb_utils>>', wait: true, propagate: true
    }
    
    stage('Run utility parser for RDKV Test Utils') {
       echo "Calling RDKM_AUTOMATICS_API_SCAN_FOR_RDKV_UTILS Job"
       build job: '<<Name_of_Utility_Parser_for_rdkv_utils>>', wait: true, propagate: true
    }
}
  • Click on ‘Apply’ and ‘Save’