Author : MD TAREQ HASSAN | Updated : 2022/01/09

What is environment in Azure DevOps

Create AKS environment

Azure DevOps - Create AKS environment Step 1

Azure DevOps - Create AKS environment Step 2

Azure DevOps - Create AKS environment Step 3

Azure DevOps - Create AKS environment Step 4

Use Environment as Target in Deployment Jobs

Kubernetes

jobs:
# ... ... ...

- deployment: deployToAKS
  displayName: Deploy to AKS
  dependsOn: buildAndPushDockerImageJob
  environment: 'AKSDemoEnvironment.devops-demo'
  strategy:
    runOnce:
      deploy:
          steps:
          - script: echo "Hello world"

VM / On-premise server

jobs:
# ... ... ...

- deployment: VMDeploy
  displayName: Deploy to VM
  environment: 
    name: ContosoDeploy
    resourceType: VirtualMachine
    tags: windows # only deploy to virtual machines with this tag
  strategy:
    runOnce:
      deploy:   
          steps:
          - script: echo "Hello world"

Observability

Approval

Azure DevOps - Create approval Step 1

Azure DevOps - Create approval Step 2

Azure DevOps - Create approval Step 3

Azure DevOps - Create approval Step 4

Azure DevOps - Create approval Step 5

Azure DevOps - Create approval Step 6

Security

Azure DevOps - Environemnt resource security