-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #756 from mdelapenya/dockerise-build
feat: support building a release in a dockerised environment
- Loading branch information
Showing
5 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
FLEET_SERVER_VERSION=${1:?"Fleet Server version is needed"} | ||
|
||
PLATFORM_FILES=(darwin-arm64.tar.gz darwin-x86_64.tar.gz linux-arm64.tar.gz linux-x86_64.tar.gz linux-x86.tar.gz windows-x86_64.zip windows-x86.zip) | ||
|
||
#make release | ||
|
||
FILE_PREFIX="build/distributions/fleet-server-${FLEET_SERVER_VERSION}-" | ||
|
||
RED='\033[0;31m' | ||
GREEN='\033[0;32m' | ||
NO_COLOR='\033[0m' | ||
|
||
echo -e "Checking fleet-server-${FLEET_SERVER_VERSION} binaries created after a release:" | ||
|
||
for PLATFORM_FILE in "${PLATFORM_FILES[@]}" | ||
do | ||
file="${FILE_PREFIX}${PLATFORM_FILE}" | ||
if [ ! -f "${file}" ]; then | ||
echo -e "${RED}!! ${PLATFORM_FILE}: The file was not created.${NO_COLOR}" | ||
exit 1 | ||
else | ||
echo -e "- ${PLATFORM_FILE} ${GREEN}OK${NO_COLOR}" | ||
fi | ||
|
||
fileSha512="${file}.sha512" | ||
if [ ! -f "${fileSha512}" ]; then | ||
echo -e "${RED}!! ${fileSha512}: The file was not created.${NO_COLOR}" | ||
exit 1 | ||
else | ||
echo -e "- ${PLATFORM_FILE}.sha512 ${GREEN}OK${NO_COLOR}" | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.ci | ||
.github | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
ARG GO_VERSION | ||
FROM golang:${GO_VERSION}-stretch | ||
|
||
RUN apt-get update && apt-get install -y zip | ||
|
||
WORKDIR /go/src/github.com/elastic/fleet-server | ||
|
||
ENTRYPOINT [ "make", "release" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters