RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
Before configuring scripts, ensure that device models are mapped against corresponding device category in Automatics Orchestration.
Please follow the below steps to deploy automatics core to Artifact repositories from Jenkins job
Jenkins is used by Automatics for following activities.
Steps to be taken care during Jenkins configuration
Automatics Orchestration Setup#JDK1.8
Follow below steps to install and configure Jenkins in Linux
curl
command."curl --silent --location http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo | sudo tee /etc/yum.repos.d/jenkins.repo"
Sample Output:
And add the repository to your system with:
"sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key"
"
sudo yum install jenkins
"
After the installation process is completed, start the Jenkins service with:
"
systemctl start jenkins
"
To check whether it started successfully run:
"
systemctl status jenkins
"
Sample Output:
Finally enable the Jenkins service to start on system boot.
"sudo systemctl enable jenkins
"
To set up your new Jenkins installation, open your browser and type your domain or IP address followed by port 8080:
"http://your_ip_or_domain:8080"
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
You should see a 32-character long alphanumeric password.
Continue
.Install suggested plugins
box, and the installation process will start immediately. Save and Continue
.Save and Finish
button.Follow below steps to Disable CSRF protection by setting system property 'hudson.security.csrf.GlobalCrumbIssuerConfiguration.DISABLE_CSRF_PROTECTION' set to true. More details available at https://www.jenkins.io/doc/book/security/csrf-protection/ .
Refer following webpage to setup Maven 3 on Linux.
Automatics Orchestration Setup#Maven3
Automatics performs test execution in Jenkins. Following page will provide details on creating Jenkins job for test execution.
Jenkins Job for Test Execution
As part of Automatics setup, partner has to deploy automatics core in their own self hosted maven artifact repository. Automatics-core artifact to be deployed will be generated in format format 'automatics-core-{version}.jar'.
Following page will provide details on creating Jenkins job for Automatics Core deployment.
Automatics Core : Jenkins Deployment Job configuration
eg : ‘https://code.rdkcentral.com/r/rdk/tools/automatics/automatics-core’ and also add the repo credentials
eg : */rdk-next
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
Reference - https://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html
Table of Contents
In Jenkins, a pipeline is a group of events or jobs which are interlinked with one another in a sequence.
In simple words, Jenkins Pipeline is a combination of plugins that support the integration and implementation of continuous delivery pipelines using Jenkins. A pipeline has an extensible automation server for creating simple or complex delivery pipelines "as code," via pipeline DSL (Domain-specific Language).
Jenkins pipelines can be defined using a text file called Jenkins File. You can implement pipeline as code using Jenkins File, and this can be defined by using a domain specific language (DSL). With Jenkins File, you can write the steps needed for running a Jenkins pipeline.
The benefits of using Jenkins File are:
Jenkins File can be defined by either Web UI or with a Jenkins File.
Declarative versus Scripted pipeline syntax:
There are two types of syntax used for defining your Jenkins File.
Declarative:
Declarative pipeline syntax offers an easy way to create pipelines. It contains a predefined hierarchy to create Jenkins pipelines. It gives you the ability to control all aspects of a pipeline execution in a simple, straight-forward manner.
Scripted:
Scripted Jenkins pipeline runs on the Jenkins master with the help of a lightweight executor. It uses very few resources to translate the pipeline into atomic commands. Both declarative and scripted syntax are different from each other and are defined totally differently.
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:
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 | The machine on which Jenkins runs is called a node. A node block is mainly used in scripted pipeline syntax. |
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. |
RDK-M Jenkins URL
https://rdkauto14.ccp.xcal.tv:8443/
Paste this URL in respective browser.
Click on the New Item and Create a job name .
Based on the jobs we need to select the type of projects. Once project created it will be listed in job list
Pipeline Syntax For RDKM_DEPLOY_AUTOMATICS_CORE
node{
stage('Deployment DEPLOY_AUTOMATICS_CORE') {
echo "Calling RDKM_DEPLOY_AUTOMATICS_CORE Job"
build job: 'RDKM_DEPLOY_AUTOMATICS_CORE', wait: true, propagate: true
}
}
Pipeline Syntax For RDKM_DEPLOY_RDKB_TEST_UTILS
node {
stage('Deployment RDKM_DEPLOY_RDKB_TEST_UTILS') {
echo "Calling RDKM_DEPLOY_RDKB_TEST_UTILS Job"
build job: 'RDKM_DEPLOY_RDKB_TEST_UTILS', wait: true, propagate: true
}
}
Pipeline Syntax For RDKM_DEPLOY_RDKV_TEST_UTILS
node {
stage('Deployment RDKM_DEPLOY_RDKV_TEST_UTILS') {
echo "Calling RDKM_DEPLOY_RDKV_TEST_UTILS Job"
build job: 'RDKM_DEPLOY_RDKV_TEST_UTILS', wait: true, propagate: true
}
}
Pipeline Syntax For RDKM_AUTOMATICS_API_SCAN_FOR_AUTOMATICS_CORE
node {
stage('Run utility parser for Automatics Core') {
echo "Calling RDKM_AUTOMATICS_API_SCAN_FOR_AUTOMATICS_CORE Job"
build job: 'RDKM_AUTOMATICS_API_SCAN_FOR_AUTOMATICS_CORE', wait: true, propagate: true
}
}
Pipeline Syntax For RDKM_AUTOMATICS_API_SCAN_FOR_SCRIPTLESS_AUTOMATION
node {
stage('Run utility parser for Scriptless Automation') {
echo "Calling RDKM_AUTOMATICS_API_SCAN_FOR_SCRIPTLESS_AUTOMATION Job"
build job: 'RDKM_AUTOMATICS_API_SCAN_FOR_SCRIPTLESS_AUTOMATION', wait: true, propagate: true
}
}
Pipeline Syntax For RDKM_AUTOMATICS_API_SCAN_FOR_RDKB_UTILS
node {
stage('Run utility parser for RDKB Test Utils') {
echo "Calling RDKM_AUTOMATICS_API_SCAN_FOR_RDKB_UTILS Job"
build job: 'RDKM_AUTOMATICS_API_SCAN_FOR_RDKB_UTILS', wait: true, propagate: true
}
}
Pipeline Syntax For RDKM_AUTOMATICS_API_SCAN_FOR_RDKV_UTILS
node
{
stage('Run utility parser for RDKV Test Utils') {
echo "Calling RDKM_AUTOMATICS_API_SCAN_FOR_RDKV_UTILS Job"
build job: 'RDKM_AUTOMATICS_API_SCAN_FOR_RDKV_UTILS', wait: true, propagate: true
}
}