-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
61 lines (57 loc) · 1.83 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
trigger:
- master
variables:
vmImageName: MyCustomAgent
dockerRegistryServiceConnection: bahabouali
imageRepository: bahabouali/ppp
containerRegistry: https://hub.docker.com/
dockerfilePath: ./Dockerfile
tag: '$(Build.BuildId)'
pool:
name: MyLocalAgent
vmImage: $(vmImageName)
stages:
- stage: build
displayName: Build
jobs:
- job: MavenBuildThenDockerBuildAndPush
displayName: Maven Build Then Docker Build And Push
steps:
- task: Maven@3
displayName: MavenBuildAndPackage
inputs:
mavenPomFile: 'pom.xml'
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
codeCoverageToolOption: 'JaCoCo'
mavenVersionOption: 'Default'
mavenAuthenticateFeed: false
effectivePomSkip: false
isJacocoCoverageReportXML: true
sqMavenPluginVersionChoice: 'latest'
sonarQubeRunAnalysis: false
goals: 'package'
- task: Docker@2
inputs:
containerRegistry: 'Docker Hub connection'
repository: 'bahabouali/ppp'
command: 'buildAndPush'
Dockerfile: '**/Dockerfile'
buildContext: '.'
env:
DOCKER_BUILDKIT: 1
- task: CopyFiles@2
inputs:
SourceFolder: '.'
Contents: '*.yml'
TargetFolder: $(Build.ArtifactStagingDirectory)
- task: CopyFiles@2
inputs:
SourceFolder: './src/main/resources'
Contents: '*.yml'
TargetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'