File tree 3 files changed +30
-1
lines changed 3 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,16 @@ genrule(
38
38
visibility = ["//visibility:public" ],
39
39
)
40
40
41
+ genrule (
42
+ name = "fetch_preflight" ,
43
+ srcs = select ({
44
+ ":k8" : ["@preflight_linux//file" ],
45
+ }),
46
+ outs = ["preflight" ],
47
+ cmd = "cp $(SRCS) $@" ,
48
+ visibility = ["//visibility:public" ],
49
+ )
50
+
41
51
genrule (
42
52
name = "fetch_faq" ,
43
53
srcs = select ({
Original file line number Diff line number Diff line change @@ -22,6 +22,13 @@ OPENSHIFT_REPO = "https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/o
22
22
23
23
# filenames and versions from ${OPENSHIFT_REPO}/sha256sum.txt
24
24
OPENSHIFT_BINS = {
25
+ "preflight" : {
26
+ # currently, preflight is only available on linux
27
+ "preflight_linux" : {
28
+ "url" : "https://github.com/redhat-openshift-ecosystem/openshift-preflight/releases/download/1.2.1/preflight-linux-amd64" ,
29
+ "sha" : "e5754a81d4baae4f4956fc0842179a3daeac4778e202450f886a9afb05d218ba" ,
30
+ },
31
+ },
25
32
"oc" : {
26
33
"oc_darwin" : {
27
34
"url" : "{}/openshift-client-mac-{}.tar.gz" .format (OPENSHIFT_REPO , OPENSHIFT_VERSION ),
@@ -71,6 +78,7 @@ def install():
71
78
install_operator_sdk ()
72
79
install_opm ()
73
80
install_openshift ()
81
+ install_preflight ()
74
82
75
83
# Install golang.org/x/build as kubernetes/repo-infra requires it for the
76
84
# build-tar bazel target.
@@ -413,6 +421,17 @@ filegroup(
413
421
"""
414
422
)
415
423
424
+ def install_preflight ():
425
+ versions = OPENSHIFT_BINS ["preflight" ]
426
+
427
+ for k , v in versions .items ():
428
+ http_file (
429
+ name = k ,
430
+ executable = 1 ,
431
+ sha256 = v ["sha" ],
432
+ urls = [v ["url" ]]
433
+ )
434
+
416
435
## Fetch crdb used in our container
417
436
def install_crdb ():
418
437
http_archive (
Original file line number Diff line number Diff line change @@ -57,8 +57,8 @@ go_library(
57
57
go_test (
58
58
name = "go_default_test" ,
59
59
srcs = [
60
- "cluster_test.go" ,
61
60
"certificate_test.go" ,
61
+ "cluster_test.go" ,
62
62
"discovery_service_test.go" ,
63
63
"pod_distruption_budget_test.go" ,
64
64
"public_service_test.go" ,
You can’t perform that action at this time.
0 commit comments