Skip to content

Commit

Permalink
Bug 1495460 - Fix build config source namespace
Browse files Browse the repository at this point in the history
Correctly set the build config source image namespace when adding a
builder using advanced options.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1495460
  • Loading branch information
spadgett committed Sep 26, 2017
1 parent cf9c610 commit 4b73da6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/scripts/services/applicationGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,11 @@ angular.module("openshiftConsole")
triggers: triggers
}
};

if(input.namespace) {
bc.spec.strategy.namespace = input.namespace;
bc.spec.strategy.sourceStrategy.from.namespace = input.namespace;
}

if (_.get(input, 'buildConfig.secrets.gitSecret[0].name')) {
bc.spec.source.sourceSecret = _.head(input.buildConfig.secrets.gitSecret);
}
Expand Down
2 changes: 1 addition & 1 deletion dist/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -1504,7 +1504,7 @@ env: n
triggers: a
}
};
return e.namespace && (l.spec.strategy.namespace = e.namespace), _.get(e, "buildConfig.secrets.gitSecret[0].name") && (l.spec.source.sourceSecret = _.head(e.buildConfig.secrets.gitSecret)), e.buildConfig.contextDir && (l.spec.source.contextDir = e.buildConfig.contextDir), l;
return e.namespace && (l.spec.strategy.sourceStrategy.from.namespace = e.namespace), _.get(e, "buildConfig.secrets.gitSecret[0].name") && (l.spec.source.sourceSecret = _.head(e.buildConfig.secrets.gitSecret)), e.buildConfig.contextDir && (l.spec.source.contextDir = e.buildConfig.contextDir), l;
}, o._generateImageStream = function(e) {
return {
apiVersion: "v1",
Expand Down

0 comments on commit 4b73da6

Please sign in to comment.