Blog
Azure DevOps Pipeline Stages, Jobs, Steps and Tasks Oh My
First off, what is Azure DevOps?
Azure DevOps is a collection of modern development services provided by Microsoft. These services include Azure Boards, Pipelines, Repos, Test Plans, Artifacts and an Extensions Marketplace. These services together allow for better collaboration between developers and teams as well as time-saving automated deliverability to your business(es).
What are Azure Pipelines?
Specifically, Azure DevOps Pipeline allow developers to automate builds and deployments using the CI/CD approach (Continue Integration/Continuous Delivery). This frees up time to allow developers to address more new features and bug fixes to your applications.
Azure DevOps Pipeline Stages, Jobs, Steps and Tasks
Stages
Stages allow you to segregate parts of the pipeline into groups to execute sequentially. By default, each pipeline has one stage. A stage will have its own set of jobs. A single pipeline can also be comprised of multiple stages, if specified using the ‘stages’ and ‘stage’ keywords.
Jobs
A job is a set of tasks and/or steps to perform within the pipeline. By default, each pipeline has one job. A pipeline can also be comprised of multiple jobs, if specified using the ‘jobs’ and ‘job’ keywords. Jobs run in parallel. One reason that you may want to specify multiple jobs is due to limitations of some tasks, where a task may either require to be executed in an agentless job (runs on the server) or an agent dependent job. Therefore, you can split these tasks into separate jobs – where one will run on the server and the other job to run with your agent all within the same pipeline. Jobs by default do not run sequentially, so this is where having multiple stages can come in hand if that is a requirement for your pipeline.
Steps and Tasks
A job can contain steps and/or tasks which run sequentially. Steps can contain tasks, but they can also be components such as scripts for logging purposes or to checkout the repository. Tasks can be one of the available preprogrammed functions or developers can create a custom task. Some examples of preprogrammed functions included in the Power Platform are:
- PowerPlatformImportSolution which imports a Dynamics 365 solution to a target environment
- PowerPlatformPublishCustomizations which publishes your customizations (per requirement after import for Dynamics 365)
- Some other examples outside of the Power Platform are:
- AzureKeyVault which allows for retrieval of sensitive data such as credentials needed to authenticate to a business application.
- AzurePowerShell which allows you to run a custom power shell script for more advanced functions.
Using the Azure pipeline keywords as mentioned above, here is an example where your pipeline has multiple stages, multiple jobs and steps:
stages:
– stage: Get environment variables
jobs:
– job: 1
steps:
– script: echo “job 1”
– task: 1
– job: 2
steps:
– task: 2
– task: 3
– stage: Import customizations
jobs:
– job: 3
steps:
– task: 4
– task: 5
Reach out to Beringer today!
We love to implement Microsoft Dynamics 365 solutions here at Beringer. We’ve been working with Microsoft Dynamics since its inception, and we’re always finding innovative ways to implement the latest tools and help automate business processes.
Beringer Technology Group, a leading Microsoft Gold Certified Partner specializing in Microsoft Dynamics 365 and CRM for Distribution also provides expert Managed IT Services, Backup and Disaster Recovery, Cloud Based Computing, Email Security Implementation and Training, Unified Communication Solutions, and Cybersecurity Risk Assessment.