From 3d51923e3c33da286a4242627d00933aaad19eec Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Mon, 9 Nov 2020 22:28:34 +0900 Subject: make CI faster Build GoBGP binaries of a pull request locally and copy them to the container to be tested instead of copying the code into the container and building the binaries inside. Signed-off-by: FUJITA Tomonori --- test/lib/fabfile.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/lib/fabfile.py b/test/lib/fabfile.py index c50b7e22..660b612f 100644 --- a/test/lib/fabfile.py +++ b/test/lib/fabfile.py @@ -11,11 +11,13 @@ def make_gobgp_ctn(ctx, tag='gobgp', if local_gobgp_path == '': local_gobgp_path = os.getcwd() + local('CGO_ENABLED=0 go build "-ldflags=-s -w -buildid=" ./cmd/gobgp') + local('CGO_ENABLED=0 go build "-ldflags=-s -w -buildid=" ./cmd/gobgpd') + c = CmdBuffer() c << 'FROM {0}'.format(from_image) - c << 'ENV GO111MODULE on' - c << 'ADD gobgp /tmp/gobgp' - c << 'RUN cd /tmp/gobgp && go install ./cmd/gobgpd ./cmd/gobgp' + c << 'COPY gobgp/gobgpd /go/bin/gobgpd' + c << 'COPY gobgp/gobgp /go/bin/gobgp' rindex = local_gobgp_path.rindex('gobgp') if rindex < 0: -- cgit v1.2.3