forked from jenkinsci/docker-inbound-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-bake.hcl
124 lines (110 loc) · 3.09 KB
/
docker-bake.hcl
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
group "linux" {
targets = [
"alpine_jdk8",
"alpine_jdk11",
"debian_jdk8",
"debian_jdk11",
"debian_jdk17",
]
}
group "linux-arm64" {
targets = [
"debian_jdk11",
"debian_jdk17",
]
}
group "linux-s390x" {
targets = []
}
group "linux-ppc64le" {
targets = []
}
# update this to use a newer build number for jenkins/docker image
variable "AGENT_IMAGE_BUILD_NUMBER" {
default = "6"
}
variable "REGISTRY" {
default = "docker.io"
}
variable "JENKINS_REPO" {
default = "jenkins/inbound-agent"
}
variable "REMOTING_VERSION" {
default = "4.10"
}
variable "BUILD_NUMBER" {
default = "6"
}
variable "ON_TAG" {
default = "false"
}
target "alpine_jdk8" {
dockerfile = "8/alpine/Dockerfile"
context = "."
args = {
version = "${REMOTING_VERSION}-${AGENT_IMAGE_BUILD_NUMBER}-alpine-jdk8"
}
tags = [
equal(ON_TAG, "true") ? "${REGISTRY}/${JENKINS_REPO}:${REMOTING_VERSION}-${BUILD_NUMBER}-alpine-jdk8": "",
"${REGISTRY}/${JENKINS_REPO}:alpine-jdk8",
"${REGISTRY}/${JENKINS_REPO}:latest-alpine-jdk8",
]
platforms = ["linux/amd64"]
}
target "alpine_jdk11" {
dockerfile = "11/alpine/Dockerfile"
context = "."
args = {
version = "${REMOTING_VERSION}-${AGENT_IMAGE_BUILD_NUMBER}-alpine-jdk11"
}
tags = [
equal(ON_TAG, "true") ? "${REGISTRY}/${JENKINS_REPO}:${REMOTING_VERSION}-${BUILD_NUMBER}-alpine": "",
equal(ON_TAG, "true") ? "${REGISTRY}/${JENKINS_REPO}:${REMOTING_VERSION}-${BUILD_NUMBER}-alpine-jdk11": "",
"${REGISTRY}/${JENKINS_REPO}:alpine",
"${REGISTRY}/${JENKINS_REPO}:alpine-jdk11",
"${REGISTRY}/${JENKINS_REPO}:latest-alpine",
"${REGISTRY}/${JENKINS_REPO}:latest-alpine-jdk11",
]
platforms = ["linux/amd64"]
}
target "debian_jdk8" {
dockerfile = "8/debian/Dockerfile"
context = "."
args = {
version = "${REMOTING_VERSION}-${AGENT_IMAGE_BUILD_NUMBER}-jdk8"
}
tags = [
equal(ON_TAG, "true") ? "${REGISTRY}/${JENKINS_REPO}:${REMOTING_VERSION}-${BUILD_NUMBER}-jdk8": "",
"${REGISTRY}/${JENKINS_REPO}:jdk8",
"${REGISTRY}/${JENKINS_REPO}:latest-jdk8",
]
platforms = ["linux/amd64"]
}
target "debian_jdk11" {
dockerfile = "11/debian/Dockerfile"
context = "."
args = {
version = "${REMOTING_VERSION}-${AGENT_IMAGE_BUILD_NUMBER}-jdk11"
}
tags = [
equal(ON_TAG, "true") ? "${REGISTRY}/${JENKINS_REPO}:${REMOTING_VERSION}-${BUILD_NUMBER}": "",
equal(ON_TAG, "true") ? "${REGISTRY}/${JENKINS_REPO}:${REMOTING_VERSION}-${BUILD_NUMBER}-jdk11": "",
"${REGISTRY}/${JENKINS_REPO}:jdk11",
"${REGISTRY}/${JENKINS_REPO}:latest",
"${REGISTRY}/${JENKINS_REPO}:latest-jdk11",
]
platforms = ["linux/amd64", "linux/arm64", "linux/s390x"]
}
target "debian_jdk17" {
dockerfile = "17/debian/Dockerfile"
context = "."
args = {
version = "${REMOTING_VERSION}-${AGENT_IMAGE_BUILD_NUMBER}-jdk17-preview"
}
tags = [
equal(ON_TAG, "true") ? "${REGISTRY}/${JENKINS_REPO}:${REMOTING_VERSION}-${BUILD_NUMBER}-jdk17-preview": "",
"${REGISTRY}/${JENKINS_REPO}:jdk17-preview",
"${REGISTRY}/${JENKINS_REPO}:latest-jdk17-preview",
]
platforms = ["linux/amd64", "linux/arm64"]
}