File tree Expand file tree Collapse file tree 4 files changed +28
-12
lines changed
cf-common-test/tests/deployment Expand file tree Collapse file tree 4 files changed +28
-12
lines changed Original file line number Diff line number Diff line change @@ -247,3 +247,19 @@ tests:
247247 - equal :
248248 path : spec.template.spec.containers[0].image
249249 value : gcr.io/codefresh-enterprise/codefresh/cf-api:latest
250+
251+ # For backward compatibility (onprem with private docker registry)
252+ - it : Test main container with private docker registry prefix defined in global and local
253+ values :
254+ - values.yaml
255+ set :
256+ global :
257+ privateRegistry : true
258+ dockerRegistry : myregistry.io/
259+ image : codefresh/cf-api
260+ dockerRegistry : gcr.io/codefresh-enterprise/
261+ imageTag : latest
262+ asserts :
263+ - equal :
264+ path : spec.template.spec.containers[0].image
265+ value : myregistry.io/codefresh/cf-api:latest
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ apiVersion: v2
22appVersion : v0.0.0
33description : Codefresh library chart
44name : cf-common
5- version : 0.0.6
5+ version : 0.0.7
66type : library
77keywords :
88 - codefresh
Original file line number Diff line number Diff line change 22
33Codefresh library chart
44
5- ![ Version: 0.0.6 ] ( https://img.shields.io/badge/Version-0.0.6 -informational?style=flat-square ) ![ Type: library] ( https://img.shields.io/badge/Type-library-informational?style=flat-square ) ![ AppVersion: v0.0.0] ( https://img.shields.io/badge/AppVersion-v0.0.0-informational?style=flat-square )
5+ ![ Version: 0.0.7 ] ( https://img.shields.io/badge/Version-0.0.7 -informational?style=flat-square ) ![ Type: library] ( https://img.shields.io/badge/Type-library-informational?style=flat-square ) ![ AppVersion: v0.0.0] ( https://img.shields.io/badge/AppVersion-v0.0.0-informational?style=flat-square )
66
77## Installing the Chart
88
@@ -18,7 +18,7 @@ Include this chart as a dependency in your `Chart.yaml` e.g.
1818# Chart.yaml
1919dependencies :
2020- name : cf-common
21- version : 0.0.6
21+ version : 0.0.7
2222 repository : https://chartmuseum.codefresh.io/cf-common
2323` ` `
2424
Original file line number Diff line number Diff line change @@ -18,15 +18,6 @@ Usage:
1818 { {- end -} }
1919{ {- end -} }
2020
21- { {- /*
22- For backward compatibility (onprem with private docker registry)
23- */} }
24- { {- if $.Values.global -} }
25- { {- if and $.Values.global.privateRegistry $.Values.global.dockerRegistry -} }
26- { { $registryName = $.Values.global.dockerRegistry | trimSuffix " /" } }
27- { {- end -} }
28- { {- end -} }
29-
3021{ {- /*
3122For backward compatibility with legacy var struct
3223e.g.:
@@ -46,6 +37,15 @@ cf-api:
4637{ {- $imageTag = $.Values.imageTag | toString -} }
4738{ {- end -} }
4839
40+ { {- /*
41+ For backward compatibility (onprem with private docker registry)
42+ */} }
43+ { {- if $.Values.global -} }
44+ { {- if and $.Values.global.privateRegistry $.Values.global.dockerRegistry -} }
45+ { { $registryName = $.Values.global.dockerRegistry | trimSuffix " /" } }
46+ { {- end -} }
47+ { {- end -} }
48+
4949{ {- printf " %s/%s:%s" $registryName $repositoryName $imageTag -} }
5050
5151{ {- end -} }
You can’t perform that action at this time.
0 commit comments