Azure Devops tutorial:
web sit- Projects - Home (azure.com)
AZURE DEVOPS - Organization - Projects
Azure Pipelines:---
Pipeline structure:-
A pipeline is one or more stages that describe a CI/CD process. Stages are the major divisions in a pipeline. The stages "Build this app," "Run these tests," and "Deploy to preproduction" are good examples.
A stage is one or more jobs, which are units of work assignable to the same machine. You can arrange both stages and jobs into dependency graphs. Examples include "Run this stage before that one" and "This job depends on the output of that job."
A job is a linear series of steps. Steps can be tasks, scripts, or references to external templates.
This hierarchy is reflected in the structure of a YAML file like:
- Pipeline
- Stage A
- Job 1
- Step 1.1
- Step 1.2
- ...
- Job 2
- Step 2.1
- Step 2.2
- ...
- Job 1
- Stage B
- ...
- Stage A
Simple pipelines don't require all of these levels. For example, in a single-job build you can omit the containers for stages and jobs because there are only steps. And because many options shown in this article aren't required and have good defaults, your YAML definitions are unlikely to include all of them.
A pipeline is one or more jobs that describe a CI/CD process. A job is a unit of work assignable to the same machine. You can arrange jobs into dependency graphs like "This job depends on the output of that job."
A job is a linear series of steps. Steps can be tasks, scripts, or references to external templates.
This hierarchy is reflected in the structure of a YAML file like:
- Pipeline
- Job 1
- Step 1.1
- Step 1.2
- ...
- Job 2
- Step 2.1
- Step 2.2
- ...
- Job 1
For single-job pipelines, you can omit the jobs container because there are only steps. And because many options shown in this article aren't required and have good defaults, your YAML definitions are unlikely to include all of them.
1-The yml pipeline code is given below:-
https://github.com/a-d-n-776/devops7760.blogspot.com/blob/main/1.yml
--------------------------------------------------------------------------------------------
2-Basic pipelines
a.yml
trigger:
branches:
include:
- main
variables:
- group: sum_variable_group
stages:
- stage: __default
jobs:
- job: Job1A
pool:
vmImage: 'ubuntu-latest'
steps:
- task: CmdLine@2
displayName: 'Run a one-line script'
inputs:
script: echo Hello, world!
- job: Job1B
- job: Job1C
- job: Job1D
b.yml
# trigger:
# - master
# branches:
# include:
# - main
trigger:
- main
variables:
- group: sum_variable_group
stages:
- stage: __default
jobs:
- job: Job1A
pool:
vmImage: 'ubuntu-latest'
steps:
- task: CmdLine@2
displayName: 'Run a one-line script'
inputs:
script: echo Hello, world!
- job: Job1B
- job: Job1C
- job: Job1D
c.yml
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
- group: sum_variable_group
stages:
- stage: STAGE_1
displayName: 'STAGE_1'
jobs:
- job: Job1A
steps:
- task: CmdLine@2
displayName: 'Run a one-line script'
inputs:
script: echo Hello, world!
- job: Job1B
- job: Job1C
- job: Job1D
- job: Job1E
d.yml
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
- group: sum_variable_group
stages:
- stage: STAGE_1
displayName: 'STAGE_1'
jobs:
- job: Job1A
steps:
- task: CmdLine@2
displayName: 'Run a one-line script'
inputs:
script: echo Hello, world!
- job: Job1B
- job: Job1C
- job: Job1D
- job: Job1E
- stage: STAGE_2
displayName: 'STAGE_2'
jobs:
- job: Job2A
- job: Job2B
- job: Job2C
- job: Job2D
- stage: STAGE_3
displayName: 'STAGE_3'
jobs:
- job: Job1A
- job: Job3B
- job: Job3C
- job: Job3D
e.yml
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
- group: sum_variable_group
stages:
- stage: STAGE_1
displayName: 'STAGE_1'
jobs:
- job: Job1A
steps:
- task: CmdLine@2
displayName: 'Run a one-line script'
inputs:
script: echo Hello, world!
- job: Job1B
- job: Job1C
- job: Job1D
- job: Job1E
- stage: STAGE_2
displayName: 'STAGE_2'
jobs:
- job: Job2A
- job: Job2B
- job: Job2C
- job: Job2D
- stage: STAGE_3
displayName: STAGE-3
jobs:
- job: Job3A
- job: Job3B
- job: Job3C
- job: Job3D
- stage: STAGE_4
displayName: 'STAGE_4'
jobs:
- job: Job4A
- job: Job4B
- job: Job4C
- job: Job4D
- stage: STAGE_5
displayName: STAGE_5
jobs:
- job: Job5A
- job: Job5B
- job: Job5C
- job: Job5D
----------------------------------------------------------------------------------------
2.
Comments
Post a Comment