RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
#/bin/sh
python3 setup.py bdist_wheel
python3 setup.py sdist
pip3 install --upgrade -e . |
...
This code will create a new folder called "automaticsPythonTest" in your jenkins job workspace and clone your Python Test scripts to this location
Code Block | ||||
---|---|---|---|---|
| ||||
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
Once point also to note here is you need to use the newly available pre-test-config.sh also 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