Nexus Tool - Workflow
This tutorial will walk you through how to create and configure the pipeline step for Nexus Tool.
Create a Nexus Repository tool in Opsera’s Tool Registry
The following steps provide instructions on workflow for Nexus Tool:
Open Opsera Portal > Tool Registry > Click on ‘+ New Tool’ button.
Â
2. On the ‘Create New Tool’ page → Locate Nexus tool. Click ‘Select Tool’. Provide values for required fields and click ‘Create’ button to save the new tool.
Â
3. ‘Success message’ for tool creation will be displayed and Summary screen of the created tool will be displayed.
Click on ‘Connection’ tab to enter Nexus tool details
Â
4. Enter ‘Nexus URL’, User ID and Nexus Password of the tool and click on ‘Save’ button.
‘Nexus Tool configuration updated successfully!’ message will be displayed.
5. Click ‘Test Connection’ button to validate a successful connection.
Pipeline Setup
Nexus Maven Push Step Setup
1. Create a new blank pipeline template to set up the steps to attain the push of artifacts to Nexus tool.
2. On the ‘Workflow’ tab, Click on ‘Pencil’ icon on pipeline as well as on ‘Unconfigured step’.
3. Enter step name - to specify what type of step it is
Select Tool ‘Command Line’ and Click ‘Save’ → Step details will be saved successfully.
4. Click on ‘Configuration’ icon and enter the configuration details of the ‘Build’ step.
Select the Jenkins tool and respective PowerShell job
Fill the other Account, Repository and branch details and save
5. Click on ‘Edit Workflow’ button
6. Add a new step by clicking + icon which will create an unconfigured step
7. Enter Step name and select Tool as ‘Nexus Repository’ for the new unconfigured step
8. Click on ‘Save’ to save the step level details.
9. Click on ‘Configuration’ icon and enter the configuration details of the ‘Nexus’ step.
Step Tool - Select Nexus tool registered in Tool Registry
Nexus Step Type - Select ‘Push Artifacts’ from dropdown.
Repository Format - Select ‘Maven’ from dropdown.
Repository Name - Select the corresponding repository.
Group Name - Provide a group name to be created in Nexus tool.
Artifact Name - Provide an artifact name to be created in Nexus tool.
Build Step - Select the name of previous step from drop down, Output of which will be sent to Nexus.
10. Click on ‘Save’ button → Configuration details of Nexus step will be saved successfully
Nexus Docker Push Step Setup
Create a new blank pipeline template to set up the steps to attain the push of artifacts to Nexus tool.
2. On the ‘Workflow’ tab, Click on ‘Pencil’ icon on pipeline as well as on ‘Unconfigured step’.
3. Enter step name - to specify what type of step it is
Select Tool ‘Jenkins’ and Click ‘Save’ → Step details will be saved successfully.
4. Click on ‘Configuration’ icon and enter the configuration details of the ‘Build’ step.
5. Click on ‘Create job and save' button → Step configurations will be successfully saved
6. Click on ‘Edit Workflow’ button
and add a new step by clicking + icon which will create an unconfigured step
7. Enter Step name and select Tool as ‘Nexus Repository’ for the new unconfigured step
8. Click on ‘Save’ to save the step level details.
9. Click on ‘Configuration’ icon and enter the configuration details of the ‘Nexus’ step.
Step Tool- Select the configured Nexus tool registered in Tool Registry from dropdown.
Nexus Step Type - Select ‘Push Artifacts’ from the dropdown.
Repository Format - Select ‘Docker’ from the dropdown.
Select Jenkins Tool - Select the configured Jenkins tool from the Tool Registry.
Port - Enter Port if required
Select Build Step - Select name of previous step from drop down, Output of which will be sent to Nexus.
10. Click on ‘Save’ button → Configuration details of Nexus step will be saved successfully
Running Pipeline
1. Click on ‘Start pipeline’ button to start the pipeline
2. ‘Build’ step is succeeded, output of which will be sent to ‘Nexus Repository’ on next step
3. Nexus step is successful which indicates the artifact is pushed to Nexus tool Repository
4. Login to Nexus tool → Artifact is pushed on the ‘Repository > Maven Releases’ selected on ‘Nexus pipeline step’.
Artifacts are available under the ‘Group name > Kube’ and ‘Artifact name > prod’ given as part of ‘Nexus pipeline step’ configuration.
A Sample Nexus Artifact push workflow has been demonstrated above, which in the same way can be used to push any artifacts.