Please follow the below steps
Overview
This document will shed a light on how to deploy RPi Java API provider implementation deployment to maven repo
Repository Details
Provider implementation to Artifact repositories from Jenkins job
1.Creating Jenkins job
- From Jenkins, select “New Item”,
Image Added - 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
Configure Source Code Management
- In ‘Source Code Management’, select git and under ‘Repository’ add the repo detail
...
Project
...
Description
...
Repository
...
Branch
...
eg : ‘
https://code.rdkcentral.com/r/admin/repos/rdk/tools/automatics/rpi-provider/java-handler’ and also add the repo credentials
Image Added
- Also add the branch of the repository in ‘Branches to build’
eg : */rdk-next
...
Guide to Test Execution
Partner have to do following in Automatics to execute tests.
- Automatics Orchestration Configuration
- Deploy dependent artifacts
- Test Jenkins Job Configuration
Deploy RPi Java Provider Implementation
RPi java provider implementation can be deployed using maven to the Partner Artifcatory repository, in the below order.
Image Added
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 : @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 Added
Configure Build Environment
- In ‘Build Environment’, select ‘Delete workspace before build starts’
Image Added
Configure Build Settings
- 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’RPi Java Provider Implementation
- Repo : rdk/tools/automatics/rpi-provider/java-handler
- Clone the above project from the repo to the machine.
Execute 'mvn clean deploy' after cloning the repo. This will deploy RPi java provider implementation in self-hosted maven artifact repository.