File tree 3 files changed +20
-0
lines changed
3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change
1
+ .ci
2
+ .github
3
+ build
Original file line number Diff line number Diff line change
1
+ ARG GO_VERSION
2
+ FROM golang:${GO_VERSION}-stretch
3
+
4
+ RUN apt-get update && apt-get install -y zip
5
+
6
+ WORKDIR /go/src/github.com/elastic/fleet-server
7
+
8
+ ENTRYPOINT [ "make", "release" ]
Original file line number Diff line number Diff line change 1
1
SHELL =/bin/bash
2
+ GO_VERSION =$(shell cat '.go-version')
2
3
DEFAULT_VERSION =$(shell awk '/const defaultVersion/{print $$NF}' main.go | tr -d '"')
3
4
TARGET_ARCH_386 =x86
4
5
TARGET_ARCH_amd64 =x86_64
@@ -11,6 +12,7 @@ BUILDMODE_windows_amd64=-buildmode=pie
11
12
BUILDMODE_darwin_amd64=-buildmode =pie
12
13
BUILDMODE_darwin_arm64=-buildmode =pie
13
14
15
+ BUILDER_IMAGE =docker.elastic.co/observability-ci/fleet-server-builder:latest
14
16
15
17
ifdef VERSION_QUALIFIER
16
18
DEFAULT_VERSION: =${DEFAULT_VERSION}-${VERSION_QUALIFIER}
@@ -140,6 +142,13 @@ else
140
142
@cd build/distributions && shasum -a 512 fleet-server-$(VERSION)-$(OS)-$(ARCH).tar.gz > fleet-server-$(VERSION)-$(OS)-$(ARCH).tar.gz.sha512
141
143
endif
142
144
145
+ build-releaser : # # - Build a Docker image to run make package including all build tools
146
+ docker build -t $(BUILDER_IMAGE ) -f Dockerfile.build --build-arg GO_VERSION=$(GO_VERSION ) .
147
+
148
+ .PHONY : docker-release
149
+ docker-release : build-releaser # # - Builds a release for all platforms in a dockerised environment
150
+ docker run --rm -it --volume $(PWD ) :/go/src/github.com/elastic/fleet-server $(BUILDER_IMAGE )
151
+
143
152
.PHONY : release
144
153
release : $(PLATFORM_TARGETS ) # # - Builds a release. Specify exact platform with PLATFORMS env.
145
154
You can’t perform that action at this time.
0 commit comments