forked from stacksimplify/azure-devops-github-acr-aks-app1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
40 lines (34 loc) · 1.04 KB
/
azure-pipelines.yml
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
38
39
40
# Stages
# Stage-1:
# Task-1: Build Docker Image and push to Azure Container Registry ACR
# Task-2: Copy kube-manifest files to Build Artifact Directory
# Task-3: Publish build articats to Azure Pipelines
# Pipeline Hierarchial Flow: Stages -> Stage -> Jobs -> Job -> Steps -> Task1, Task2, Task3
trigger:
- master
stages:
- stage: Build
displayName: 'Build Pipeline'
jobs:
- job: Build
displayName: 'Build Job'
pool:
vmImage: 'ubuntu-latest'
steps:
- task: Docker@2
inputs:
repository: 'sharatimage'
command: 'buildAndPush'
Dockerfile: '**/Dockerfile'
containerRegistry: "myacr"
- task: CopyFiles@2
inputs:
SourceFolder: '$(System.DefaultWorkingDirectory)/kube-manifests'
Contents: '**'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
OverWrite: true
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'kube-manifests'
publishLocation: 'Container'