RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
For python integration in automatics, 2 Jobs should be created for the below functionalities
Please follow the below steps to create Automatics Python Library and distribute across jenkins VM from Jenkins job
eg : ‘https://code.rdkcentral.com/r/rdk/tools/automatics’ and also add the repo credentials
eg : */rdk-python
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
#/bin/sh python3 setup.py bdist_wheel python3 setup.py sdist pip3 install --upgrade -e .
The job creation for test execution can be done using the steps available in the page Jenkins Job for Test Execution . Only change is in the Jenkins Job for Test Execution#ConfigureBuild section. The changes are as follows
This code will create a new folder called "automaticsPythonTest" in your jenkins job workspace and clone your Python Test scripts to this location
mkdir /var/lib/jenkins/workspace/$BUILD_JOB_NAME/automaticsPythonTest cd /var/lib/jenkins/workspace/$BUILD_JOB_NAME/automaticsPythonTest # specify the repository URL of python script repo_url="<YOUR_PYTHON_TESTCASE_GIT_REPO_URL>" # specify the target directory for cloning target_dir="/var/lib/jenkins/workspace/$BUILD_JOB_NAME/automaticsPythonTest" # specify the branch name branch_name="<YOUR_PYTHON_TESTCASE_GIT_REPO_BRANCH>" # clone the repository git clone --branch $branch_name $repo_url $target_dir # change to the target directory cd $target_dir
So the final Execute shell script will look somewhat like below
One point to note here is you need to use the newly available pre-test-config_py.sh in this job, this is to add the maven shade plugin dependency to the pom.xml to create an executable jar. This executable jar is required to communicate from python scripts to java in order to access the already available APIs in automatics Core and utils