-
Notifications
You must be signed in to change notification settings - Fork 28
/
azure-pipelines-webapp-oss-containers.yml
50 lines (46 loc) · 1.65 KB
/
azure-pipelines-webapp-oss-containers.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
41
42
43
44
45
46
47
48
49
50
# Azure Pipelines for .NET Core app (Web, Function, ....) :)
# More info: https://docs.microsoft.com/en-us/azure/devops/pipelines/?view=vsts
parameters:
ArtifactName: 'AppDrop'
DeploymentSourceFolder: 'src/deployment'
ContainerRegistryName: myacr
ContainerRegistryServiceConnection: myacr
ContainerRegistryRepo: projectname
DockerFilePath: 'src'
jobs:
- job: ${{ Parameters.Name }}
pool:
vmImage: 'ubuntu-18.04'
demands: npm
steps:
- task: CopyFiles@2
displayName: 'Copy Deployment Files'
inputs:
SourceFolder: ${{ Parameters.DeploymentSourceFolder }}
TargetFolder: '$(build.artifactstagingdirectory)/deployment'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: ${{ Parameters.ArtifactName }}'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
ArtifactName: ${{ Parameters.ArtifactName }}
zipAfterPublish: false
- job: BuildImage
displayName: 'BuildImages-${{ Parameters.Name }}'
dependsOn: ${{ Parameters.Name }}
pool:
vmImage: 'ubuntu-18.04'
steps:
- task: Docker@2
displayName: 'Docker Build'
inputs:
containerRegistry: ${{ Parameters.ContainerRegistryServiceConnection }}
repository: '${{ Parameters.ContainerRegistryName }}${{ Parameters.ContainerRegistryRepo }}'
command: build
Dockerfile: ${{ Parameters.DockerFilePath }}
- task: Docker@2
displayName: 'Docker Push'
inputs:
containerRegistry: ${{ Parameters.ContainerRegistryServiceConnection }}
repository: '${{ Parameters.ContainerRegistryName }}${{ Parameters.ContainerRegistryRepo }}'
command: push
Dockerfile: ${{ Parameters.DockerFilePath }}