forked from niadak/Sample-Yaml-Pipelines
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Sample-K8-pipeline.yaml
37 lines (34 loc) · 1.01 KB
/
Sample-K8-pipeline.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
stages:
- stage: Build
displayName: Build stage
jobs:
- job: Build
displayName: Build job
pool: default
steps:
- script: echo Hello, world!
displayName: 'Run a one-line script'
- script: |
echo Add other tasks to build, test, and deploy your project.
echo See https://aka.ms/yaml
displayName: 'Run a multi-line script'
- stage: Deploy
displayName: Deploy stage
jobs:
- deployment: K8Deploy
displayName: Deploy to K8 job
pool: default
environment: Environment01.default
strategy:
runOnce:
deploy:
steps:
- script: echo Hello, world! This is deploy job
displayName: 'Run a one-line script'
- task: Kubernetes@1
displayName: 'kubectl get'
inputs:
connectionType: 'Kubernetes Service Connection'
namespace: 'default'
command: get
arguments: pods