Open reboottime opened 1 year ago
Azure supports yaml language to define your code pipeline, which means your pipeline can be part of your code.
There are some main concepts in Azure pipeline
We will explore those concepts by use applications.
trigger:
- main
steps: step is the main building block of azure pipeline, and
task
: a pre-created script created to offer convenience script
: you write your script for each stepBellow is an example of pipeline configuration using yaml language
In some scenarios, you want to test your application on different environments, for example, test your application in Linux and Windows environment.
Yet you do not want to wait for too long for the pipeline to run through, the solution is to define jobs such that your pipeline can be run on two different environment in parallel.
For the above scenario, we will introduce three main concepts
VS
For the above example( the second screenshot), each job runs on a different environment and has its own step(s)
Artifacts are the deliverable file(s) that we use to publish our (part of) application(s).
Artifacts differ based on the programming language used for writing the application, for example,
we use zipped file(s) and upload the application deployment environment and unzip the file then deploy the app. This step involves in archive the built artifacts using @ArchiveFiles@1
task, for example, archive the a website's landing page output artifacts built with nextjs SSR code.
- task: ArchiveFiles@1
displayName: Generate landing page build package
inputs:
rootFolder: '$(Build.SourcesDirectory)/landing/out/'
includeRootFolder: false
archiveType: 'default'
archiveFile: '$(Build.ArtifactStagingDirectory)/landing.zip'
replaceExistingArchive: true
However, in the modern software development we use Docker as artifacts
Each stage are different, for example, in deployment stage, we do not check out source code from git.
Usually, we do not deploy code directly to production
We test the code gradually and deploy code gradually.
Based on the above strategy, we can have different stages in our pipeline, for example, as follows
Template is a reusable configuration that you can reuse it in different stages, for example
Azure supports create environment for you for different purposes, here is where you can find the UI exposure to create environment manually
Then you can configure your azure pipeline based on different enviroments
The cases that we want to connect services to azure Devops workflow
Azure has UI exposures to support add credential connections manually
Overview
Revisit Azure DevOps as a software development automation solution, to have a systematic understanding.
Other than providing a higher overview of Azure Devops platform, this article also delves the main concepts of Azure pipeline, including
This article is built upon this tutorial
FAQs: