-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
78 lines (70 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
trigger:
- master
schedules:
- cron: "0 0 * * 1"
displayName: Weekly Build
branches:
include:
- master
always: true
resources:
- repo: self
variables:
tag: '$(Build.BuildId)'
stages:
- stage: 'Build'
displayName: 'Build & Push Images'
jobs:
- job: 'Build_JDK_11'
displayName: 'Build JDK 11'
pool:
vmImage: 'ubuntu-latest'
steps:
- task: Docker@2
displayName: 'Build JDK 11 Image'
inputs:
containerRegistry: 'Duchessa DockerHub'
repository: 'duchessa/el8-jdk'
command: 'build'
dockerfile: '$(Build.SourcesDirectory)/Dockerfile'
tags: |
11.$(tag)
11
- task: Docker@2
displayName: 'Push JDK 11 Image'
condition: ne(variables['Build.Reason'], 'PullRequest')
inputs:
containerRegistry: 'Duchessa DockerHub'
repository: 'duchessa/el8-jdk'
command: 'push'
dockerfile: '$(Build.SourcesDirectory)/Dockerfile'
tags: |
11.$(tag)
11
- job: 'Build_JDK_8'
displayName: 'Build JDK 8'
pool:
vmImage: 'ubuntu-latest'
steps:
- task: Docker@2
displayName: 'Build JDK 8 Image'
inputs:
containerRegistry: 'Duchessa DockerHub'
repository: 'duchessa/el8-jdk'
command: 'build'
dockerfile: '$(Build.SourcesDirectory)/Dockerfile'
arguments: '--build-arg JDK_VERSION=8'
tags: |
8.$(tag)
8
- task: Docker@2
displayName: 'Push JDK 8 Image'
condition: ne(variables['Build.Reason'], 'PullRequest')
inputs:
containerRegistry: 'Duchessa DockerHub'
repository: 'duchessa/el8-jdk'
command: 'push'
dockerfile: '$(Build.SourcesDirectory)/Dockerfile'
tags: |
8.$(tag)
8