File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,8 +28,10 @@ build: build-deps
2828
2929repos :
3030 rm -rf _out
31+ make -C packages/library check-version-map
3132 make -C packages/apps check-version-map
3233 make -C packages/extra check-version-map
34+ make -C packages/library repo
3335 make -C packages/system repo
3436 make -C packages/apps repo
3537 make -C packages/extra repo
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ set -e
4+
5+ usage () {
6+ printf " %s\n" " Usage:" >&2 ;
7+ printf -- " %s\n" ' ---' >&2 ;
8+ printf " %s %s\n" " $0 " " INPUT_DIR OUTPUT_DIR TMP_DIR [DEPENDENCY_DIR]" >&2 ;
9+ printf -- " %s\n" ' ---' >&2 ;
10+ printf " %s\n" " Takes a helm repository from INPUT_DIR, with an optional library repository in" >&2 ;
11+ printf " %s\n" " DEPENDENCY_DIR, prepares a view of the git archive at select points in history" >&2 ;
12+ printf " %s\n" " in TMP_DIR and packages helm charts, outputting the tarballs to OUTPUT_DIR" >&2 ;
13+ }
14+
15+ if [ " x$( basename $PWD ) " != " xpackages" ]
16+ then
17+ echo " Error: This script must run from the ./packages/ directory" >&2
18+ echo >&2
19+ usage
20+ exit 1
21+ fi
22+
23+ if [ " x$# " != " x3" ] && [ " x$# " != " x4" ]
24+ then
25+ echo " Error: This script takes 3 or 4 arguments" >&2
26+ echo " Got $# : $@ " >&2
27+ echo >&2
28+ usage
29+ exit 1
30+ fi
31+
32+ input_dir=$1
33+ output_dir=$2
34+ tmp_dir=$3
35+
36+ if [ " x$# " = " x4" ]
37+ then
38+ dependency_dir=$4
39+ fi
40+
41+ rm -rf " ${output_dir} "
42+ mkdir -p " ${output_dir} "
43+ while read package _ commit
44+ do
45+ git archive --format tar " ${commit} " " ${input_dir} /${package} " | tar -xf- -C " ${tmp_dir} /"
46+ if [ " x${dependency_dir} " != " x" ] && git ls-tree --name-only " ${commit} " " ${dependency_dir} " | grep -qx " ${dependency_dir} "
47+ then
48+ git archive --format tar " ${commit} " " ${dependency_dir} " | tar -xf- -C " ${tmp_dir} /"
49+ fi
50+ helm package " ${tmp_dir} /${input_dir} /${package} " -d " ${output_dir} "
51+ rm -rf " ${tmp_dir:? } /${input_dir:? } /${package:? } "
52+ if [ " x${dependency_dir} " != " x" ]
53+ then
54+ rm -rf " ${tmp_dir:? } /${dependency_dir:? } "
55+ fi
56+ done < " ${input_dir} /versions_map"
Original file line number Diff line number Diff line change 1- OUT =../../ _out/repos/apps
2- TMP =../../_out/repos/apps/historical
1+ OUT =../_out/repos/apps
2+ TMP := $( shell mktemp -d)
33
44repo :
5- rm -rf " $( OUT) "
6- mkdir -p " $( OUT) "
7- awk ' $$3 != "HEAD" {print "mkdir -p $(TMP)/" $$1 "-" $$2}' versions_map | sh -ex
8- awk ' $$3 != "HEAD" {print "git archive " $$3 " " $$1 " | tar -xf- --strip-components=1 -C $(TMP)/" $$1 "-" $$2 }' versions_map | sh -ex
9- helm package -d " $( OUT) " $$(find . $(TMP ) -mindepth 2 -maxdepth 2 -name Chart.yaml | awk 'sub("/Chart.yaml", "" ) ' | sort -V)
10- cd " $( OUT) " && helm repo index . --url http://cozystack.cozy-system.svc/repos/apps
11- rm -rf " $( TMP) "
5+ cd .. && ../hack/package_chart.sh apps $(OUT ) $(TMP ) library
126
137fix-chartnames :
148 find . -maxdepth 2 -name Chart.yaml | awk -F/ ' {print $$2}' | while read i; do sed -i " s/^name: .*/name: $$ i/" " $$ i/Chart.yaml" ; done
Original file line number Diff line number Diff line change @@ -16,10 +16,15 @@ type: application
1616# This is the chart version. This version number should be incremented each time you make changes
1717# to the chart and its templates, including the app version.
1818# Versions are expected to follow Semantic Versioning (https://semver.org/)
19- version : 0.8 .0
19+ version : 0.9 .0
2020
2121# This is the version number of the application being deployed. This version number should be
2222# incremented each time you make changes to the application. Versions are not expected to
2323# follow Semantic Versioning. They should reflect the version the application is using.
2424# It is recommended to use it with quotes.
2525appVersion : " 24.9.2"
26+
27+ dependencies :
28+ - name : cozy-lib
29+ version : 0.1.0
30+ repository : " http://cozystack.cozy-system.svc/repos/library"
Original file line number Diff line number Diff line change 1+ ../../../library/cozy-lib
Original file line number Diff line number Diff line change @@ -122,9 +122,9 @@ spec:
122122 - name : clickhouse
123123 image : clickhouse/clickhouse-server:24.9.2.42
124124 {{- if .Values.resources }}
125- resources : {{- toYaml .Values.resources | nindent 16 }}
125+ resources : {{- include "cozy-lib.resources.sanitize" .Values.resources | nindent 16 }}
126126 {{- else if ne .Values.resourcesPreset "none" }}
127- resources : {{- include "resources.preset" (dict "type" .Values.resourcesPreset "Release" .Release) | nindent 16 }}
127+ resources : {{- include "cozy-lib. resources.preset" .Values.resourcesPreset | nindent 16 }}
128128 {{- end }}
129129 volumeMounts :
130130 - name : data-volume-template
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ clickhouse 0.6.0 1ec10165
99clickhouse 0.6.1 c62a83a7
1010clickhouse 0.6.2 8267072d
1111clickhouse 0.7.0 93bdf411
12- clickhouse 0.8 .0 HEAD
12+ clickhouse 0.9 .0 HEAD
1313ferretdb 0.1.0 e9716091
1414ferretdb 0.1.1 91b0499a
1515ferretdb 0.2.0 6c5cf5bf
Original file line number Diff line number Diff line change 1- OUT =../../ _out/repos/extra
2- TMP =../../_out/repos/extra/historical
1+ OUT =../_out/repos/extra
2+ TMP := $( shell mktemp -d)
33
44repo :
5- rm -rf " $( OUT) "
6- mkdir -p " $( OUT) "
7- awk ' $$3 != "HEAD" {print "mkdir -p $(TMP)/" $$1 "-" $$2}' versions_map | sh -ex
8- awk ' $$3 != "HEAD" {print "git archive " $$3 " " $$1 " | tar -xf- --strip-components=1 -C $(TMP)/" $$1 "-" $$2 }' versions_map | sh -ex
9- helm package -d " $( OUT) " $$(find . $(TMP ) -mindepth 2 -maxdepth 2 -name Chart.yaml | awk 'sub("/Chart.yaml", "" ) ' | sort -V)
10- cd " $( OUT) " && helm repo index . --url http://cozystack.cozy-system.svc/repos/extra
11- rm -rf " $( TMP) "
5+ cd .. && ../hack/package_chart.sh extra $(OUT ) $(TMP ) library
126
137fix-chartnames :
148 find . -maxdepth 2 -name Chart.yaml | awk -F/ ' {print $$2}' | while read i; do sed -i " s/^name: .*/name: $$ i/" " $$ i/Chart.yaml" ; done
Original file line number Diff line number Diff line change 1+ OUT =../../_out/repos/library
2+ TMP := $(shell mktemp -d)
3+
4+ repo :
5+ cd .. && ../hack/package_chart.sh library $(OUT ) $(TMP )
6+
7+ fix-chartnames :
8+ find . -maxdepth 2 -name Chart.yaml | awk -F/ ' {print $$2}' | while read i; do sed -i " s/^name: .*/name: $$ i/" " $$ i/Chart.yaml" ; done
9+
10+ gen-versions-map : fix-chartnames
11+ ../../hack/gen_versions_map.sh
12+
13+ check-version-map : gen-versions-map
14+ git diff --exit-code -- versions_map
15+
Original file line number Diff line number Diff line change 1+ # Patterns to ignore when building packages.
2+ # This supports shell glob matching, relative path matching, and
3+ # negation (prefixed with !). Only one pattern per line.
4+ .DS_Store
5+ # Common VCS dirs
6+ .git/
7+ .gitignore
8+ .bzr/
9+ .bzrignore
10+ .hg/
11+ .hgignore
12+ .svn/
13+ # Common backup files
14+ *.swp
15+ *.bak
16+ *.tmp
17+ *.orig
18+ *~
19+ # Various IDEs
20+ .project
21+ .idea/
22+ *.tmproj
23+ .vscode/
You can’t perform that action at this time.
0 commit comments