1 Star 0 Fork 2

techwolf/k8s-device-plugin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile 1.79 KB
一键复制 编辑 原始数据 按行查看 历史
limengxuan 提交于 2021-07-19 12:00 . fix version to v0.9.0
# Copyright (c) 2020-2021, NVIDIA CORPORATION. All rights reserved.
#
# 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.
.PHONY: all build builder test
.DEFAULT_GOAL := all
##### Global variables #####
DOCKER ?= docker
ifeq ($(IMAGE),)
REGISTRY ?= 4pdosc
#REGISTRY ?= m7-ieg-pico-test01:5000
IMAGE := $(REGISTRY)/k8s-device-plugin
endif
VERSION ?= v0.9.0
GOLANG_VERSION ?= 1.15.8
##### Public rules #####
DEFAULT_DISTRIBUTION := ubuntu20.04
DISTRIBUTIONS = $(DEFAULT_DISTRIBUTION) ubi8
BUILD_TARGETS := $(patsubst %,build-%,$(DISTRIBUTIONS))
PUSH_TARGETS := $(patsubst %,push-%,$(DISTRIBUTIONS))
.PHONY: $(DISTRIBUTIONS) $(BUILD_TARGETS) $(PUSH_TARGETS)
all: $(BUILD_TARGETS)
push: $(PUSH_TARGETS)
$(PUSH_TARGETS): push-%:
$(DOCKER) push "$(IMAGE):$(VERSION)-$(*)"
push-short:
$(DOCKER) tag "$(IMAGE):$(VERSION)-$(DEFAULT_DISTRIBUTION)" "$(IMAGE):$(VERSION)"
$(DOCKER) push "$(IMAGE):$(VERSION)"
push-latest:
$(DOCKER) tag "$(IMAGE):$(VERSION)-$(DEFAULT_DISTRIBUTION)" "$(IMAGE):latest"
$(DOCKER) push "$(IMAGE):latest"
$(DISTRIBUTIONS): %: build-%
build-%: DISTRIBUTION = $(*)
$(BUILD_TARGETS): build-%:
$(DOCKER) build --pull \
--build-arg GOLANG_VERSION=$(GOLANG_VERSION) \
--build-arg PLUGIN_VERSION=$(VERSION) \
--tag $(IMAGE):$(VERSION)-$(DISTRIBUTION) \
--file docker/Dockerfile.$(DISTRIBUTION) \
.
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/techwolf/k8s-device-plugin.git
git@gitee.com:techwolf/k8s-device-plugin.git
techwolf
k8s-device-plugin
k8s-device-plugin
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385