TABLE OF CONTENTS
...
Please follow the below steps to deploy automatics core RDKV Test utils to Artifact repositories from Jenkins job
1.Creating Jenkins job
- From Jenkins, select “New Item”,
Image Modified - 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
- In ‘Source Code Management’, select git and under ‘Repository’ add the repo detail
eg eg : ‘sshhttps://gerritcode.teamccprdkcentral.com:29418/r/admin/repos/rdk/componenttools/cpcautomatics/xrerdkv-automation-dac15/rdkm-automation-rdkvutils/generictest-utils’ and also add the repo credentials
Image Removed Image Added
- Also add the branch of the repository in ‘Branches to build’
eg : */rdk-next
Image Modified
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 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 Modified
Configure Build Environment
- In ‘Build Environment’, select ‘Delete workspace before build starts’
Image Modified
Configure Build Settings
- In the ‘Build’ settings, Click on ‘Add build step’ and Select ‘Invoke top-level Maven level targets’
Image Modified
- 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 the following maven configuration. In the image shown below, maven settings.xml is placed place at /mnt/maven directory. Update the settings.xml path based on its location in partner's VM.
Image Modified
Reference - https://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html
Save the Configuration
- Click on ‘Apply’ and ‘Save’