mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 20:20:49 +00:00
Merge pull request #237 from AikidoSec/feature/adjust-docker-logging
test(e2e): capture docker build output instead of ignoring it
This commit is contained in:
commit
4623f3eff8
2 changed files with 7 additions and 3 deletions
|
|
@ -33,12 +33,16 @@ export class DockerTestContainer {
|
||||||
].join(" ");
|
].join(" ");
|
||||||
|
|
||||||
execSync(
|
execSync(
|
||||||
`docker build -t ${imageName} -f ${dockerFile} ${contextPath} ${buildArgs}`,
|
`docker build --progress=plain -t ${imageName} -f ${dockerFile} ${contextPath} ${buildArgs}`,
|
||||||
{
|
{
|
||||||
stdio: "ignore",
|
stdio: "pipe",
|
||||||
|
maxBuffer: 10 * 1024 * 1024, // Default is 1MB, increase to 10MB to account for large build logs
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
// Only print the build logs if the build fails
|
||||||
|
if (error.stdout) console.log(error.stdout.toString());
|
||||||
|
if (error.stderr) console.error(error.stderr.toString());
|
||||||
throw new Error(`Failed to build Docker image: ${error.message}`);
|
throw new Error(`Failed to build Docker image: ${error.message}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ RUN apt-get install -y fish && \
|
||||||
touch /root/.config/fish/config.fish
|
touch /root/.config/fish/config.fish
|
||||||
|
|
||||||
# Install Volta and Node.js
|
# Install Volta and Node.js
|
||||||
RUN curl https://get.volta.sh | bash
|
RUN curl -fsSL https://get.volta.sh | bash
|
||||||
RUN volta install node@${NODE_VERSION}
|
RUN volta install node@${NODE_VERSION}
|
||||||
RUN volta install npm@${NPM_VERSION}
|
RUN volta install npm@${NPM_VERSION}
|
||||||
RUN volta install yarn@${YARN_VERSION}
|
RUN volta install yarn@${YARN_VERSION}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue