@cryptotaxi247 / netdata-1 / commits / 334473f88

Don't run packaging checks on Travis builds that build packages. (#9795)

* Revert "Fix Travis CI builds and skip Fedora 31 i386 build/test cycles (#9781)" This reverts commit 07e67c4b62b100ab048070f1a0291fe904ff7513. This will be fixed differently. * Skip package build checks on builds that build packages. We don't need to check that package builds work if we're actually building packages.

Austin S. Hemmelgarn committed Aug 20, 2020 at 09:14 UTC 334473f888733ba96936db9ca779944c8733d77b
2 files changed +58 -61
.travis.yml
+2
@@ -162,6 +162,7 @@ jobs:
162 after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare Fedora 31"
163
164 - name: DEB package test
165 + if: commit_message =~ /^((?!\[Package (amd64|arm64|i386) (DEB|RPM)( .*)?\]).)*$/
166 git:
167 depth: false
168 before_install:
@@ -183,6 +184,7 @@ jobs:
184 - PACKAGE_TYPE="deb" REPO_TOOL="apt-get"
185
186 - name: RPM package test
187 + if: commit_message =~ /^((?!\[Package (amd64|arm64|i386) (DEB|RPM)( .*)?\]).)*$/
188 git:
189 depth: false
190 before_install:
.travis/package_management/create_lxc_for_build.sh
+56 -61
@@ -2,7 +2,7 @@
2 #
3 # This script generates an LXC container and starts it up
4 # Once the script completes successfully, a container has become available for usage
5 -# The container image to be used and the container name to be set, are part of variables
5 +# The container image to be used and the container name to be set, are part of variables
6 # that must be present for the script to work
7 #
8 # Copyright: SPDX-License-Identifier: GPL-3.0-or-later
@@ -17,90 +17,85 @@ source .travis/package_management/functions.sh || (echo "Failed to load packagin
17 TOP_LEVEL=$(basename "$(git rev-parse --show-toplevel)")
18 CWD=$(git rev-parse --show-cdup)
19 if [ -n "$CWD" ] || [ ! "${TOP_LEVEL}" == "netdata" ]; then
20 - echo "Run as .travis/package_management/$(basename "$0") from top level directory of netdata git repository"
21 - echo "LXC Container creation aborted"
22 - exit 1
20 + echo "Run as .travis/package_management/$(basename "$0") from top level directory of netdata git repository"
21 + echo "LXC Container creation aborted"
22 + exit 1
23 fi
24
25 # Check for presence of mandatory environment variables
26 if [ -z "${BUILD_STRING}" ]; then
27 - echo "No Distribution was defined. Make sure BUILD_STRING is set on the environment before running this script"
28 - exit 1
27 + echo "No Distribution was defined. Make sure BUILD_STRING is set on the environment before running this script"
28 + exit 1
29 fi
30
31 if [ -z "${BUILDER_NAME}" ]; then
32 - echo "No builder account and container name defined. Make sure BUILDER_NAME is set on the environment before running this script"
33 - exit 1
32 + echo "No builder account and container name defined. Make sure BUILDER_NAME is set on the environment before running this script"
33 + exit 1
34 fi
35
36 if [ -z "${BUILD_DISTRO}" ]; then
37 - echo "No build distro information defined. Make sure BUILD_DISTRO is set on the environment before running this script"
38 - exit 1
37 + echo "No build distro information defined. Make sure BUILD_DISTRO is set on the environment before running this script"
38 + exit 1
39 fi
40
41 if [ -z "${BUILD_RELEASE}" ]; then
42 - echo "No build release information defined. Make sure BUILD_RELEASE is set on the environment before running this script"
43 - exit 1
42 + echo "No build release information defined. Make sure BUILD_RELEASE is set on the environment before running this script"
43 + exit 1
44 fi
45
46 if [ -z "${PACKAGE_TYPE}" ]; then
47 - echo "No build release information defined. Make sure PACKAGE_TYPE is set on the environment before running this script"
48 - exit 1
47 + echo "No build release information defined. Make sure PACKAGE_TYPE is set on the environment before running this script"
48 + exit 1
49 fi
50
51 # Detect architecture and load extra variables needed
52 detect_arch_from_commit
53
54 -if [ x"${BUILDER_NAME}/${BUILD_STRING}/${BUILD_ARCH}" = x"builder/fedora/31/i386" ]; then
55 - echo " Skipping Fedora 31 i386 build (non-existent upstream) ..."
56 - exit 0
57 -fi
58 -
54 echo "Creating LXC container ${BUILDER_NAME}/${BUILD_STRING}/${BUILD_ARCH}...."
55
56 case "${BUILD_ARCH}" in
62 - "all")
63 - # i386
64 - echo "Creating LXC Container for i386.."
65 - export CONTAINER_NAME="${BUILDER_NAME}-${BUILD_DISTRO}${BUILD_RELEASE}-i386"
66 - export LXC_CONTAINER_ROOT="/var/lib/lxc/${CONTAINER_NAME}/rootfs"
67 - lxc-create -n "${CONTAINER_NAME}" -t "download" -- --dist "${BUILD_DISTRO}" --release "${BUILD_RELEASE}" --arch "i386" --no-validate
68 -
69 - echo "Container(s) ready. Configuring container(s).."
70 - .travis/package_management/configure_${PACKAGE_TYPE}_lxc_environment.py "${CONTAINER_NAME}"
71 -
72 - # amd64
73 - echo "Creating LXC Container for amd64.."
74 - export CONTAINER_NAME="${BUILDER_NAME}-${BUILD_DISTRO}${BUILD_RELEASE}-amd64"
75 - export LXC_CONTAINER_ROOT="/var/lib/lxc/${CONTAINER_NAME}/rootfs"
76 - lxc-create -n "${CONTAINER_NAME}" -t "download" -- --dist "${BUILD_DISTRO}" --release "${BUILD_RELEASE}" --arch "amd64" --no-validate
77 -
78 - echo "Container(s) ready. Configuring container(s).."
79 - .travis/package_management/configure_${PACKAGE_TYPE}_lxc_environment.py "${CONTAINER_NAME}"
80 -
81 - # arm64
82 - echo "Creating LXC Container for arm64.."
83 - export CONTAINER_NAME="${BUILDER_NAME}-${BUILD_DISTRO}${BUILD_RELEASE}-arm64"
84 - export LXC_CONTAINER_ROOT="/var/lib/lxc/${CONTAINER_NAME}/rootfs"
85 - lxc-create -n "${CONTAINER_NAME}" -t "download" -- --dist "${BUILD_DISTRO}" --release "${BUILD_RELEASE}" --arch "arm64" --no-validate
86 -
87 - echo "Container(s) ready. Configuring container(s).."
88 - .travis/package_management/configure_${PACKAGE_TYPE}_lxc_environment.py "${CONTAINER_NAME}"
89 - ;;
90 - "i386" | "amd64" | "arm64")
91 - # amd64 or i386
92 - echo "Creating LXC Container for ${BUILD_ARCH}.."
93 - export CONTAINER_NAME="${BUILDER_NAME}-${BUILD_DISTRO}${BUILD_RELEASE}-${BUILD_ARCH}"
94 - export LXC_CONTAINER_ROOT="/var/lib/lxc/${CONTAINER_NAME}/rootfs"
95 - lxc-create -n "${CONTAINER_NAME}" -t "download" -- --dist "${BUILD_DISTRO}" --release "${BUILD_RELEASE}" --arch "${BUILD_ARCH}" --no-validate
96 -
97 - echo "Container(s) ready. Configuring container(s).."
98 - .travis/package_management/configure_${PACKAGE_TYPE}_lxc_environment.py "${CONTAINER_NAME}"
99 - ;;
100 - *)
101 - echo "Unknown BUILD_ARCH value '${BUILD_ARCH}' given, process failed"
102 - exit 1
103 - ;;
57 +"all")
58 + # i386
59 + echo "Creating LXC Container for i386.."
60 + export CONTAINER_NAME="${BUILDER_NAME}-${BUILD_DISTRO}${BUILD_RELEASE}-i386"
61 + export LXC_CONTAINER_ROOT="/var/lib/lxc/${CONTAINER_NAME}/rootfs"
62 + lxc-create -n "${CONTAINER_NAME}" -t "download" -- --dist "${BUILD_DISTRO}" --release "${BUILD_RELEASE}" --arch "i386" --no-validate
63 +
64 + echo "Container(s) ready. Configuring container(s).."
65 + .travis/package_management/configure_${PACKAGE_TYPE}_lxc_environment.py "${CONTAINER_NAME}"
66 +
67 + # amd64
68 + echo "Creating LXC Container for amd64.."
69 + export CONTAINER_NAME="${BUILDER_NAME}-${BUILD_DISTRO}${BUILD_RELEASE}-amd64"
70 + export LXC_CONTAINER_ROOT="/var/lib/lxc/${CONTAINER_NAME}/rootfs"
71 + lxc-create -n "${CONTAINER_NAME}" -t "download" -- --dist "${BUILD_DISTRO}" --release "${BUILD_RELEASE}" --arch "amd64" --no-validate
72 +
73 + echo "Container(s) ready. Configuring container(s).."
74 + .travis/package_management/configure_${PACKAGE_TYPE}_lxc_environment.py "${CONTAINER_NAME}"
75 +
76 + # arm64
77 + echo "Creating LXC Container for arm64.."
78 + export CONTAINER_NAME="${BUILDER_NAME}-${BUILD_DISTRO}${BUILD_RELEASE}-arm64"
79 + export LXC_CONTAINER_ROOT="/var/lib/lxc/${CONTAINER_NAME}/rootfs"
80 + lxc-create -n "${CONTAINER_NAME}" -t "download" -- --dist "${BUILD_DISTRO}" --release "${BUILD_RELEASE}" --arch "arm64" --no-validate
81 +
82 + echo "Container(s) ready. Configuring container(s).."
83 + .travis/package_management/configure_${PACKAGE_TYPE}_lxc_environment.py "${CONTAINER_NAME}"
84 + ;;
85 +"i386"|"amd64"|"arm64")
86 + # amd64 or i386
87 + echo "Creating LXC Container for ${BUILD_ARCH}.."
88 + export CONTAINER_NAME="${BUILDER_NAME}-${BUILD_DISTRO}${BUILD_RELEASE}-${BUILD_ARCH}"
89 + export LXC_CONTAINER_ROOT="/var/lib/lxc/${CONTAINER_NAME}/rootfs"
90 + lxc-create -n "${CONTAINER_NAME}" -t "download" -- --dist "${BUILD_DISTRO}" --release "${BUILD_RELEASE}" --arch "${BUILD_ARCH}" --no-validate
91 +
92 + echo "Container(s) ready. Configuring container(s).."
93 + .travis/package_management/configure_${PACKAGE_TYPE}_lxc_environment.py "${CONTAINER_NAME}"
94 + ;;
95 +*)
96 + echo "Unknown BUILD_ARCH value '${BUILD_ARCH}' given, process failed"
97 + exit 1
98 + ;;
99 esac
100
101 echo "..LXC creation complete!"