Push builder image to dockerhub (#1037)

Signed-off-by: Alexander Wels <awels@redhat.com>
This commit is contained in:
Alexander Wels 2019-12-02 20:32:45 -05:00 committed by kubevirt-bot
parent 3f3389f977
commit 83c5e459a6
3 changed files with 35 additions and 1 deletions

View File

@ -45,7 +45,7 @@ before_deploy:
deploy:
# Release :latest images
- provider: script
script: make publish
script: make builder-push && make publish
skip_cleanup: true
on:
branch: master

View File

@ -119,3 +119,6 @@ bazel-push-images: bazel-cdi-generate bazel-build
push: bazel-push-images
builder-push:
./hack/build/bazel-build-builder.sh

View File

@ -0,0 +1,31 @@
#!/usr/bin/env bash
#Copyright 2019 The CDI Authors.
#
#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.
set -e
script_dir="$(readlink -f $(dirname $0))"
source "${script_dir}"/common.sh
source "${script_dir}"/config.sh
BUILDER_SPEC="${BUILD_DIR}/docker/builder"
#TODO remove me and use the one from config.sh
BUILDER_TAG="kubevirt/kubevirt-cdi-bazel-builder"
# Build the encapsulated compile and test container
(cd ${BUILDER_SPEC} && docker build --tag ${BUILDER_TAG} .)
echo "Image: ${BUILDER_TAG}"
docker push ${BUILDER_TAG}