diff --git a/ci/cloud_build_release.sh b/ci/cloud_build_release.sh index 69b32c7fe5b..0680db321da 100755 --- a/ci/cloud_build_release.sh +++ b/ci/cloud_build_release.sh @@ -36,10 +36,11 @@ fi echo "The image tag is: ${release_tag}" image_repo="gcr.io/pixie-oss/pixie-prod" -all_licenses_opts=("//tools/licenses:all_licenses" "--config=stamp" "--action_env=GOOGLE_APPLICATION_CREDENTIALS" "--remote_download_outputs=toplevel") -all_licenses_path="$(bazel cquery "//tools/licenses:go_licenses" --output starlark --starlark:expr "target.files.to_list()[0].path" 2> /dev/null)" -deps_missing_licenses_path="$(bazel cquery "//tools/licenses:deps_licenses" --output starlark --starlark:expr "[f.path for f in target.files.to_list() if f.basename == 'deps_licenses_missing.json'][0]" 2> /dev/null)" -go_missing_licenses_path="$(bazel cquery "${all_licenses_opts[@]}" --output starlark --starlark:expr "[f.path for f in target.files.to_list() if f.basename == 'go_licenses_missing.json'][0]" 2> /dev/null)" +shared_opts=("--config=stamp" "--action_env=GOOGLE_APPLICATION_CREDENTIALS" "--remote_download_outputs=toplevel") +all_licenses_opts=("//tools/licenses:all_licenses" "${shared_opts[@]}") +all_licenses_path="$(bazel cquery "${all_licenses_opts[@]}" --output starlark --starlark:expr "target.files.to_list()[0].path" 2> /dev/null)" +deps_missing_licenses_path="$(bazel cquery "//tools/licenses:deps_licenses" "${shared_opts[@]}" --output starlark --starlark:expr "[f.path for f in target.files.to_list() if f.basename == 'deps_licenses_missing.json'][0]" 2> /dev/null)" +go_missing_licenses_path="$(bazel cquery "//tools/licenses:go_licenses" "${shared_opts[@]}" --output starlark --starlark:expr "[f.path for f in target.files.to_list() if f.basename == 'go_licenses_missing.json'][0]" 2> /dev/null)" print_missing_licenses() { cat "${deps_missing_licenses_path}" || true