Create a release pipeline


Open your project, select the Releases entry and create a New pipeline.

AzureDevOps_14.png

In the dialog do not select a template and start with any Empty job.

AzureDevOps_15.png

Like build pipelines, release pipelines consist of stages, jobs and tasks. Other than build pipelines, they are usually defined using the UI instead of coding the yaml file directly. (Even though the same yaml syntax is being generated and used in the background). Give the first stage a name, e.g. `QA environment.

AzureDevOps_16.png

The stage will be generated containing one empty job. Select job to edit it and add tasks to it.

AzureDevOps_17.png

For demonstration purposes (in order to be able to intervene), we would like to add a manual task, that allows to decide if the release is to be resumed or cancelled once it has been triggered. Manual tasks require to be executed on the server in an agentless job, while the job created initially is a agent job. Therefore, we need to add a new, agentless job.

AzureDevOps_18.png

Move the job to the top location (making it the first job in the pipeline), give it a name, e.g. 'Prepare' and use the 'plus' sign to add a task to this job.

AzureDevOps_19.png

From the list of tasks, select Manual intervention and click Add.

AzureDevOps_20.png

Select the required task, give it a name, and add yourself as user to notify.

AzureDevOps_21.png

Select the Agent job to modify its settings and to add tasks to it. Especially, in the settings make sure to run it on the local agent pool, using the Agent pool dropdown.

AzureDevOps_22.png

As with the agentless job before, use the 'plus' sign to add the following tasks. All tasks are going to be "PowerShell" tasks, meaning the process to define will be the same for each task. First search for 'PowerShell' in the task list, select the PowerShell entry and click the Add button.

AzureDevOps_23.png

To define all the tasts, set the Script path to $(agentScriptsPath) followed by the name of the PowerShell script to use, e.g. $(agentScriptsPath)\Clear_Workspace.ps1 and the Arguments to the values defined shown below.

AzureDevOps_24.png

Important

Ultimately, the use of variables in the definitions, requires defining the corresponding variables for the release pipeline.

Task

Script

Arguments

Description

Clear Workspace

Clear_Workspace.ps1
$(workspaceRoot)

Clear the designated workspace on the agent

Get Sources

ISPW_Download_Container.ps1
$(workspaceRoot) $(hostUri) $(hostPort) $(hostUser) $(hostPassword) $(hostCodePage) $(ispwConfig) $(ispwContainerName) $(ispwContainerType) $(ispwLevel) $(cliPath)

Download the sources for the components from Code Pipeline

Get Functional Tests

Git_Clone_TTT_Repo.ps1
$(workspaceRoot) ralphnuessecpwr/FTSDEMO_$(ispwApplication)_Functional_Tests

Clone a Git repository containing Total Test Functional Test scenarios (the second parameter points to the GitHub project and repository and will require modification)

Run Functional Tests

TTT_Run_Functional_Tests.ps1
$(workspaceRoot) $(cesUri) $(hostUser) $(hostPassword) $(ispwApplication) $(tttEnvironment) $(cliPath)

Execute the Functional Test scenarios

Promote code to STG 

ISPW_Operations.ps1
ContainerOperation $(cesUrl) $(ispwConfig) assignments promote $(ispwContainerName) $(ispwLevel) $(cesToken) FTSDEMO $(ispwApplication) $(ispwServer)

Promote the code to the next level in Code Pipeline

Define release pipeline specific variables / parameters

To make use of the variables in the variable group mainframe-pipeline-parameters and to define 'parameters', select Variables on the pipeline definition. Select Variable groups, click Link variable group and add the mainframe-pipeline-parameters.

AzureDevOps_25.png

Next select Pipeline variable and add the following variables, making them all Settable at release time.

Mainframe Release Pipeline.png

Variable    

Description

ispwApplication

Code Pipeline application (passed into the process by the Code Pipeline webhook)

ispwContainerName

Code Pipeline container name (passed into the process by the Code Pipeline webhook)

ispwContainerType

Code Pipeline container type (passed into the process by the Code Pipeline webhook)

ispwLevel

Code Pipeline level (passed into the process by the Code Pipeline webhook)


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*