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 more progress logging to the packer #1866

Merged
merged 1 commit into from
Jun 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions dev-tools/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -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()
3 changes: 3 additions & 0 deletions dev-tools/packer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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 \
Expand All @@ -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 \
Expand Down
4 changes: 2 additions & 2 deletions dev-tools/packer/docker/xgo-image/base/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down
5 changes: 5 additions & 0 deletions dev-tools/packer/scripts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down