mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #65996 from shyamjvs/add-workspace-to-kubemark-bazel
Automatic merge from submit-queue (batch tested with PRs 65993, 65986, 65351, 65996, 65985). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Create WORKSPACE file before running bazel in kubemark As the canary run after https://github.com/kubernetes/test-infra/pull/8616 failed with: ``` I0709 19:06:05.281] Extracting Bazel installation... I0709 19:06:13.369] ERROR: The 'run' command is only supported from within a workspace. W0709 19:06:13.469] [0;33mAttempt 1 failed to bazel run //cluster/images/kubemark:push. Retrying.[0m ``` Ref https://github.com/kubernetes/test-infra/issues/8348 /cc @krzyzacy ```release-note NONE ```
This commit is contained in:
commit
cd32999f21
@ -194,6 +194,7 @@ function create-and-upload-hollow-node-image {
|
||||
KUBEMARK_IMAGE_REGISTRY="${KUBEMARK_IMAGE_REGISTRY:-${CONTAINER_REGISTRY}/${PROJECT}}"
|
||||
if [[ "${KUBEMARK_BAZEL_BUILD:-}" =~ ^[yY]$ ]]; then
|
||||
# Build+push the image through bazel.
|
||||
touch WORKSPACE # Needed for bazel.
|
||||
build_cmd=("bazel" "run" "//cluster/images/kubemark:push" "--define" "REGISTRY=${KUBEMARK_IMAGE_REGISTRY}" "--define" "IMAGE_TAG=${KUBEMARK_IMAGE_TAG}")
|
||||
run-cmd-with-retries "${build_cmd[@]}"
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user