As part of this new feature, there have been 3 fields added to the .NET Pipeline Step Configuration. In order to properly use these in the pipeline, you must first add an MS Build job to the Jenkins tool and added the Powershell scripts to the Opsera Script Library. This documentation covers how to add a Jenkins MS Build Job, how to add a Powershell Script to the Opsera Script Library, and how to configure the .NET pipeline step with these.
Jenkins Job Setup
(use Jenkins tool “Windows Jenkins_QA” for screenshots because it’s configured)
In a Jenkins tool, navigate to Jobs tab.
Select +New Jenkins Job button to create a new job.
In the Create New Jenkins Jobs form, select Job Type: Build and Build Type: MS Build.
4. Select the Create button.
Note: Editing this template at a later time will not automatically update the pipeline configuration. Please update the job inside any relevant pipeline step before running the pipeline.
Scripts Setup
To run MS Build pipeline you need to add a Powershell Script to the Opsera Script Library.
To create a Powershell script, navigate to Tool Registry → Scripts and select “New Script” button.
In Create New Script form, set Language to Powershell and enter the Script.
3. Select the Create button and the script will be saved in the Opsera Script Library.
.NET Pipeline Step Configuration
In Step Setup, select Tool: .Net
In Step Configuration, set the following fields to implement MS Build Job.
Jenkins Tool - Select the Jenkins tool containing the MS Build Job.
Jenkins Job - Select Jenkin job with the MS Build Job.
SCM Account - Select an SCM account that was previously added to the selected Jenkin’s account.
Command Line Arguments - Provide custom commands.
Parameter Selection - To add parameters from Tool Registry to be used on custom commands entered in Command Line Arguments.
Opsera Script Library - From the drop down, select the Powershell script.
Connect the MS Build step to Nexus Repository:
In Step Setup, select Nexus Repository as the tool.
In Step Configuration, choose the configured Nexus Repository tool from Tool Registry.