fix: consider base directory in heroku bp
This commit is contained in:
@@ -2,13 +2,12 @@ import { executeDockerCmd, prisma } from "../common"
|
|||||||
import { saveBuildLog } from "./common";
|
import { saveBuildLog } from "./common";
|
||||||
|
|
||||||
export default async function (data: any): Promise<void> {
|
export default async function (data: any): Promise<void> {
|
||||||
const { buildId, applicationId, tag, dockerId, debug, workdir } = data
|
const { buildId, applicationId, tag, dockerId, debug, workdir, baseDirectory } = data
|
||||||
try {
|
try {
|
||||||
|
|
||||||
await saveBuildLog({ line: `Building image started.`, buildId, applicationId });
|
await saveBuildLog({ line: `Building image started.`, buildId, applicationId });
|
||||||
const { stdout } = await executeDockerCmd({
|
const { stdout } = await executeDockerCmd({
|
||||||
dockerId,
|
dockerId,
|
||||||
command: `pack build -p ${workdir} ${applicationId}:${tag} --builder heroku/buildpacks:20`
|
command: `pack build -p ${workdir}${baseDirectory} ${applicationId}:${tag} --builder heroku/buildpacks:20`
|
||||||
})
|
})
|
||||||
if (debug) {
|
if (debug) {
|
||||||
const array = stdout.split('\n')
|
const array = stdout.split('\n')
|
||||||
|
|||||||
Reference in New Issue
Block a user