Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: actually check the project defined routerpattern exists #2926

Merged
merged 1 commit into from
Nov 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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