integ/kubernetes/plugins/sriov-network-device-plugin/distroless/build-sriov-network-device-plugin-image.sh
Davlet Panech 6b7479e737 debian: sriov-network-device: convert to debian
Rename centos directory to "distroless", same as other intel k8s
plugins.

TESTS
=====
Rebuild on debian & centos hosts

Story: 2009831
Task: 45083

Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
Change-Id: If4c82b89fc1a1c235ef4de61a76e234ef912cab1
2022-04-18 15:48:20 -04:00

33 lines
735 B
Bash

#!/bin/bash
################################################################################
# Copyright (c) 2020 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
################################################################################
PROJECT=$1
IMAGE_TAG=$2
if [ -z "${IMAGE_TAG}" ]; then
echo "image tag must be specified. build ${PROJECT} Aborting..." >&2
exit 1
fi
make image
if [ $? -ne 0 ]; then
echo "Failed to make ${PROJECT} image. Aborting..." >&2
exit 1
fi
RETVAL=0
docker tag nfvpe/${PROJECT}:latest "${IMAGE_TAG}"
if [ $? -ne 0 ]; then
echo "Failed to tag ${PROJECT} with ${IMAGE_TAG}. Aborting..." >&2
RETVAL=1
fi
docker rmi nfvpe/${PROJECT}:latest
exit ${RETVAL}