Skip to content

Commit 1b6f451

Browse files
author
Jeff Peeler
committed
add support to build different tags in hack script
This simply adds the tag to the calculated FROM line.
1 parent 611b130 commit 1b6f451

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

hack/build-local-images.py

+15-1
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,15 @@
5757
# with no arguments
5858
image_config = {
5959
"cli": {
60+
"tag": "latest",
6061
"directory": "cli",
6162
"binaries": {
6263
"oc": "/usr/bin/oc",
6364
},
6465
"files": {}
6566
},
6667
"control-plane": {
68+
"tag": "latest",
6769
"directory": "origin",
6870
"binaries": {
6971
"openshift": "/usr/bin/openshift",
@@ -72,48 +74,55 @@
7274
"files": {}
7375
},
7476
"hyperkube": {
77+
"tag": "latest",
7578
"directory": "hyperkube",
7679
"binaries": {
7780
"hyperkube": "/usr/bin/hyperkube",
7881
},
7982
"files": {}
8083
},
8184
"hypershift": {
85+
"tag": "latest",
8286
"directory": "hypershift",
8387
"binaries": {
8488
"hypershift": "/usr/bin/hypershift",
8589
},
8690
"files": {}
8791
},
8892
"deployer": {
93+
"tag": "latest",
8994
"directory": "deployer",
9095
"binaries": {
9196
"openshift": "/usr/bin/openshift"
9297
},
9398
"files": {}
9499
},
95100
"recycler": {
101+
"tag": "latest",
96102
"directory": "recycler",
97103
"binaries": {
98104
"openshift": "/usr/bin/openshift"
99105
},
100106
"files": {}
101107
},
102108
"docker-builder": {
109+
"tag": "latest",
103110
"directory": "builder/docker/docker-builder",
104111
"binaries": {
105112
"openshift": "/usr/bin/openshift"
106113
},
107114
"files": {}
108115
},
109116
"f5-router": {
117+
"tag": "latest",
110118
"directory": "router/f5",
111119
"binaries": {
112120
"openshift": "/usr/bin/openshift"
113121
},
114122
"files": {}
115123
},
116124
"nginx-router": {
125+
"tag": "latest",
117126
"directory": "router/nginx",
118127
"binaries": {
119128
"openshift": "/usr/bin/openshift"
@@ -123,6 +132,7 @@
123132
}
124133
},
125134
"haproxy-router": {
135+
"tag": "latest",
126136
"directory": "router/haproxy",
127137
"binaries": {
128138
"openshift": "/usr/bin/openshift"
@@ -132,6 +142,7 @@
132142
}
133143
},
134144
"keepalived-ipfailover": {
145+
"tag": "latest",
135146
"directory": "ipfailover/keepalived",
136147
"binaries": {
137148
"openshift": "/usr/bin/openshift"
@@ -141,6 +152,7 @@
141152
}
142153
},
143154
"node": {
155+
"tag": "latest",
144156
"directory": "node",
145157
"binaries": {
146158
"openshift": "/usr/bin/openshift",
@@ -150,6 +162,7 @@
150162
"files": {}
151163
},
152164
"template-service-broker": {
165+
"tag": "latest",
153166
"directory": "template-service-broker",
154167
"binaries": {
155168
"template-service-broker": "/usr/bin/template-service-broker"
@@ -224,7 +237,8 @@ def debug(message):
224237
build_occurred = True
225238
print "[INFO] Building {}...".format(image)
226239
with open(join(context_dir, "Dockerfile"), "w+") as dockerfile:
227-
dockerfile.write("FROM {}\n".format(full_name(image)))
240+
dockerfile.write("FROM {}:{}\n".format(full_name(image), image_config[image]["tag"]))
241+
228242

229243
binary_dir_args = ["_output", "local", "bin", "linux", "amd64"]
230244
config = image_config[image]

0 commit comments

Comments
 (0)