Versions Compared

Key

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

Table of Contents

Introduction

Integration of Automatics test environment to any Vendor CI portal is explained .

Automatics supports Continuous Integration and validation of RDK builds. To integrate Automatics in any CI system, the CI portal has to follow REST communication with Automatics.

Automatics has pre-configured filters for CI requests. If request parameters from CI portal matches with the filter, then the request is ACCEPTED. For ACCEPTED requests, Automatics will trigger test execution based on test strategy configured in the filter. The status of requests can be either ACCEPTED or REJECTED.

For ACCEPTED requests, Automatics sends execution status to CI portal. The execution status will be sent initially when the test execution starts. And after the test execution, complete test execution result will be sent to CI portal.


CI Portal - Automatics Communication Diagram

draw.io Diagram
bordertrue
diagramNameCI_Flow
simpleViewerfalse
width
linksauto
tbstyletop
lboxtrue
diagramWidth471
revision5

Configuring RDK Filters

CI portal should provide details such as image name and other details along with REST request.  These parameters are configured in RDK E2E Filter.

Default filter parameters expected from CI request are shown below. These parameters except 'images' are configurable from Database. Hence Partner can configure their custom parameters in CI request.

Param NameDescription
images/buildName [ image names in comma separated format ]
buildTaskBuild Task eg: CI. NG etc
packageTypeImage format
changedComponents[changed components in comma separated format ]
buildTypeBuild Type
branchesRDK build branch name

Details on configuring RDK filters and RDK E2E Requests are available at Automatics Orchestration User Manual#RDKE2EManager

CI Portal to Automatics

  • Rest based communication
  • Automatics End Point: /Automatics/handleRdkTrigger.htm
  • Description: Automatics accepts request from CI portal in this end point. Upon receiving the request from CI portal, Automatics immediately returns the response code 200  with response text 'Request received and taken for processing.'  On receiving the request, Automatics will start processing it. Based on the filters configured in Automatics Orchestration, the request from CI portal will be accepted or rejected. 
  • Response Code: 200
  • Response Body: Request received and taken for processing.

Automatics to CI Portal

  • Rest based communication
  • CI Portal End Point: /json/test
  • Description:  When a request from CI portal is accepted, Automatics Orchestration will send execution request to Jenkins. The test cases to be executed for CI validation will pre-configured  in Orchestration. Set of scripts to be executed for a CI request with image name and other param values is configured in Automatics.Upon completion of test execution, the results will be updated back to CI portal.
  • Request Content-Type: application/json
  • Request Body Format:

{
   "service":"CI_VERIFICATION",
   "status":"SUCCESS",
   "started_at":1623818325471,
   "started_by":"CI PORTAL",
   "duration":3618,
   "result":{
      "build_name":"RTG1682-portal_DEV_stable2_2021062806666sdy_NG.bin",
      "type":"qt",
      "tests":[
         {
            "test_id":"Test case id",
            "step":"Step No",
            "description":"Test step description",
            "status":"Test step status",
            "reason":"Reason for failure",
            "jira_id":"Jira Id"
         }
      ]
   },
   "finished_at":1623818329089,
   "test_jenkins_url":"http://{jenkins}/job/JOB1/612",
   "boxes":[
      {
         "eSTB_mac":"11:11:11:11:11:11",
         "eCM_mac":"11:11:11:11:11:11",
         "eSTB_ip":"2001:2001:2001:2001:2001:2001:2001:2001",
         "eCM_ip":"2001:2001:2001:2001:2001:2001:2001:2001"
      }
   ]
}

...