-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathazure-pipelines.yml
73 lines (68 loc) · 2.24 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
# Docker
# Build a Docker image
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker
trigger:
- main
schedules:
- cron: "01 12 * * 1-5"
displayName: Development Environment Rebuilds
branches:
include:
- main
always: true
resources:
- repo: self
variables:
tag: '$(Build.BuildId)'
tagDate: $[ format('{0:yyyy}.{0:MM}.{0:dd}.{0:HH}.{0:mm}{0:ss}', pipeline.startTime) ]
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
stages:
- stage: Build
condition: and(succeeded(), eq(variables.isMain, 'true'))
displayName: Build image
jobs:
- job: Build
displayName: Build
pool:
vmImage: ubuntu-latest
steps:
- task: Docker@2
displayName: Build Postgres Image for Ubuntu 24.04 Postgres 17
inputs:
command: buildAndPush
dockerfile: '$(Build.SourcesDirectory)/postgresubuntu2404/Dockerfile'
tags: |
postgresubuntu2404_latest
postgresubuntu2404_$(tagDate)
containerRegistry: DockerGitHub
repository: dbca-wa/docker-apps-dev
- task: Docker@2
displayName: Build Postgres Image for Ubuntu 24.04 Postgres 16
inputs:
command: buildAndPush
dockerfile: '$(Build.SourcesDirectory)/postgres16ubuntu2404/Dockerfile'
tags: |
postgresubuntu2404_16_latest
postgresubuntu2404_16_$(tagDate)
containerRegistry: DockerGitHub
repository: dbca-wa/docker-apps-dev
- task: Docker@2
displayName: Build Ubuntu 24.04 Development Environment
inputs:
command: buildAndPush
dockerfile: '$(Build.SourcesDirectory)/ubuntu2404_dev/Dockerfile'
tags: |
ubuntu2404_dev_latest
ubuntu2404_dev_$(tagDate)
containerRegistry: DockerGitHub
repository: dbca-wa/docker-apps-dev
- task: Docker@2
displayName: Build Postgres Image for Ubuntu 20.04
inputs:
command: buildAndPush
dockerfile: '$(Build.SourcesDirectory)/postgresubuntu2004/Dockerfile'
tags: |
postgresubuntu2004_latest
postgresubuntu2004_$(tagDate)
containerRegistry: DockerGitHub
repository: dbca-wa/docker-apps-dev