forked from IBM/ibm-spectrum-scale-csi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (39 loc) · 1.61 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
###############################################################################
# Licensed Materials - Property of IBM.
# Copyright IBM Corporation 2017, 2024. All Rights Reserved.
# U.S. Government Users Restricted Rights - Use, duplication or disclosure
# restricted by GSA ADP Schedule Contract with IBM Corp.
#
# Contributors:
# IBM Corporation - initial API and implementation
###############################################################################
SHELL = /bin/bash
STABLE_BUILD_DIR = repo/stable
STABLE_REPO_URL ?= https://raw.githubusercontent.com/IBM/charts/master/repo/stable/
STABLE_CHARTS := $(wildcard stable/*)
BUNDLE_HELM_PACKAGE = $(shell find $@/charts -maxdepth 2 -type f -name Chart.yaml | sed 's/Chart.yaml//' | xargs -i helm package {} -d $(STABLE_BUILD_DIR))
.DEFAULT_GOAL=all
$(STABLE_BUILD_DIR):
@mkdir -p $@
.PHONY: charts charts-stable $(STABLE_CHARTS)
# Default aliases: charts, repo
charts: charts-stable
repo: repo-stable
charts-stable: $(STABLE_CHARTS)
$(STABLE_CHARTS): $(STABLE_BUILD_DIR)
cv lint ibmcase-bundle $@
@echo $(BUNDLE_HELM_PACKAGE)
.PHONY: repo repo-stable repo-incubating
repo-stable: $(STABLE_CHARTS) $(STABLE_BUILD_DIR)
helm repo index $(STABLE_BUILD_DIR) --url $(STABLE_REPO_URL)
.PHONY: all
all: repo-stable build-driver-image
#
# CSI Driver section
#
IMAGE_VERSION=v2.4.0
DRIVER_IMAGE_NAME=ibm-spectrum-scale-csi-driver
build-driver-image:
docker build -t $(DRIVER_IMAGE_NAME):$(IMAGE_VERSION) -f ./driver/build/Dockerfile ./driver/
save-driver-image: build-image
docker save $(DRIVER_IMAGE_NAME):$(IMAGE_VERSION) -o _output/$(DRIVER_IMAGE_NAME)_$(IMAGE_VERSION).tar