Add multi-stage docker file for CI image #45402
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes proposed in this Pull Request
Adds a new Dockerfile used to generate an image that will be used to run CI tests in TeamCity (see https://github.com/Automattic/wp-calypso/pull/45399/files#diff-e9c4033904a319e2d4b3dd1f864d1966R71).
This CI image is like
node:12.18.0
with:/calypso/.nvm
with a nvm cache for faster Node installation/calypso/.cache/yarn
with yarn cache for faster dependency installation/calypso/.cache/*
with all webpack caches (babel, terser...) for faster compilationsTesting instructions
Checkout the branch and run
./bin/build-docker.sh foo
(it will take a while, ~30m in my machine). You should end up with two new docker images, you can see them withdocker image ls
:To check the content of the cache, run
docker run --rm -ti --entrypoint /bin/sh XXX/calypso/ci:foo -c "ls -la /calypso/.cache"