in karavan-vscode/src/exec.ts [57:79]
export function camelDeploy(directory: string) {
Promise.all([
utils.getRuntime(),
utils.getTarget(),
utils.getExportFolder(),
execCommand("oc project -q"), // get namespace
]).then(val => {
const runtime = val[0] || '';
const target = val[1] || '';
const exportFolder = val[2] || '';
let env: any = { "DATE": Date.now().toString() };
if (['openshift','kubernetes'].includes(target) && val[3].result) {
env.NAMESPACE = val[3].value.trim();
} else if (['openshift','kubernetes'].includes(target) && val[3].result === undefined) {
window.showErrorMessage("Namespace not set \n" + val[3].error);
}
const deployCommand: string = workspace.getConfiguration().get("Karavan.".concat(runtime.replaceAll("-", "")).concat(utils.capitalize(target)).concat("Deploy")) || '';
const command = jbang.createExportCommand(directory).concat(" && ").concat(deployCommand).concat(" -f ").concat(exportFolder);
execTerminalCommand("deploy", command, env);
}).catch((reason: any) => {
window.showErrorMessage("Error: \n" + reason.message);
});
}