Skip to content

Commit 57e77f2

Browse files
authored
Helm - tailor parity (#1220)
1 parent 54deef8 commit 57e77f2

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77

88
### Changed
9+
* Helm parity with Tailor ([#1219](https://github.com/opendevstack/ods-jenkins-shared-library/issues/1219))
910

1011

1112
### Fixed

src/org/ods/services/OpenShiftService.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ class OpenShiftService {
131131
def upgradeFlags = defaultFlags.collect { it }
132132
additionalFlags.collect { upgradeFlags << it }
133133
valuesFiles.collect { upgradeFlags << "-f ${it}".toString() }
134+
values.put('ODS_OPENSHIFT_APP_DOMAIN', getApplicationDomain())
134135
values.collect { k, v -> upgradeFlags << "--set ${k}=${v}".toString() }
135136
if (withDiff) {
136137
def diffFlags = upgradeFlags.findAll { it }

test/groovy/org/ods/services/OpenShiftServiceSpec.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
package org.ods.services
32

43
import groovy.json.JsonSlurperClassic
@@ -301,6 +300,7 @@ class OpenShiftServiceSpec extends SpecHelper {
301300
given:
302301
def steps = Spy(util.PipelineSteps)
303302
def service = new OpenShiftService(steps, new Logger(steps, false))
303+
steps.sh({ it.script == 'oc whoami --show-console' }) >> 'https://console-openshift-console.apps.openshift.com'
304304

305305
when:
306306
service.helmUpgrade(
@@ -315,11 +315,11 @@ class OpenShiftServiceSpec extends SpecHelper {
315315

316316
then:
317317
1 * steps.sh(
318-
script: 'HELM_DIFF_IGNORE_UNKNOWN_FLAGS=true helm -n foo secrets diff upgrade --install --atomic --force -f values.yml -f values-dev.yml --set imageTag=6f8db5fb --no-color --three-way-merge --normalize-manifests bar ./',
318+
script: 'HELM_DIFF_IGNORE_UNKNOWN_FLAGS=true helm -n foo secrets diff upgrade --install --atomic --force -f values.yml -f values-dev.yml --set imageTag=6f8db5fb --set ODS_OPENSHIFT_APP_DOMAIN=apps.openshift.com --no-color --three-way-merge --normalize-manifests bar ./',
319319
label: 'Show diff explaining what helm upgrade would change for release bar in foo'
320320
)
321321
1 * steps.sh(
322-
script: 'helm -n foo secrets upgrade --install --atomic --force -f values.yml -f values-dev.yml --set imageTag=6f8db5fb bar ./',
322+
script: 'helm -n foo secrets upgrade --install --atomic --force -f values.yml -f values-dev.yml --set imageTag=6f8db5fb --set ODS_OPENSHIFT_APP_DOMAIN=apps.openshift.com bar ./',
323323
label: 'Upgrade Helm release bar in foo',
324324
returnStatus: true
325325
)

0 commit comments

Comments
 (0)