diff --git a/dev-tools/deploy b/dev-tools/deploy index fca9274ceba..7446f840c8e 100755 --- a/dev-tools/deploy +++ b/dev-tools/deploy @@ -13,13 +13,17 @@ def main(): dir = os.path.dirname(os.path.realpath(__file__)) os.chdir(dir + "/packer") + print("Getting dependencies") check_call("make deps", shell=True) check_call("make clean", shell=True) + print("Start building Docker images.") check_call("make images", shell=True) + print("Done building Docker images.") if args.no_snapshot: check_call("make SNAPSHOT=no", shell=True) else: check_call("make SNAPSHOT=yes", shell=True) + print("All done") if __name__ == "__main__": main() diff --git a/dev-tools/packer/Makefile b/dev-tools/packer/Makefile index e5bd7148ccb..51d1529eb8c 100644 --- a/dev-tools/packer/Makefile +++ b/dev-tools/packer/Makefile @@ -9,6 +9,7 @@ all: packetbeat/deb packetbeat/rpm packetbeat/darwin packetbeat/win packetbeat/b .PHONY: packetbeat metricbeat packetbeat metricbeat: build/upload + @echo Cross-compiling $@ # cross compile on ubuntu docker run --rm \ -v $(abspath build):/build \ @@ -36,6 +37,7 @@ packetbeat metricbeat: build/upload .PHONY: filebeat filebeat: + @echo Cross-compiling $@ # pure go cross compiling doesn't need C compilers but # we do it using the same docker instances for simplicity docker run --rm \ @@ -53,6 +55,7 @@ filebeat: .PHONY: winlogbeat winlogbeat: + @echo Cross-compiling $@ # Winlogbeat is pure go and only needs Windows docker run --rm \ -v $(abspath build):/build \ diff --git a/dev-tools/packer/docker/xgo-image/base/build.sh b/dev-tools/packer/docker/xgo-image/base/build.sh index 477f8b12d22..46be615f6c1 100644 --- a/dev-tools/packer/docker/xgo-image/base/build.sh +++ b/dev-tools/packer/docker/xgo-image/base/build.sh @@ -162,7 +162,7 @@ for TARGET in $TARGETS; do # Build the requested windows binaries if [ $XGOARCH == "." ] || [ $XGOARCH == "amd64" ]; then - echo "Compiling for windows-$PLATFORM/amd64..." + echo "Compiling $PACK for windows-$PLATFORM/amd64..." CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ CFLAGS="$CGO_NTDEF" CXXFLAGS="$CGO_NTDEF" HOST=x86_64-w64-mingw32 PREFIX=/usr/x86_64-w64-mingw32 $BUILD_DEPS /deps $LIST_DEPS export PKG_CONFIG_PATH=/usr/x86_64-w64-mingw32/lib/pkgconfig @@ -172,7 +172,7 @@ for TARGET in $TARGETS; do fi if [ $XGOARCH == "." ] || [ $XGOARCH == "386" ]; then - echo "Compiling for windows-$PLATFORM/386..." + echo "Compiling $PACK for windows-$PLATFORM/386..." CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ CFLAGS="$CGO_NTDEF" CXXFLAGS="$CGO_NTDEF" HOST=i686-w64-mingw32 PREFIX=/usr/i686-w64-mingw32 $BUILD_DEPS /deps $LIST_DEPS export PKG_CONFIG_PATH=/usr/i686-w64-mingw32/lib/pkgconfig diff --git a/dev-tools/packer/scripts/Makefile b/dev-tools/packer/scripts/Makefile index eb11015d57e..8e3836aae3e 100644 --- a/dev-tools/packer/scripts/Makefile +++ b/dev-tools/packer/scripts/Makefile @@ -6,21 +6,26 @@ packer_absdir=$(shell dirname ${makefile_abspath}) %/deb: % build/god-linux-386 build/god-linux-amd64 fpm-image + echo Creating DEB packages for $(@D) ARCH=386 BEAT=$(@D) BUILDID=$(BUILDID) SNAPSHOT=$(SNAPSHOT) $(packer_absdir)/platforms/debian/build.sh ARCH=amd64 BEAT=$(@D) BUILDID=$(BUILDID) SNAPSHOT=$(SNAPSHOT) $(packer_absdir)/platforms/debian/build.sh %/rpm: % build/god-linux-386 build/god-linux-amd64 fpm-image + echo Creating RPM packages for $(@D) ARCH=386 BEAT=$(@D) BUILDID=$(BUILDID) SNAPSHOT=$(SNAPSHOT) $(packer_absdir)/platforms/centos/build.sh ARCH=amd64 BEAT=$(@D) BUILDID=$(BUILDID) SNAPSHOT=$(SNAPSHOT) $(packer_absdir)/platforms/centos/build.sh %/darwin: % + echo Creating Darwin packages for $(@D) ARCH=amd64 BEAT=$(@D) BUILDID=$(BUILDID) SNAPSHOT=$(SNAPSHOT) $(packer_absdir)/platforms/darwin/build.sh %/win: % + echo Creating Darwin packages for $(@D) ARCH=386 BEAT=$(@D) BUILDID=$(BUILDID) SNAPSHOT=$(SNAPSHOT) $(packer_absdir)/platforms/windows/build.sh ARCH=amd64 BEAT=$(@D) BUILDID=$(BUILDID) SNAPSHOT=$(SNAPSHOT) $(packer_absdir)/platforms/windows/build.sh %/bin: % + echo Creating Linux packages for $(@D) ARCH=386 BEAT=$(@D) BUILDID=$(BUILDID) SNAPSHOT=$(SNAPSHOT) $(packer_absdir)/platforms/binary/build.sh ARCH=amd64 BEAT=$(@D) BUILDID=$(BUILDID) SNAPSHOT=$(SNAPSHOT) $(packer_absdir)/platforms/binary/build.sh