Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move base docker image creation from Testcontainer setup files to github actions job #140

Closed
shimisnow opened this issue Nov 11, 2024 · 0 comments · Fixed by #141
Closed
Assignees
Labels
e2e specific for E2E test scrum-sp-5 scrum story points test unit, integration or E2E

Comments

@shimisnow
Copy link
Owner

Currently the base images (pocnestjs-base-dev and pocnestjs-base-prod) are build inside the global-setup.ts for e2e test services.

const [baseImageDev, baseImageProd] = await Promise.all([
  // build docker image with node_module for development
  GenericContainer.fromDockerfile('./')
    .withBuildArgs({ NODE_ENV: 'development' })
    .build(DOCKER_IMAGE_POCNESTJS_BASE_DEV, {
      deleteOnExit: false,
    }),
  // build docker image with node_module for production
  GenericContainer.fromDockerfile('./')
    .withBuildArgs({ NODE_ENV: 'production' })
    .build(DOCKER_IMAGE_POCNESTJS_BASE_PROD, {
      deleteOnExit: false,
    }),
]);

With the project growing, the build process is facing errors due to npm dependencies, timeout, etc.

Sometimes the image can be build using docker and docker compose commands, but it fails inside the Testcontainer build.

Testcontainer does not provide access to Docker build log, so there is no way to know what is happening.

The goal here is to move the build process to both images do jobs in the github actions workflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2e specific for E2E test scrum-sp-5 scrum story points test unit, integration or E2E
Projects
None yet
1 participant