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

build: cache ui dependencies in CI #2713

Merged
merged 2 commits into from
Sep 29, 2015
Merged

build: cache ui dependencies in CI #2713

merged 2 commits into from
Sep 29, 2015

Conversation

tamird
Copy link
Contributor

@tamird tamird commented Sep 29, 2015

Closes #2705.

More useful now that we have npm, bower, and tsd.


CMD ["/bin/bash"]
EOF
cp "$(dirname $0)"/../ui/{bower,npm-shrinkwrap,package,tsd}.json "$(dirname $0)"/../ui/Makefile "$(dirname $0)"
Copy link
Member

Choose a reason for hiding this comment

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

are we going to frequently update these? Just asking since any change here requires a manual tag change in circle-deps (which isn't nicely automated b/c of likely caching issues).

Copy link
Contributor

Choose a reason for hiding this comment

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

I expect these will be updated a few times in the near future at least as I start building out the site.

Copy link
Member

Choose a reason for hiding this comment

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

ok, then that solution here looks good.
whoops, misread that as "few times a year". Well, we gotta start somehow. It's only if they changed multiple times a week forever that this would be an issue.

@petermattis
Copy link
Collaborator

LGTM

@tamird
Copy link
Contributor Author

tamird commented Sep 29, 2015

Reworked this so the caching is in circle-ci instead of in the builder image itself. We'll invoke {bower,npm,tsd} on each build, but those will usually be networkless no-ops. h/t to @bdarnell for his help.

@tamird tamird changed the title build: bake npm dependencies into builder image build: cache ui dependencies in CI Sep 29, 2015

ENV SKIP_BOOTSTRAP=1

CMD ["/bin/bash"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can move this back to builder.sh, right? Doesn't really matter I suppose.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, doesn't really matter. Slightly less surprising this way, I think.

@petermattis
Copy link
Collaborator

LGTM. This is much better.

@tamird
Copy link
Contributor Author

tamird commented Sep 29, 2015

@petermattis PTAL, had to add a commit because node stuff appears to be owned by root which fails on the cache pruning bit in builder.sh

@bdarnell
Copy link
Contributor

LGTM

@tamird
Copy link
Contributor Author

tamird commented Sep 29, 2015

Ran this build a second time after getting a green; confirmed the cache was used and the various dependency fetches were no-ops.

tamird added a commit that referenced this pull request Sep 29, 2015
build: cache ui dependencies in CI
@tamird tamird merged commit 92072df into cockroachdb:master Sep 29, 2015
@tamird tamird deleted the builder-bake-npm branch September 29, 2015 19:39
bdarnell added a commit to bdarnell/cockroach that referenced this pull request Oct 7, 2015
Partially reverts cockroachdb#2713 with a comment explaining why it should
be the way it was.

Attempt to fix the use of `circle-local.sh` in a dev environment
but don't get all the way there.
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.

5 participants