Skip to content

Commit

Permalink
feat: [KTD-3526] workable solution 27
Browse files Browse the repository at this point in the history
  • Loading branch information
damwu1 committed May 11, 2024
1 parent 60089f9 commit d636e20
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions k8s-deployer/src/deployer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,11 @@ export const deployComponent = async (
commitSha = await cloneFromGit(spec.id, spec.location, appDir)
} else {
logger.info("Reading commit sha of local project: '%s'", appDir)

if (process.env.DO_NOT_CREATE_PROJECT_DIR === "true") spec.location.path = "."; // only if creating project directory is not required

logger.info('damon path 🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩: ', process.cwd())
if (spec.location.path) {
appDir = spec.location.path
logger.info("The application directory will be taken from 'location.path' attribute: '%s' of '%s'", appDir, spec.name)
} else {
logger.info('damon path 🤩🤩🤩🤩🤩🤩🤩🤩🤩🤩: ', process.cwd())
appDir = spec.id
logger.info("The application directory will be taken from 'id' attribute: '%s' of '%s'", appDir, spec.name)
}
Expand All @@ -230,8 +227,6 @@ export const undeployComponent = async (workspace: string, namespace: Namespace,
const spec = deploymentInfo.component
let appDir = `${workspace}/${ spec.id }`

if (process.env.DO_NOT_CREATE_PROJECT_DIR === "true") spec.location.path = "." // only if creating project directory is not required

if (spec.location.type === LocationType.Local) {
if (spec.location.path) {
appDir = spec.location.path
Expand Down

0 comments on commit d636e20

Please sign in to comment.