You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 4
Next »
Please follow the below steps to deploy RPi Java API Provider implementation to Artifact repositories from Jenkins job
1.Creating Jenkins job
- From Jenkins, select “New Item”,
![](/download/thumbnails/208045915/image2022-2-22_13-45-38.png?version=1&modificationDate=1653642787000&api=v2)
- Specify name of the new job to be created.
- Select ‘OK’ button.
2. Configuration of Jenkins Job
- 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 : ‘https://code.rdkcentral.com/r/admin/repos/rdk/tools/automatics/rpi-provider/java-handler’ and also add the repo credentials
![](/download/attachments/208045915/image2022-2-22_13-47-19.png?version=1&modificationDate=1653642787000&api=v2)
- Also add the branch of the repository in ‘Branches to build’
eg : */rdk-next
![](/download/attachments/208045915/image2022-2-22_13-54-29.png?version=1&modificationDate=1653642787000&api=v2)
- In ‘Build Environment’, select ‘Delete workspace before build starts’
![](/download/attachments/208045915/image2022-2-22_13-56-7.png?version=1&modificationDate=1653642787000&api=v2)
- In the ‘Build’ settings, Click on ‘Add build step’ and Select ‘Invoke Maven level targets’
- 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
Reference - https://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html
Save the Configuration
- Click on ‘Apply’ and ‘Save’