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

Add multi-stage docker file for CI image #45402

Merged
merged 2 commits into from
Sep 4, 2020
Merged

Conversation

scinos
Copy link
Contributor

@scinos scinos commented Sep 4, 2020

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:

  • Extra env options to configure the cache and max memory
  • /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 compilations

Testing 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 with docker image ls:

REPOSITORY         TAG                                               IMAGE ID            CREATED             SIZE
XXX/calypso/ci     foo                                               1fa1b89c3a1b        3 minutes ago       2.25GB
XXX/calypso/base   foo                                               af7d28124568        7 minutes ago       3.78GB

To check the content of the cache, run docker run --rm -ti --entrypoint /bin/sh XXX/calypso/ci:foo -c "ls -la /calypso/.cache"

@matticbot
Copy link
Contributor

@scinos scinos requested a review from a team September 4, 2020 09:46
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Sep 4, 2020
@scinos scinos requested a review from sirreal September 4, 2020 09:46
@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

Copy link
Member

@jsnajdr jsnajdr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@scinos scinos merged commit 343156f into master Sep 4, 2020
@scinos scinos deleted the add/docker-base-image branch September 4, 2020 10:41
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Sep 4, 2020
Copy link
Collaborator

@wp-desktop wp-desktop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WordPress Desktop CI Failure for job "wp-desktop-mac".

@scinos please inspect this job's build steps for breaking changes at this link. For temporal failures, you may try to "Rerun Workflow from Failed".

Please also ensure this branch is rebased off latest Calypso.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants