diff --git a/kubernetes/plugins/intel-device-plugin/distroless/build-intel-device-plugins-image.sh b/kubernetes/plugins/intel-device-plugin/distroless/build-intel-device-plugins-image.sh new file mode 100644 index 000000000..0690a71c5 --- /dev/null +++ b/kubernetes/plugins/intel-device-plugin/distroless/build-intel-device-plugins-image.sh @@ -0,0 +1,32 @@ +#!/bin/bash +################################################################################ +# Copyright (c) 2019 Wind River Systems, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# +################################################################################ + +DEVICE=$1 +IMAGE_TAG=$2 + +if [ -z "${IMAGE_TAG}" ]; then + echo "image tag must be specified. build ${DEVICE} Aborting..." >&2 + exit 1 +fi + +make ${DEVICE} + +if [ $? -ne 0 ]; then + echo "Failed to make ${DEVICE}. Aborting..." >&2 + exit 1 +fi + +RETVAL=0 +docker tag intel/${DEVICE}:devel "${IMAGE_TAG}" +if [ $? -ne 0 ]; then + echo "Failed to tag ${DEVICE} with ${IMAGE_TAG}. Aborting..." >&2 + RETVAL=1 +fi + +docker rmi intel/${DEVICE}:devel +exit ${RETVAL} diff --git a/kubernetes/plugins/intel-device-plugin/distroless/build-intel-gpu-plugin-image.sh b/kubernetes/plugins/intel-device-plugin/distroless/build-intel-gpu-plugin-image.sh deleted file mode 100644 index d2867520d..000000000 --- a/kubernetes/plugins/intel-device-plugin/distroless/build-intel-gpu-plugin-image.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -IMAGE_TAG=$1 -PROXY=$2 -DEVICE='intel-gpu-plugin' - -if [ -z "${IMAGE_TAG}" ]; then - echo "image tag must be specified. build ${DEVICE} Aborting..." >&2 - exit 1 -fi - -make ${DEVICE} - -if [ $? -ne 0 ]; then - echo "Failed to make intel-gpu-plugin. Aborting..." >&2 - exit 1 -fi - -# will exit 1 if "${IMAGE_TAG}" do not match docker tag formate -docker tag ${DEVICE}:devel "${IMAGE_TAG}" diff --git a/kubernetes/plugins/intel-device-plugin/distroless/intel-fpga-admissionwebhook.stable_docker_image b/kubernetes/plugins/intel-device-plugin/distroless/intel-fpga-admissionwebhook.stable_docker_image new file mode 100644 index 000000000..776642d14 --- /dev/null +++ b/kubernetes/plugins/intel-device-plugin/distroless/intel-fpga-admissionwebhook.stable_docker_image @@ -0,0 +1,7 @@ +BUILDER=script +LABEL=intel-fpga-admissionwebhook +SOURCE_REPO=https://github.com/intel/intel-device-plugins-for-kubernetes.git +SOURCE_REF=4f28657b6b4a37a7ed2e8398808c150eb4f1bdd1 +COMMAND=bash +SCRIPT=build-intel-device-plugins-image.sh +ARGS=intel-fpga-admissionwebhook diff --git a/kubernetes/plugins/intel-device-plugin/distroless/intel-fpga-initcontainer.stable_docker_image b/kubernetes/plugins/intel-device-plugin/distroless/intel-fpga-initcontainer.stable_docker_image new file mode 100644 index 000000000..ba4f665b8 --- /dev/null +++ b/kubernetes/plugins/intel-device-plugin/distroless/intel-fpga-initcontainer.stable_docker_image @@ -0,0 +1,7 @@ +BUILDER=script +LABEL=intel-fpga-initcontainer +SOURCE_REPO=https://github.com/intel/intel-device-plugins-for-kubernetes.git +SOURCE_REF=4f28657b6b4a37a7ed2e8398808c150eb4f1bdd1 +COMMAND=bash +SCRIPT=build-intel-device-plugins-image.sh +ARGS=intel-fpga-initcontainer diff --git a/kubernetes/plugins/intel-device-plugin/distroless/intel-fpga-plugin.stable_docker_image b/kubernetes/plugins/intel-device-plugin/distroless/intel-fpga-plugin.stable_docker_image new file mode 100644 index 000000000..d9c8dc9b9 --- /dev/null +++ b/kubernetes/plugins/intel-device-plugin/distroless/intel-fpga-plugin.stable_docker_image @@ -0,0 +1,7 @@ +BUILDER=script +LABEL=intel-fpga-plugin +SOURCE_REPO=https://github.com/intel/intel-device-plugins-for-kubernetes.git +SOURCE_REF=4f28657b6b4a37a7ed2e8398808c150eb4f1bdd1 +COMMAND=bash +SCRIPT=build-intel-device-plugins-image.sh +ARGS=intel-fpga-plugin diff --git a/kubernetes/plugins/intel-device-plugin/distroless/intel-gpu-plugin.stable_docker_image b/kubernetes/plugins/intel-device-plugin/distroless/intel-gpu-plugin.stable_docker_image index b07d2d9cb..3bda84ae7 100644 --- a/kubernetes/plugins/intel-device-plugin/distroless/intel-gpu-plugin.stable_docker_image +++ b/kubernetes/plugins/intel-device-plugin/distroless/intel-gpu-plugin.stable_docker_image @@ -1,6 +1,7 @@ BUILDER=script LABEL=intel-gpu-plugin SOURCE_REPO=https://github.com/intel/intel-device-plugins-for-kubernetes.git -SOURCE_REF=156970adcaa6d4db42532110f370505d6777135b +SOURCE_REF=4f28657b6b4a37a7ed2e8398808c150eb4f1bdd1 COMMAND=bash -SCRIPT=build-intel-gpu-plugin-image.sh +SCRIPT=build-intel-device-plugins-image.sh +ARGS=intel-gpu-plugin