Skip to main content

Introduction

Overview

Pipeline templates are pre-defined configuration/script for continuous integration and continuous deployment (CI/CD) pipeline. Using a pipeline template simplifies the process of setting up a secure and efficient CI/CD pipeline. By following the steps outlined in this guide, you can create a pipeline that automates security checks and enhances the reliability of the software delivery process. They serve as a reusable, standardized set of instructions that streamline the process of building, testing, and deploying applications.

BOS offers a variety of templates that facilitate tasks such as package deployment, API gateway integration, and static code analysis etc. Each template serves a different purpose. Apart from the in-built templates BOS provides a way for user to create their custom pipelines and use them.The pipeline template is a starting point. You can further customize it to fit your specific project's needs. This might include adding additional stages, integrating with specific security tools, or adjusting notification settings all of which is possible in BOS.

Pipeline Stages

Pipeline templates generally combines steps or stages of the pipeline, such as building, testing, and deploying these can be termed as Pipeline Stages. Within each stage, specific tasks and configurations can be defined to enhance the pipeline to unique requirements of each phase. This is very important as it allows flexible and efficient orchestration of the entire development and deployment lifecycle. BOS provides various stages for security purposes. Click here to know more.

Pipeline Jobs

Pipeline Jobs are specific units of work within a pipeline, encapsulating a set of related tasks or operations. Each job in a pipeline is configured with its own parameters, dependencies, and actions, contributing to the overall automation and orchestration of the software development and delivery process. These jobs typically include build, security scanning, testing, and deployment. BOS provides in-build jobs within a Stage in the template to serve their purpose. The user can add custom job at any stage of the Pipeline. Users can customize the tasks and configurations within each job to match your project's requirements which may include security scanning tools, code coverage tools or creating a nuget and npm package and storing them in a central location so that these can be referenced within another project/s.

How to create Pipeline

Prerequisites

You must have a product within your organization and an application associated with the product for which you will create a pipeline. Once these are in place you need to follow the below mentioned steps.

Steps

  1. Login to BOS Console. After logging in you will be redirected to the products page of your organization.
  2. In the products list view page click on your product. You will be redirected to the Product Information page.
  3. Expand the Product Details panel. You will see separate tiles for Environments, Applications, Pipelines. Click on the Number displayed in the Pipelines tile. You will be redirected to the pipelines page.
  4. In the Pipelines page you will see the pipelines which you have already created. Click on the Create Pipeline button. You will be redirected to the Create Pipeline page.
  5. Choose a pipeline template from the Pipeline Template dropdown. If you want your Custom Pipeline, then you need to follow these additional steps.
    • Provide a name to your Pipeline.
    • Choose Custom from the Pipeline Template dropdown.
    • Add necessary description.
    • An empty Stage and empty Job will be created. Add your custom script in the Script section provided below.
  6. If you want addition steps or tasks in a pre defined BOS Pipeline Template then after selecting the Pipeline Template from the dropdown you can add custom stage by providing the name of the Pipeline and then adding the script which produces the desired result in the script section.
  7. Click on Save Pipeline button.

After the pipeline is created successfully, you will be redirected to the Pipeline list page from where you can see the newly created pipeline. One can execute the pipeline manually from the list view.

If you have some dynamic variables in the custom script, then you can add them in the Pipeline Variables page.

How to add Pipeline variable

To add pipelines variable follow the below steps:

  1. Navigate to the Pipeline Variables page by clicking on the Navigate to Pipeline Variables icon in the Create Pipeline page.
  2. Click on Add Variable button. Add Variable popup will appear.
  3. Fill the necessary details like
    • Key which you refer in the script.
    • Value which will be replaced when pipeline is executed.
    • Environment for which you need that variable to be used.
    • If the value of the key is a secret, and you don't want it to be visible to others than check the Is Secret option.
    • You can add a description of the variable in Description section.
  4. Click on the Save button.

You will see the newly added variable in the Pipeline Variables page. Now you can use the key of the variable in your script and its value will be picked at the time when pipeline gets executed.

Lists of Pipeline Templates for Azure

BOS provides the following common templates:
  1. NPM Package - GitLab Pipeline Template
  2. Nuget Package - GitLab Pipeline Template
BOS provides the following templates for deployment:
  1. Deploy to Linux VM Pipeline Template
  2. Deploy to AKS (.NET Core) Pipeline Template
  3. Deploy to Windows VM Pipeline Template
  4. Deploy to AKS Pipeline Template
  5. Deploy to AKS - Tyk Pipeline Template
  6. Deploy to AKS - .NET Core Tyk Pipeline Template
  7. Deploy to Windows VM - .NET Framework