summaryrefslogtreecommitdiffstats
path: root/packaging/docker/build.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-09-03 10:23:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-09-03 10:23:38 +0000
commit574098461cd45be12a497afbdac6f93c58978387 (patch)
tree9eb60a5930b7c20d42f7fde1e234cae3968ed3d9 /packaging/docker/build.sh
parentAdding upstream version 1.16.1. (diff)
downloadnetdata-574098461cd45be12a497afbdac6f93c58978387.tar.xz
netdata-574098461cd45be12a497afbdac6f93c58978387.zip
Adding upstream version 1.17.0.upstream/1.17.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'packaging/docker/build.sh')
-rwxr-xr-xpackaging/docker/build.sh72
1 files changed, 0 insertions, 72 deletions
diff --git a/packaging/docker/build.sh b/packaging/docker/build.sh
deleted file mode 100755
index f15c7dad7..000000000
--- a/packaging/docker/build.sh
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/usr/bin/env bash
-#
-#
-# Copyright: SPDX-License-Identifier: GPL-3.0-or-later
-#
-# Author : Pawel Krupa (paulfantom)
-# Author : Pavlos Emm. Katsoulakis (paul@netdata.cloud)
-
-set -e
-
-if [ "${BASH_VERSINFO[0]}" -lt "4" ]; then
- echo "This mechanism currently can only run on BASH version 4 and above"
- exit 1
-fi
-
-VERSION="$1"
-declare -A ARCH_MAP
-ARCH_MAP=(["i386"]="386" ["amd64"]="amd64" ["armhf"]="arm" ["aarch64"]="arm64")
-DEVEL_ARCHS=(amd64)
-ARCHS="${!ARCH_MAP[@]}"
-
-if [ -z ${REPOSITORY} ]; then
- REPOSITORY="${TRAVIS_REPO_SLUG}"
- if [ -z ${REPOSITORY} ]; then
- echo "REPOSITORY not set, build cannot proceed"
- exit 1
- else
- echo "REPOSITORY was not detected, attempted to use TRAVIS_REPO_SLUG setting: ${TRAVIS_REPO_SLUG}"
- fi
-fi
-
-# When development mode is set, build on DEVEL_ARCHS
-if [ ! -z ${DEVEL+x} ]; then
- declare -a ARCHS=(${DEVEL_ARCHS[@]})
-fi
-
-# Ensure there is a version, the most appropriate one
-if [ "${VERSION}" == "" ]; then
- VERSION=$(git tag --points-at)
- if [ "${VERSION}" == "" ]; then
- VERSION="latest"
- fi
-fi
-
-# If we are not in netdata git repo, at the top level directory, fail
-TOP_LEVEL=$(basename "$(git rev-parse --show-toplevel)")
-CWD=$(git rev-parse --show-cdup)
-if [ ! -z $CWD ] || [ ! "${TOP_LEVEL}" == "netdata" ]; then
- echo "Run as ./packaging/docker/$(basename "$0") from top level directory of netdata git repository"
- echo "Docker build process aborted"
- exit 1
-fi
-
-echo "Docker image build in progress.."
-echo "Version : ${VERSION}"
-echo "Repository : ${REPOSITORY}"
-echo "Architectures : ${ARCHS[*]}"
-
-docker run --rm --privileged multiarch/qemu-user-static:register --reset
-
-# Build images using multi-arch Dockerfile.
-for ARCH in ${ARCHS[@]}; do
- TAG="${REPOSITORY}:${VERSION}-${ARCH}"
- echo "Building tag ${TAG}.."
- eval docker build --no-cache \
- --build-arg ARCH="${ARCH}" \
- --tag "${TAG}" \
- --file packaging/docker/Dockerfile ./
- echo "..Done!"
-done
-
-echo "Docker build process completed!"