@@ -65,25 +65,36 @@ def _envoy_repo_impl(repository_ctx):
6565
6666 """
6767
68- # parse container information for use in RBE
69- json_result = repository_ctx .execute ([
70- repository_ctx .path (repository_ctx .attr .yq ),
71- repository_ctx .path (repository_ctx .attr .envoy_ci_config ),
72- "-ojson" ,
73- ])
74- if json_result .return_code != 0 :
75- fail ("yq failed: {}" .format (json_result .stderr ))
76- repository_ctx .file ("ci-config.json" , json_result .stdout )
77- config_data = json .decode (repository_ctx .read ("ci-config.json" ))
78- repository_ctx .file ("containers.bzl" , CONTAINERS .format (
79- repo = config_data ["build-image" ]["repo" ],
80- repo_gcr = config_data ["build-image" ]["repo-gcr" ],
81- sha = config_data ["build-image" ]["sha" ],
82- sha_gcc = config_data ["build-image" ]["sha-gcc" ],
83- sha_mobile = config_data ["build-image" ]["sha-mobile" ],
84- sha_worker = config_data ["build-image" ]["sha-worker" ],
85- tag = config_data ["build-image" ]["tag" ],
86- ))
68+ if repository_ctx .os .name .lower ().find ("windows" ) == - 1 :
69+ json_result = repository_ctx .execute ([
70+ repository_ctx .path (repository_ctx .attr .yq ),
71+ repository_ctx .path (repository_ctx .attr .envoy_ci_config ),
72+ "-ojson" ,
73+ ])
74+ if json_result .return_code != 0 :
75+ fail ("yq failed: {}" .format (json_result .stderr ))
76+ repository_ctx .file ("ci-config.json" , json_result .stdout )
77+ config_data = json .decode (repository_ctx .read ("ci-config.json" ))
78+ repository_ctx .file ("containers.bzl" , CONTAINERS .format (
79+ repo = config_data ["build-image" ]["repo" ],
80+ repo_gcr = config_data ["build-image" ]["repo-gcr" ],
81+ sha = config_data ["build-image" ]["sha" ],
82+ sha_gcc = config_data ["build-image" ]["sha-gcc" ],
83+ sha_mobile = config_data ["build-image" ]["sha-mobile" ],
84+ sha_worker = config_data ["build-image" ]["sha-worker" ],
85+ tag = config_data ["build-image" ]["tag" ],
86+ ))
87+ else :
88+ # yq via bazel doesn't work on Windows, but we don't need the file either
89+ repository_ctx .file ("containers.bzl" , CONTAINERS .format (
90+ repo = "" ,
91+ repo_gcr = "" ,
92+ sha = "" ,
93+ sha_gcc = "" ,
94+ sha_mobile = "" ,
95+ sha_worker = "" ,
96+ tag = "" ,
97+ ))
8798 repo_version_path = repository_ctx .path (repository_ctx .attr .envoy_version )
8899 api_version_path = repository_ctx .path (repository_ctx .attr .envoy_api_version )
89100 version = repository_ctx .read (repo_version_path ).strip ()
0 commit comments