Skip to content

Commit

Permalink
fix: actually check the project defined routerpattern exists
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon committed Nov 10, 2021
1 parent 51cb320 commit e1bc7a0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion node-packages/commons/src/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -402,11 +402,18 @@ export const getControllerBuildData = async function(deployData: any) {

var openshiftProject = openshiftProjectPattern ? openshiftProjectPattern.replace('${environment}',environmentName).replace('${project}', projectName) : `${projectName}-${environmentName}`

// set routerpattern to the routerpattern of what is defined in the project scope openshift
var routerPattern = lagoonProjectData.openshift.routerPattern
if (typeof deployTarget.openshift.routerPattern !== 'undefined') {
// null is a valid value for routerPatterns...
// if deploytargets are being provided, then use what is defined in the deploytarget
// null is a valid value for routerPatterns here...
routerPattern = deployTarget.openshift.routerPattern
}
// but if the project itself has a routerpattern defined, then this should be used
if (lagoonProjectData.routerPattern) {
// if a project has a routerpattern defined, use it. `null` is not valid here
routerPattern = lagoonProjectData.routerPattern
}
var deployTargetName = deployTarget.openshift.name
var monitoringConfig: any = {};
try {
Expand Down

0 comments on commit e1bc7a0

Please sign in to comment.