-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
53 lines (49 loc) · 1.58 KB
/
azure-pipelines.yml
File metadata and controls
53 lines (49 loc) · 1.58 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- master
stages:
- stage: Build
jobs:
- job: Build
pool:
vmImage: ubuntu-18.04
variables:
dockerfileloc: '$(Build.SourcesDirectory)/Dockerfile'
buildtag: '$(Build.BuildId)'
steps:
- task: Docker@2
displayName: build and push image into acr
inputs:
containerRegistry: 'mydemoreg'
repository: 'yoga'
command: 'buildAndPush'
Dockerfile: '$(dockerfileloc)'
tags: '$(Build.SourceVersion)'
condition: succeeded()
- job: publish
pool:
vmImage: ubuntu-18.04
dependsOn: Build
variables:
frmdir: '$(Build.SourcesDirectory)'
todir: '$(Build.ArtifactStagingDirectory)'
contenttocopied: '*yml'
steps:
- task: CopyFiles@2
displayName: copy from source directory to staging directory
inputs:
SourceFolder: '$(frmdir)'
Contents: '$(contenttocopied)'
TargetFolder: '$(todir)'
OverWrite: true
preserveTimestamp: true
- task: PublishBuildArtifacts@1
displayName: publish artifcat
inputs:
PathtoPublish: '$(todir)'
ArtifactName: 'drop'
publishLocation: 'Container'
condition: succeeded()