Skip to content

Commit

Permalink
Merge pull request #27 from alexzhc/main
Browse files Browse the repository at this point in the history
correct chart version in files
  • Loading branch information
alexzhc authored Oct 12, 2022
2 parents 7e28d10 + c7e48f8 commit 9ba85a6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 26 deletions.
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SHELL := /bin/bash
ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))

CHART_VER ?= 0.3.5
CHART_VER ?= 0.3.6
DRBD_VER ?= 9.0.32-1# another tested value is: 9.1.11
DRBD_UTILS_VER ?= 9.12.1# another tested value is: 9.21.4

Expand All @@ -19,11 +19,11 @@ IMG ?= shipper rhel7 rhel8 rhel9 bionic focal jammy kylin10
# Default test registry
REG ?= daocloud.io/daocloud

update_chart:
update_chart_ver:
if sed --version | grep -iw gnu; then \
sed -i 's/version:.*/version: $(CHART_VER)/' ./helm/drbd-adapter/Chart.yaml; \
sed -i 's/version:.*/version: v$(CHART_VER)/' ./helm/drbd-adapter/Chart.yaml; \
else \
sed -i '' 's/version:.*/version: $(CHART_VER)/' ./helm/drbd-adapter/Chart.yaml; \
sed -i '' 's/version:.*/version: v$(CHART_VER)/' ./helm/drbd-adapter/Chart.yaml; \
fi
grep ^version ./helm/drbd-adapter/Chart.yaml

Expand Down Expand Up @@ -63,15 +63,15 @@ compiler-utils:
-t $(REG)/drbd9-compiler-utils:v$(DRBD_VER)_$${a/\//-}; \
done

shipper: update_chart
shipper: update_chart_ver
for a in $(shell echo $(ARCH) | tr ',' ' '); do \
docker build docker-shipper/ -f docker-shipper/Dockerfile.shipper \
--platform $$a \
--progress tty \
--build-arg DRBD_VER=$(DRBD_VER) \
--build-arg DRBD_UTILS_VER=$(DRBD_UTILS_VER) \
--build-arg DRBD_HEADERS_SHA=$(DRBD_HEADERS_SHA) \
-t $(REG)/drbd9-shipper:v$(DRBD_VER)_$(CHART_VER)_$${a/\//-}; \
-t $(REG)/drbd9-shipper:v$(DRBD_VER)_v$(CHART_VER)_$${a/\//-}; \
done

cleanup:
Expand All @@ -88,7 +88,7 @@ test-docker:
docker volume rm pkgs || true
docker run --rm \
-v pkgs:/pkgs \
drbd9-shipper:v$(DRBD_VER)_$(CHART_VER)
drbd9-shipper:v$(DRBD_VER)_v$(CHART_VER)
docker run --rm \
-v pkgs:/pkgs \
--privileged \
Expand All @@ -112,7 +112,7 @@ test:
push:
set -x; \
for i in $(IMG); do \
[ $$i = "shipper" ] && ver=$(DRBD_VER)_$(CHART_VER) || ver=$(DRBD_VER); \
[ $$i = "shipper" ] && ver=$(DRBD_VER)_v$(CHART_VER) || ver=$(DRBD_VER); \
docker manifest rm $(REG)/drbd9-$$i:v$${ver}; \
for a in $(shell echo $(ARCH) | tr ',' ' ' ); do \
docker push $(REG)/drbd9-$$i:v$${ver}_$${a/\//-} || \
Expand Down
2 changes: 1 addition & 1 deletion docker-shipper/entrypoint.adapter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ fi
if [[ $LB_DROP == yes ]]; then

# drop modules
if [[ $host_dist =~ rhel ]]; then
if [[ $host_dist =~ rhel|kylin10 ]]; then
KODIR="/lib/modules/$(uname -r)/extra/drbd"
elif [[ $host_dist =~ bionic|focal|jammy ]]; then
KODIR="/lib/modules/$(uname -r)/updates/dkms/drbd"
Expand Down
19 changes: 2 additions & 17 deletions helm/drbd-adapter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,8 @@ apiVersion: v2
name: drbd-adapter
description: A DRBD kernel loader that auto-adapts OS distros

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into version: 0.3.4
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version: 0.3.4
# to the chart and its templates, including the app version: 0.3.4
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.3.5
version: v0.3.6

# This is the version: 0.3.4
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version: 0.3.4
# It is recommended to use it with quotes.
appVersion: 9.0.32
appVersion: v9.0.32

0 comments on commit 9ba85a6

Please sign in to comment.