diff --git a/.gitignore b/.gitignore index 8ea4b9930110..4ffcdf8d47de 100644 --- a/.gitignore +++ b/.gitignore @@ -32,5 +32,5 @@ tools/vms-generator/vms-generator .coverprofile coverage.html manifests/**/*.tmp -bazel-* -.bazelrc +/bazel-* +/.bazelrc diff --git a/Makefile b/Makefile index e15e374e4880..3ae61acacee2 100644 --- a/Makefile +++ b/Makefile @@ -13,12 +13,7 @@ bazel-build: //cmd/..." bazel-push-images: - hack/dockerized "bazel run \ - --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64 \ - --workspace_status_command=./hack/print-workspace-status.sh \ - --define container_prefix=${DOCKER_PREFIX} \ - --define container_tag=${DOCKER_TAG} \ - //:push-images" + hack/dockerized "DOCKER_PREFIX=${DOCKER_PREFIX} DOCKER_TAG=${DOCKER_TAG} ./hack/bazel-push-images.sh" bazel-tests: hack/dockerized "bazel test --test_output=errors -- //pkg/... " diff --git a/hack/bazel-push-images.sh b/hack/bazel-push-images.sh new file mode 100755 index 000000000000..138d29b44b16 --- /dev/null +++ b/hack/bazel-push-images.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# +# This file is part of the KubeVirt project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Copyright 2017 Red Hat, Inc. +# + +set -e + +source hack/common.sh +source hack/config.sh + +bazel run \ + --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64 \ + --workspace_status_command=./hack/print-workspace-status.sh \ + --define container_prefix=${docker_prefix} \ + --define container_tag=${docker_tag} \ + //:push-images