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

'make tar' to use docker compiled assets #1008

Merged
merged 1 commit into from
Oct 17, 2017
Merged

Conversation

chrisplo
Copy link
Contributor

@chrisplo chrisplo commented Oct 14, 2017

make tar is primarily used for release, it is much faster to use compile-with-docker locally than spawn a VM to run the build.

Signed-off-by: Chris Plock chrisplo@cisco.com

@chrisplo chrisplo changed the title WIP: make Tar update, blocked on CNTV-86 WIP: make Tar update, blocked on #1009 Oct 16, 2017
@chrisplo chrisplo changed the title WIP: make Tar update, blocked on #1009 WIP: make Tar update, blocked on #1007 Oct 16, 2017
Makefile Outdated

# build tarball
tar: compile-with-docker
docker run --rm netplugin-build:$(NETPLUGIN_CONTAINER_TAG) \
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use docker cp to copy build artifacts.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

there is no container to target docker cp

Copy link
Contributor Author

Choose a reason for hiding this comment

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

switching to docker create + docker cp + docker rm

@chrisplo chrisplo changed the title WIP: make Tar update, blocked on #1007 WIP: make Tar update, blocked on #1007 #1009 Oct 16, 2017
@chrisplo chrisplo changed the title WIP: make Tar update, blocked on #1007 #1009 WIP: make Tar update, blocked on #1009 Oct 16, 2017
@chrisplo chrisplo force-pushed the tar_update branch 2 times, most recently from b2fe667 to 86cb2c8 Compare October 16, 2017 21:15
@chrisplo chrisplo changed the title WIP: make Tar update, blocked on #1009 'make tar' to use docker compiled assets Oct 16, 2017
Beacuse of start/stop of a VM, a tar build can take 4 minutes.  When
using a docker container, when previously compiled only needs 10s (30s
if netplugin src updated)

Add target to export tar from container build to local directory

Signed-off-by: Chris Plock <chrisplo@cisco.com>
Copy link
Contributor

@unclejack unclejack left a comment

Choose a reason for hiding this comment

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

LGTM

@chrisplo
Copy link
Contributor Author

build PR

@chrisplo
Copy link
Contributor Author

this (and compile-with-docker) works in VM (docker 1.12) as well as desktop (docker 17.09), though without a private registry to cache things like the golang layer, the startup cost of compiling in docker on a fresh VM is large, better to run this target locally.

@dseevr dseevr merged commit 37ffb5c into contiv:master Oct 17, 2017
@chrisplo chrisplo deleted the tar_update branch October 17, 2017 20:26
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.

3 participants