mirror of
https://github.com/intel/intel-device-plugins-for-kubernetes.git
synced 2025-06-03 03:59:37 +00:00
images: tag with intel prefix
In preparations to get some of the images to hub.docker.com/intel, start using intel/ prefix. Moreover, set the Makefile variables so that the images built by make [images|demos] can easily be pushed to any registry/org by 'docker push' (e.g., by Jenkins). Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
This commit is contained in:
parent
9d585ea0b8
commit
d06f98690f
9
Makefile
9
Makefile
@ -41,19 +41,22 @@ build: $(cmds)
|
||||
clean:
|
||||
@for cmd in $(cmds) ; do pwd=$(shell pwd) ; cd cmd/$$cmd ; $(GO) clean ; cd $$pwd ; done
|
||||
|
||||
TAG?=$(shell git rev-parse HEAD)
|
||||
ORG?=intel
|
||||
REG?=$(ORG)/
|
||||
TAG?=devel
|
||||
export TAG
|
||||
|
||||
images = $(shell ls build/docker/*.Dockerfile | sed 's/.*\/\(.\+\)\.Dockerfile/\1/')
|
||||
|
||||
$(images):
|
||||
@build/docker/build-image.sh $@ $(BUILDER)
|
||||
@build/docker/build-image.sh $(REG)$@ $(BUILDER)
|
||||
|
||||
images: $(images)
|
||||
|
||||
demos = $(shell cd demo/ && ls -d */ | sed 's/\(.\+\)\//\1/g')
|
||||
|
||||
$(demos):
|
||||
@cd demo/ && ./build-image.sh $@ $(BUILDER)
|
||||
@cd demo/ && ./build-image.sh $(REG)$@ $(BUILDER)
|
||||
|
||||
demos: $(demos)
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
IMG=$1
|
||||
BUILDER=$2
|
||||
|
||||
DOCKERFILE="$(dirname $0)/${IMG}.Dockerfile"
|
||||
DOCKERFILE="$(dirname $0)/$(basename ${IMG}).Dockerfile"
|
||||
|
||||
if [ -z "$IMG" ]; then
|
||||
(>&2 echo "Usage: $0 <Dockerfile>")
|
||||
@ -15,14 +15,15 @@ if [ ! -e "${DOCKERFILE}" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TAG=$(git rev-parse HEAD)
|
||||
TAG=${TAG:-devel}
|
||||
SRCREV=$(git rev-parse HEAD)
|
||||
|
||||
if [ -z "${BUILDER}" -o "${BUILDER}" = 'docker' ] ; then
|
||||
docker build --pull -t ${IMG}:${TAG} -f ${DOCKERFILE} .
|
||||
docker tag ${IMG}:${TAG} ${IMG}:devel
|
||||
docker tag ${IMG}:${TAG} ${IMG}:${SRCREV}
|
||||
elif [ "${BUILDER}" = 'buildah' ] ; then
|
||||
buildah bud --pull-always -t ${IMG}:${TAG} -f ${DOCKERFILE} .
|
||||
buildah tag ${IMG}:${TAG} ${IMG}:devel
|
||||
buildah tag ${IMG}:${TAG} ${IMG}:${SRCREV}
|
||||
else
|
||||
(>&2 echo "Unknown builder ${BUILDER}")
|
||||
exit 1
|
||||
|
@ -2,26 +2,28 @@
|
||||
|
||||
IMG=$1
|
||||
BUILDER=$2
|
||||
DIR=$(basename $IMG)
|
||||
|
||||
if [ -z "$IMG" ]; then
|
||||
if [ -z "$DIR" ]; then
|
||||
(>&2 echo "Usage: $0 <image directory>")
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "$IMG" ]; then
|
||||
(>&2 echo "Directory $IMG doesn't exist")
|
||||
if [ ! -d "$DIR" ]; then
|
||||
(>&2 echo "Directory $DIR doesn't exist")
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CWD=`dirname $0`
|
||||
TAG=`git rev-parse HEAD`
|
||||
TAG=${TAG:-devel}
|
||||
SRCREV=$(git rev-parse HEAD)
|
||||
|
||||
if [ -z "$BUILDER" -o "$BUILDER" = 'docker' ] ; then
|
||||
docker build --rm -t ${IMG}:${TAG} "$CWD/$IMG/"
|
||||
docker tag ${IMG}:${TAG} ${IMG}:devel
|
||||
docker build --pull -t ${IMG}:${TAG} "$CWD/$DIR/"
|
||||
docker tag ${IMG}:${TAG} ${IMG}:${SRCREV}
|
||||
elif [ "$BUILDER" = 'buildah' ] ; then
|
||||
buildah bud -t ${IMG}:${TAG} "$CWD/$IMG/"
|
||||
buildah tag ${IMG}:${TAG} ${IMG}:devel
|
||||
buildah bud --pull-always -t ${IMG}:${TAG} "$CWD/$DIR/"
|
||||
buildah tag ${IMG}:${TAG} ${IMG}:${SRCREV}
|
||||
else
|
||||
(>&2 echo "Unknown builder $BUILDER")
|
||||
exit 1
|
||||
|
@ -13,7 +13,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: fpga-mutator
|
||||
image: intel-fpga-admissionwebhook:devel
|
||||
image: intel/intel-fpga-admissionwebhook:devel
|
||||
imagePullPolicy: IfNotPresent
|
||||
args:
|
||||
- -tls-cert-file=/etc/webhook/certs/cert.pem
|
||||
|
@ -17,7 +17,7 @@ spec:
|
||||
serviceAccountName: intel-fpga-plugin-controller
|
||||
initContainers:
|
||||
- name: intel-fpga-initcontainer
|
||||
image: intel-fpga-initcontainer:devel
|
||||
image: intel/intel-fpga-initcontainer:devel
|
||||
imagePullPolicy: IfNotPresent
|
||||
volumeMounts:
|
||||
- mountPath: /opt/intel/fpga-sw
|
||||
@ -31,7 +31,7 @@ spec:
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
image: intel-fpga-plugin:devel
|
||||
image: intel/intel-fpga-plugin:devel
|
||||
imagePullPolicy: IfNotPresent
|
||||
volumeMounts:
|
||||
- name: devfs
|
||||
|
@ -21,7 +21,7 @@ spec:
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
image: intel-gpu-plugin:devel
|
||||
image: intel/intel-gpu-plugin:devel
|
||||
imagePullPolicy: IfNotPresent
|
||||
volumeMounts:
|
||||
- name: devfs
|
||||
|
@ -5,7 +5,7 @@ metadata:
|
||||
spec:
|
||||
containers:
|
||||
- name: crypto-perf
|
||||
image: crypto-perf:devel
|
||||
image: intel/crypto-perf:devel
|
||||
imagePullPolicy: IfNotPresent
|
||||
command: [ "/bin/bash", "-c", "--" ]
|
||||
args: [ "while true; do sleep 300000; done;" ]
|
||||
|
@ -15,7 +15,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: intel-qat-plugin
|
||||
image: intel-qat-plugin:devel
|
||||
image: intel/intel-qat-plugin:devel
|
||||
env:
|
||||
- name: DPDK_DRIVER
|
||||
valueFrom:
|
||||
|
@ -17,7 +17,7 @@ spec:
|
||||
- name: intel-qat-kernel-plugin
|
||||
securityContext:
|
||||
privileged: true
|
||||
image: intel-qat-plugin:devel
|
||||
image: intel/intel-qat-plugin:devel
|
||||
imagePullPolicy: IfNotPresent
|
||||
command: ["/usr/bin/intel_qat_device_plugin", "-mode", "kernel"]
|
||||
volumeMounts:
|
||||
|
Loading…
Reference in New Issue
Block a user