@cryptotaxi247 / netdata-1 / commits / 7d0250e3a

.travis.yml: Fix some yamllint errors (#6526)

* .travis.yml: Fix some yamllint errors Only white space changes, related to comments and indentation * .travis.yml: Use three blank lines between sections instead of two As paulkatsoulakis suggested for better readability * .travis.yml: Fix wrong indentation Fix wrong indentation causing a syntax error * .travis.yml: Fix comment alignment

Konstantinos Natsakis committed Jul 29, 2019 at 09:37 UTC 7d0250e3afc48b16fd01de36ced2b76d64201adc
1 file changed +534 -534
.travis.yml
+534 -534
@@ -2,7 +2,7 @@ dist: xenial
2 sudo: true
3 language: c
4 services:
5 -- docker
5 + - docker
6
7
8
@@ -16,20 +16,20 @@ matrix:
16 # Install dependencies for all, once
17 #
18 install:
19 -- sudo apt-get install -y libcap2-bin zlib1g-dev uuid-dev fakeroot libipmimonitoring-dev libmnl-dev libnetfilter-acct-dev gnupg python-pip
20 -- sudo apt install -y --only-upgrade docker-ce
21 -- sudo pip install git-semver
22 -- docker info
23 -- source tests/installer/slack.sh
24 -- export NOTIF_CHANNEL="automation-beta"
25 -- if [ "${TRAVIS_REPO_SLUG}" = "netdata/netdata" ]; then export NOTIF_CHANNEL="automation"; fi;
26 -- export BUILD_VERSION="$(cat packaging/version | cut -d'-' -f1)"
27 -- export LATEST_RELEASE_VERSION="$(cat packaging/version | cut -d'-' -f1)"
28 -- export LATEST_RELEASE_DATE="$(git log -1 --format=%aD "${LATEST_RELEASE_VERSION}" | cat)"
29 -- if [[ "${TRAVIS_COMMIT_MESSAGE}" = *"[Build latest]"* ]]; then export BUILD_VERSION="$(cat packaging/version | cut -d'-' -f1,2 | sed -e 's/-/./g').latest"; fi;
30 -- export DEPLOY_REPO="netdata" # Default production packaging repository
31 -- if [[ "${TRAVIS_COMMIT_MESSAGE}" = *"[Build latest]"* ]]; then export DEPLOY_REPO="netdata-edge"; fi;
32 -- export PACKAGING_USER="$(echo ${TRAVIS_REPO_SLUG} | cut -d'/' -f1)"
19 + - sudo apt-get install -y libcap2-bin zlib1g-dev uuid-dev fakeroot libipmimonitoring-dev libmnl-dev libnetfilter-acct-dev gnupg python-pip
20 + - sudo apt install -y --only-upgrade docker-ce
21 + - sudo pip install git-semver
22 + - docker info
23 + - source tests/installer/slack.sh
24 + - export NOTIF_CHANNEL="automation-beta"
25 + - if [ "${TRAVIS_REPO_SLUG}" = "netdata/netdata" ]; then export NOTIF_CHANNEL="automation"; fi;
26 + - export BUILD_VERSION="$(cat packaging/version | cut -d'-' -f1)"
27 + - export LATEST_RELEASE_VERSION="$(cat packaging/version | cut -d'-' -f1)"
28 + - export LATEST_RELEASE_DATE="$(git log -1 --format=%aD "${LATEST_RELEASE_VERSION}" | cat)"
29 + - if [[ "${TRAVIS_COMMIT_MESSAGE}" = *"[Build latest]"* ]]; then export BUILD_VERSION="$(cat packaging/version | cut -d'-' -f1,2 | sed -e 's/-/./g').latest"; fi;
30 + - export DEPLOY_REPO="netdata" # Default production packaging repository
31 + - if [[ "${TRAVIS_COMMIT_MESSAGE}" = *"[Build latest]"* ]]; then export DEPLOY_REPO="netdata-edge"; fi;
32 + - export PACKAGING_USER="$(echo ${TRAVIS_REPO_SLUG} | cut -d'/' -f1)"
33
34
35
@@ -43,148 +43,148 @@ notifications:
43 # Define the stage sequence and conditionals
44 #
45 stages:
46 -# Mandatory runs, we always want these executed
47 -- name: Code quality, linting, syntax, code style
48 -- name: Build process
49 -- name: Artifacts validation
50 -- name: Artifacts validation on bare OS, stable to current lifecycle checks
51 - if: branch = master AND (type = pull_request OR type = cron)
52 -
53 - # Nightly operations
54 -- name: Nightly operations
55 - if: branch = master AND type = cron
56 -- name: Nightly release
57 - if: branch = master AND type = cron
58 -
59 - # Scheduled releases
60 -- name: Packaging for release
61 - if: branch = master AND type != pull_request AND type != cron
62 -
63 -- name: Publish for release
64 - if: branch = master AND type != pull_request AND type != cron AND commit_message =~ /(\[netdata release candidate\]|\[netdata major release\]|\[netdata minor release\]|\[netdata patch release\])/
65 -
66 - # Build DEB packages under special conditions
67 - # Ubuntu
68 -- name: "Package ubuntu/disco"
69 - if: type != cron AND type != pull_request AND branch = master AND commit_message =~ /(\[Package arm64 DEB Ubuntu\]|\[Package arm64 DEB\]|\[Package i386 DEB Ubuntu\]|\[Package i386 DEB\]|\[Package amd64 DEB Ubuntu\]|\[Package amd64 DEB\])/
70 -- name: "Package ubuntu/cosmic"
71 - if: type != cron AND type != pull_request AND branch = master AND commit_message =~ /(\[Package arm64 DEB Ubuntu\]|\[Package arm64 DEB\]|\[Package i386 DEB Ubuntu\]|\[Package i386 DEB\]|\[Package amd64 DEB Ubuntu\]|\[Package amd64 DEB\])/
72 -- name: "Package ubuntu/bionic"
73 - if: type != cron AND type != pull_request AND branch = master AND commit_message =~ /(\[Package arm64 DEB Ubuntu\]|\[Package arm64 DEB\]|\[Package i386 DEB Ubuntu\]|\[Package i386 DEB\]|\[Package amd64 DEB Ubuntu\]|\[Package amd64 DEB\])/
74 -
75 - # Debian
76 -- name: "Package debian/buster"
77 - if: type != cron AND type != pull_request AND branch = master AND commit_message =~ /(\[Package arm64 DEB Debian\]|\[Package arm64 DEB\]|\[Package i386 DEB Debian\]|\[Package i386 DEB\]|\[Package amd64 DEB Debian\]|\[Package amd64 DEB\])/
78 -- name: "Package debian/stretch"
79 - if: type != cron AND type != pull_request AND branch = master AND commit_message =~ /(\[Package arm64 DEB Debian\]|\[Package arm64 DEB\]|\[Package i386 DEB Debian\]|\[Package i386 DEB\]|\[Package amd64 DEB Debian\]|\[Package amd64 DEB\])/
80 -- name: "Package debian/jessie"
81 - if: type != cron AND type != pull_request AND branch = master AND commit_message =~ /(\[Package arm64 DEB Debian\]|\[Package arm64 DEB\]|\[Package i386 DEB Debian\]|\[Package i386 DEB\]|\[Package amd64 DEB Debian\]|\[Package amd64 DEB\])/
82 -
83 - # Build RPM packages under special conditions
84 - # Enterprise linux (Covers CentOS, Redhat, Amazon linux)
85 -- name: "Package Enterprise Linux 7"
86 - if: type != cron AND type != pull_request AND branch = master AND commit_message =~ /(\[Package arm64 RPM Enterprise Linux\]|\[Package arm64 RPM\]|\[Package i386 RPM Enterprise Linux\]|\[Package i386 RPM\]|\[Package amd64 RPM Enterprise Linux\]|\[Package amd64 RPM\])/
87 -- name: "Package Enterprise linux 6"
88 - if: type != cron AND type != pull_request AND branch = master AND commit_message =~ /(\[Package i386 RPM Enterprise Linux\]|\[Package i386 RPM\]|\[Package amd64 RPM Enterprise Linux\]|\[Package amd64 RPM\])/
89 -
90 - # Fedora
91 -- name: "Package Fedora 30"
92 - if: type != cron AND type != pull_request AND branch = master AND commit_message =~ /(\[Package arm64 RPM Fedora\]|\[Package arm64 RPM\]|\[Package amd64 RPM Fedora\]|\[Package amd64 RPM\])/
93 -- name: "Package Fedora 29"
94 - if: type != cron AND type != pull_request AND branch = master AND commit_message =~ /(\[Package arm64 RPM Fedora\]|\[Package arm64 RPM\]|\[Package amd64 RPM Fedora\]|\[Package amd64 RPM\])/
95 -- name: "Package Fedora 28"
96 - if: type != cron AND type != pull_request AND branch = master AND commit_message =~ /(\[Package arm64 RPM Fedora\]|\[Package arm64 RPM\]|\[Package amd64 RPM Fedora\]|\[Package amd64 RPM\])/
97 -
98 - # OpenSuSE
99 -- name: "Package OpenSuSE 15.1"
100 - if: type != cron AND type != pull_request AND branch = master AND commit_message =~ /(\[Package arm64 RPM openSuSE\]|\[Package arm64 RPM\]|\[Package amd64 RPM openSuSE\]|\[Package amd64 RPM\])/
101 -- name: "Package OpenSuSE 15.0"
102 - if: type != cron AND type != pull_request AND branch = master AND commit_message =~ /(\[Package arm64 RPM openSuSE\]|\[Package arm64 RPM\]|\[Package amd64 RPM openSuSE\]|\[Package amd64 RPM\])/
103 -
104 -
105 -
106 -# DEB and RPM template flows
107 -- stage: &_RPM_TEMPLATE
108 - name: "Build & Publish RPM package"
109 - before_install:
110 - - sudo apt-get install -y wget lxc lxc-templates
111 - - source tests/installer/slack.sh
112 - before_script:
113 - - post_message "TRAVIS_MESSAGE" "Starting package preparation and publishing for ${BUILD_STRING}.${BUILD_ARCH}" "${NOTIF_CHANNEL}"
114 - - export PACKAGES_DIRECTORY="$(mktemp -d -t netdata-packaging-contents-dir-XXXXXX)" && echo "Created packaging directory ${PACKAGES_DIRECTORY}"
115 - script:
116 - - echo "GIT Branch:" && git branch
117 - - echo "Last commit:" && git log -1
118 - - echo "GIT Describe:" && git describe
119 - - echo "packaging/version:" && cat packaging/version
120 - - echo "Creating LXC environment for the build" && sudo -E .travis/package_management/create_lxc_for_build.sh
121 - - echo "Building package in container" && sudo -E .travis/package_management/build_package_in_container.sh
122 - - sudo chmod -R 755 "/var/lib/lxc"
123 - - echo "Preparing RPM packaging contents for upload" && sudo -E .travis/package_management/prepare_packages.sh
124 - git:
125 - depth: false
126 - after_failure: post_message "TRAVIS_MESSAGE" "Failed to build RPM for ${BUILD_STRING}.${BUILD_ARCH}"
127 - before_deploy:
128 - - .travis/package_management/yank_stale_rpm.sh "${PACKAGES_DIRECTORY}" "${BUILD_STRING}" || echo "No stale RPM found"
129 - deploy:
130 - - provider: packagecloud
131 - repository: "${DEPLOY_REPO}"
132 - username: "${PACKAGING_USER}"
133 - token: "${PKG_CLOUD_TOKEN}"
134 - dist: "${BUILD_STRING}"
135 - local_dir: "${PACKAGES_DIRECTORY}"
136 - skip_cleanup: true
137 - on:
138 - # Only deploy on ${USER}/netdata, master branch, when packages directory is created
139 - repo: ${TRAVIS_REPO_SLUG}
140 - branch: "master"
141 - condition: -d "${PACKAGES_DIRECTORY}"
142 - after_deploy:
143 - - if [ -n "${BUILDER_NAME}" ]; then rm -rf /home/${BUILDER_NAME}/* && echo "Cleared /home/${BUILDER_NAME} directory" || echo "Failed to clean /home/${BUILDER_NAME} directory"; fi;
144 - - if [ -d "${PACKAGES_DIRECTORY}" ]; then rm -rf "${PACKAGES_DIRECTORY}"; fi;
145 -
146 -
147 -
148 - # TODO: This section is stale, will be aligned with the RPM implementation when we get to DEB packaging
149 -- stage: &_DEB_TEMPLATE
150 - name: "Build & Publish DEB package"
151 - before_install:
152 - - sudo apt-get install -y wget lxc lxc-templates dh-make git-buildpackage build-essential libdistro-info-perl
153 - - source tests/installer/slack.sh
154 - before_script:
155 - - post_message "TRAVIS_MESSAGE" "Starting package preparation and publishing for ${BUILD_STRING}.${BUILD_ARCH}" "${NOTIF_CHANNEL}"
156 - - export PACKAGES_DIRECTORY="$(mktemp -d -t netdata-packaging-contents-dir-XXXXXX)" && echo "Created packaging directory ${PACKAGES_DIRECTORY}"
157 - script:
158 - - echo "GIT Branch:" && git branch
159 - - echo "Last commit:" && git log -1
160 - - echo "GIT Describe:" && git describe
161 - - echo "packaging/version:" && cat packaging/version
162 - - echo "Creating LXC environment for the build" && sudo -E .travis/package_management/create_lxc_for_build.sh
163 - - echo "Building package in container" && sudo -E .travis/package_management/build_package_in_container.sh
164 - - sudo chown -R root:travis "/var/lib/lxc"
165 - - sudo chmod -R 750 "/var/lib/lxc"
166 - - echo "Preparing DEB packaging contents for upload" && sudo -E .travis/package_management/prepare_packages.sh
167 - git:
168 - depth: false
169 - after_failure: post_message "TRAVIS_MESSAGE" "Failed to build DEB for ${BUILD_STRING}.${BUILD_ARCH}"
170 - before_deploy:
171 - - .travis/package_management/yank_stale_rpm.sh "${PACKAGES_DIRECTORY}" "${BUILD_STRING}" || echo "No stale DEB found"
172 - deploy:
173 - - provider: packagecloud
174 - repository: "${DEPLOY_REPO}"
175 - username: "${PACKAGING_USER}"
176 - token: "${PKG_CLOUD_TOKEN}"
177 - dist: "${BUILD_STRING}"
178 - local_dir: "${PACKAGES_DIRECTORY}"
179 - skip_cleanup: true
180 - on:
181 - # Only deploy on ${USER}/netdata, master branch, when build-area directory is created
182 - repo: ${TRAVIS_REPO_SLUG}
183 - branch: "master"
184 - condition: -d "${PACKAGES_DIRECTORY}"
185 - after_deploy:
186 - - if [ -n "${BUILDER_NAME}" ]; then rm -rf /home/${BUILDER_NAME}/* && echo "Cleared /home/${BUILDER_NAME} directory" || echo "Failed to clean /home/${BUILDER_NAME} directory"; fi;
187 - - if [ -d "${PACKAGES_DIRECTORY}" ]; then rm -rf "${PACKAGES_DIRECTORY}"; fi;
46 + # Mandatory runs, we always want these executed
47 + - name: Code quality, linting, syntax, code style
48 + - name: Build process
49 + - name: Artifacts validation
50 + - name: Artifacts validation on bare OS, stable to current lifecycle checks
51 + if: branch = master AND (type = pull_request OR type = cron)
52 +
53 + # Nightly operations
54 + - name: Nightly operations
55 + if: branch = master AND type = cron
56 + - name: Nightly release
57 + if: branch = master AND type = cron
58 +
59 + # Scheduled releases
60 + - name: Packaging for release
61 + if: branch = master AND type != pull_request AND type != cron
62 +
63 + - name: Publish for release
64 + if: branch = master AND type != pull_request AND type != cron AND commit_message =~ /(\[netdata release candidate\]|\[netdata major release\]|\[netdata minor release\]|\[netdata patch release\])/
65 +
66 + # Build DEB packages under special conditions
67 + # Ubuntu
68 + - name: "Package ubuntu/disco"
69 + if: type != cron AND type != pull_request AND branch = master AND commit_message =~ /(\[Package arm64 DEB Ubuntu\]|\[Package arm64 DEB\]|\[Package i386 DEB Ubuntu\]|\[Package i386 DEB\]|\[Package amd64 DEB Ubuntu\]|\[Package amd64 DEB\])/
70 + - name: "Package ubuntu/cosmic"
71 + if: type != cron AND type != pull_request AND branch = master AND commit_message =~ /(\[Package arm64 DEB Ubuntu\]|\[Package arm64 DEB\]|\[Package i386 DEB Ubuntu\]|\[Package i386 DEB\]|\[Package amd64 DEB Ubuntu\]|\[Package amd64 DEB\])/
72 + - name: "Package ubuntu/bionic"
73 + if: type != cron AND type != pull_request AND branch = master AND commit_message =~ /(\[Package arm64 DEB Ubuntu\]|\[Package arm64 DEB\]|\[Package i386 DEB Ubuntu\]|\[Package i386 DEB\]|\[Package amd64 DEB Ubuntu\]|\[Package amd64 DEB\])/
74 +
75 + # Debian
76 + - name: "Package debian/buster"
77 + if: type != cron AND type != pull_request AND branch = master AND commit_message =~ /(\[Package arm64 DEB Debian\]|\[Package arm64 DEB\]|\[Package i386 DEB Debian\]|\[Package i386 DEB\]|\[Package amd64 DEB Debian\]|\[Package amd64 DEB\])/
78 + - name: "Package debian/stretch"
79 + if: type != cron AND type != pull_request AND branch = master AND commit_message =~ /(\[Package arm64 DEB Debian\]|\[Package arm64 DEB\]|\[Package i386 DEB Debian\]|\[Package i386 DEB\]|\[Package amd64 DEB Debian\]|\[Package amd64 DEB\])/
80 + - name: "Package debian/jessie"
81 + if: type != cron AND type != pull_request AND branch = master AND commit_message =~ /(\[Package arm64 DEB Debian\]|\[Package arm64 DEB\]|\[Package i386 DEB Debian\]|\[Package i386 DEB\]|\[Package amd64 DEB Debian\]|\[Package amd64 DEB\])/
82 +
83 + # Build RPM packages under special conditions
84 + # Enterprise linux (Covers CentOS, Redhat, Amazon linux)
85 + - name: "Package Enterprise Linux 7"
86 + if: type != cron AND type != pull_request AND branch = master AND commit_message =~ /(\[Package arm64 RPM Enterprise Linux\]|\[Package arm64 RPM\]|\[Package i386 RPM Enterprise Linux\]|\[Package i386 RPM\]|\[Package amd64 RPM Enterprise Linux\]|\[Package amd64 RPM\])/
87 + - name: "Package Enterprise linux 6"
88 + if: type != cron AND type != pull_request AND branch = master AND commit_message =~ /(\[Package i386 RPM Enterprise Linux\]|\[Package i386 RPM\]|\[Package amd64 RPM Enterprise Linux\]|\[Package amd64 RPM\])/
89 +
90 + # Fedora
91 + - name: "Package Fedora 30"
92 + if: type != cron AND type != pull_request AND branch = master AND commit_message =~ /(\[Package arm64 RPM Fedora\]|\[Package arm64 RPM\]|\[Package amd64 RPM Fedora\]|\[Package amd64 RPM\])/
93 + - name: "Package Fedora 29"
94 + if: type != cron AND type != pull_request AND branch = master AND commit_message =~ /(\[Package arm64 RPM Fedora\]|\[Package arm64 RPM\]|\[Package amd64 RPM Fedora\]|\[Package amd64 RPM\])/
95 + - name: "Package Fedora 28"
96 + if: type != cron AND type != pull_request AND branch = master AND commit_message =~ /(\[Package arm64 RPM Fedora\]|\[Package arm64 RPM\]|\[Package amd64 RPM Fedora\]|\[Package amd64 RPM\])/
97 +
98 + # OpenSuSE
99 + - name: "Package OpenSuSE 15.1"
100 + if: type != cron AND type != pull_request AND branch = master AND commit_message =~ /(\[Package arm64 RPM openSuSE\]|\[Package arm64 RPM\]|\[Package amd64 RPM openSuSE\]|\[Package amd64 RPM\])/
101 + - name: "Package OpenSuSE 15.0"
102 + if: type != cron AND type != pull_request AND branch = master AND commit_message =~ /(\[Package arm64 RPM openSuSE\]|\[Package arm64 RPM\]|\[Package amd64 RPM openSuSE\]|\[Package amd64 RPM\])/
103 +
104 +
105 +
106 + # DEB and RPM template flows
107 + - stage: &_RPM_TEMPLATE
108 + name: "Build & Publish RPM package"
109 + before_install:
110 + - sudo apt-get install -y wget lxc lxc-templates
111 + - source tests/installer/slack.sh
112 + before_script:
113 + - post_message "TRAVIS_MESSAGE" "Starting package preparation and publishing for ${BUILD_STRING}.${BUILD_ARCH}" "${NOTIF_CHANNEL}"
114 + - export PACKAGES_DIRECTORY="$(mktemp -d -t netdata-packaging-contents-dir-XXXXXX)" && echo "Created packaging directory ${PACKAGES_DIRECTORY}"
115 + script:
116 + - echo "GIT Branch:" && git branch
117 + - echo "Last commit:" && git log -1
118 + - echo "GIT Describe:" && git describe
119 + - echo "packaging/version:" && cat packaging/version
120 + - echo "Creating LXC environment for the build" && sudo -E .travis/package_management/create_lxc_for_build.sh
121 + - echo "Building package in container" && sudo -E .travis/package_management/build_package_in_container.sh
122 + - sudo chmod -R 755 "/var/lib/lxc"
123 + - echo "Preparing RPM packaging contents for upload" && sudo -E .travis/package_management/prepare_packages.sh
124 + git:
125 + depth: false
126 + after_failure: post_message "TRAVIS_MESSAGE" "Failed to build RPM for ${BUILD_STRING}.${BUILD_ARCH}"
127 + before_deploy:
128 + - .travis/package_management/yank_stale_rpm.sh "${PACKAGES_DIRECTORY}" "${BUILD_STRING}" || echo "No stale RPM found"
129 + deploy:
130 + - provider: packagecloud
131 + repository: "${DEPLOY_REPO}"
132 + username: "${PACKAGING_USER}"
133 + token: "${PKG_CLOUD_TOKEN}"
134 + dist: "${BUILD_STRING}"
135 + local_dir: "${PACKAGES_DIRECTORY}"
136 + skip_cleanup: true
137 + on:
138 + # Only deploy on ${USER}/netdata, master branch, when packages directory is created
139 + repo: ${TRAVIS_REPO_SLUG}
140 + branch: "master"
141 + condition: -d "${PACKAGES_DIRECTORY}"
142 + after_deploy:
143 + - if [ -n "${BUILDER_NAME}" ]; then rm -rf /home/${BUILDER_NAME}/* && echo "Cleared /home/${BUILDER_NAME} directory" || echo "Failed to clean /home/${BUILDER_NAME} directory"; fi;
144 + - if [ -d "${PACKAGES_DIRECTORY}" ]; then rm -rf "${PACKAGES_DIRECTORY}"; fi;
145 +
146 +
147 +
148 + # TODO: This section is stale, will be aligned with the RPM implementation when we get to DEB packaging
149 + - stage: &_DEB_TEMPLATE
150 + name: "Build & Publish DEB package"
151 + before_install:
152 + - sudo apt-get install -y wget lxc lxc-templates dh-make git-buildpackage build-essential libdistro-info-perl
153 + - source tests/installer/slack.sh
154 + before_script:
155 + - post_message "TRAVIS_MESSAGE" "Starting package preparation and publishing for ${BUILD_STRING}.${BUILD_ARCH}" "${NOTIF_CHANNEL}"
156 + - export PACKAGES_DIRECTORY="$(mktemp -d -t netdata-packaging-contents-dir-XXXXXX)" && echo "Created packaging directory ${PACKAGES_DIRECTORY}"
157 + script:
158 + - echo "GIT Branch:" && git branch
159 + - echo "Last commit:" && git log -1
160 + - echo "GIT Describe:" && git describe
161 + - echo "packaging/version:" && cat packaging/version
162 + - echo "Creating LXC environment for the build" && sudo -E .travis/package_management/create_lxc_for_build.sh
163 + - echo "Building package in container" && sudo -E .travis/package_management/build_package_in_container.sh
164 + - sudo chown -R root:travis "/var/lib/lxc"
165 + - sudo chmod -R 750 "/var/lib/lxc"
166 + - echo "Preparing DEB packaging contents for upload" && sudo -E .travis/package_management/prepare_packages.sh
167 + git:
168 + depth: false
169 + after_failure: post_message "TRAVIS_MESSAGE" "Failed to build DEB for ${BUILD_STRING}.${BUILD_ARCH}"
170 + before_deploy:
171 + - .travis/package_management/yank_stale_rpm.sh "${PACKAGES_DIRECTORY}" "${BUILD_STRING}" || echo "No stale DEB found"
172 + deploy:
173 + - provider: packagecloud
174 + repository: "${DEPLOY_REPO}"
175 + username: "${PACKAGING_USER}"
176 + token: "${PKG_CLOUD_TOKEN}"
177 + dist: "${BUILD_STRING}"
178 + local_dir: "${PACKAGES_DIRECTORY}"
179 + skip_cleanup: true
180 + on:
181 + # Only deploy on ${USER}/netdata, master branch, when build-area directory is created
182 + repo: ${TRAVIS_REPO_SLUG}
183 + branch: "master"
184 + condition: -d "${PACKAGES_DIRECTORY}"
185 + after_deploy:
186 + - if [ -n "${BUILDER_NAME}" ]; then rm -rf /home/${BUILDER_NAME}/* && echo "Cleared /home/${BUILDER_NAME} directory" || echo "Failed to clean /home/${BUILDER_NAME} directory"; fi;
187 + - if [ -d "${PACKAGES_DIRECTORY}" ]; then rm -rf "${PACKAGES_DIRECTORY}"; fi;
188
189
190
@@ -192,447 +192,447 @@ stages:
192 #
193 jobs:
194 include:
195 - # Do code quality, syntax checking and other pre-build activities
196 - - stage: Code quality, linting, syntax, code style
195 + # Do code quality, syntax checking and other pre-build activities
196 + - stage: Code quality, linting, syntax, code style
197
198 - name: Run shellchecking on BASH
199 - script: shellcheck --format=gcc $(find . -name '*.sh.in' -not -iwholename '*.git*')
198 + name: Run shellchecking on BASH
199 + script: shellcheck --format=gcc $(find . -name '*.sh.in' -not -iwholename '*.git*')
200
201 - # This falls under same stage defined earlier
202 - - name: Run checksum checks on kickstart files
203 - script: ./tests/installer/checksums.sh
204 - env: LOCAL_ONLY="true"
201 + # This falls under same stage defined earlier
202 + - name: Run checksum checks on kickstart files
203 + script: ./tests/installer/checksums.sh
204 + env: LOCAL_ONLY="true"
205
206 - # This falls under same stage defined earlier
207 - - name: Web Dashboard pre-generated file consistency checks (dashboard.js)
208 - script: cp web/gui/dashboard.js /tmp/dashboard.js && ./build/build.sh && diff /tmp/dashboard.js web/gui/dashboard.js
206 + # This falls under same stage defined earlier
207 + - name: Web Dashboard pre-generated file consistency checks (dashboard.js)
208 + script: cp web/gui/dashboard.js /tmp/dashboard.js && ./build/build.sh && diff /tmp/dashboard.js web/gui/dashboard.js
209
210
211
212 - # Ensure netdata code builds successfully
213 - - stage: Build process
212 + # Ensure netdata code builds successfully
213 + - stage: Build process
214
215 - name: Standard netdata build
216 - script: fakeroot ./netdata-installer.sh --install $HOME --dont-wait --dont-start-it --enable-plugin-nfacct --enable-plugin-freeipmi --disable-lto
217 - env: CFLAGS='-O1 -DNETDATA_INTERNAL_CHECKS=1 -DNETDATA_VERIFY_LOCKS=1'
218 - after_failure: post_message "TRAVIS_MESSAGE" "<!here> standard netdata build is failing (Still dont know which one, will improve soon)"
215 + name: Standard netdata build
216 + script: fakeroot ./netdata-installer.sh --install $HOME --dont-wait --dont-start-it --enable-plugin-nfacct --enable-plugin-freeipmi --disable-lto
217 + env: CFLAGS='-O1 -DNETDATA_INTERNAL_CHECKS=1 -DNETDATA_VERIFY_LOCKS=1'
218 + after_failure: post_message "TRAVIS_MESSAGE" "<!here> standard netdata build is failing (Still dont know which one, will improve soon)"
219
220 - - name: Docker container build process (alpine installation)
221 - script: packaging/docker/build.sh
222 - env: DEVEL="true"
223 - after_failure: post_message "TRAVIS_MESSAGE" "Docker build process failed"
220 + - name: Docker container build process (alpine installation)
221 + script: packaging/docker/build.sh
222 + env: DEVEL="true"
223 + after_failure: post_message "TRAVIS_MESSAGE" "Docker build process failed"
224
225 - - name: Run 'make dist' validation
226 - before_script: mkdir /tmp/netdata-makedist-test
227 - script:
228 - - echo "GIT Branch:" && git branch
229 - - echo "Last commit:" && git log -1
230 - - echo "GIT Describe:" && git describe
231 - - echo "packaging/version:" && cat packaging/version
232 - - docker run -it -v "${PWD}:/netdata:rw" -v "/tmp/netdata-makedist-test:/netdata_install:rw" -w /netdata "netdata/os-test:ubuntu1804" make clean || echo "Nothing to clean"
233 - - docker run -it -v "${PWD}:/netdata:rw" -v "/tmp/netdata-makedist-test:/netdata_install:rw" -w /netdata "netdata/os-test:ubuntu1804" make distclean || echo "Nothing to distclean"
234 - - docker run -it -v "${PWD}:/netdata:rw" -v "/tmp/netdata-makedist-test:/netdata_install:rw" -w /netdata "netdata/os-test:ubuntu1804" /bin/bash -c "autoreconf -ivf && ./configure --prefix=/netdata_install/usr --sysconfdir=/netdata_install/etc --localstatedir=/netdata_install/var --with-zlib --with-math --with-user=netdata CFLAGS=-O2"
235 - - docker run -it -v "${PWD}:/netdata:rw" -v "/tmp/netdata-makedist-test:/netdata_install:rw" -w /netdata "netdata/os-test:ubuntu1804" make dist
236 - - docker run -it -v "${PWD}:/netdata:rw" -v "/tmp/netdata-makedist-test:/netdata_install:rw" -w /netdata "netdata/os-test:ubuntu1804" ls -ltr ./netdata-$(git describe).tar.gz || ls -ltr ./netdata-$(cat packaging/version | tr -d '\n').tar.gz
237 - - .travis/run_install_with_dist_file.sh
238 - - docker run -it -v "${PWD}:/netdata:rw" -v "/tmp/netdata-makedist-test:/netdata_install:rw" -w /netdata "netdata/os-test:ubuntu1804" make distclean
239 - git:
240 - depth: false
241 - after_script: rm -rf /tmp/netdata-makedist-test
242 - after_failure: post_message "TRAVIS_MESSAGE" "'make dist' failed"
225 + - name: Run 'make dist' validation
226 + before_script: mkdir /tmp/netdata-makedist-test
227 + script:
228 + - echo "GIT Branch:" && git branch
229 + - echo "Last commit:" && git log -1
230 + - echo "GIT Describe:" && git describe
231 + - echo "packaging/version:" && cat packaging/version
232 + - docker run -it -v "${PWD}:/netdata:rw" -v "/tmp/netdata-makedist-test:/netdata_install:rw" -w /netdata "netdata/os-test:ubuntu1804" make clean || echo "Nothing to clean"
233 + - docker run -it -v "${PWD}:/netdata:rw" -v "/tmp/netdata-makedist-test:/netdata_install:rw" -w /netdata "netdata/os-test:ubuntu1804" make distclean || echo "Nothing to distclean"
234 + - docker run -it -v "${PWD}:/netdata:rw" -v "/tmp/netdata-makedist-test:/netdata_install:rw" -w /netdata "netdata/os-test:ubuntu1804" /bin/bash -c "autoreconf -ivf && ./configure --prefix=/netdata_install/usr --sysconfdir=/netdata_install/etc --localstatedir=/netdata_install/var --with-zlib --with-math --with-user=netdata CFLAGS=-O2"
235 + - docker run -it -v "${PWD}:/netdata:rw" -v "/tmp/netdata-makedist-test:/netdata_install:rw" -w /netdata "netdata/os-test:ubuntu1804" make dist
236 + - docker run -it -v "${PWD}:/netdata:rw" -v "/tmp/netdata-makedist-test:/netdata_install:rw" -w /netdata "netdata/os-test:ubuntu1804" ls -ltr ./netdata-$(git describe).tar.gz || ls -ltr ./netdata-$(cat packaging/version | tr -d '\n').tar.gz
237 + - .travis/run_install_with_dist_file.sh
238 + - docker run -it -v "${PWD}:/netdata:rw" -v "/tmp/netdata-makedist-test:/netdata_install:rw" -w /netdata "netdata/os-test:ubuntu1804" make distclean
239 + git:
240 + depth: false
241 + after_script: rm -rf /tmp/netdata-makedist-test
242 + after_failure: post_message "TRAVIS_MESSAGE" "'make dist' failed"
243
244
245
246 - - stage: Artifacts validation
246 + - stage: Artifacts validation
247
248 - name: Unit Testing
249 - script:
250 - - fakeroot ./netdata-installer.sh --install $HOME --dont-wait --dont-start-it --enable-plugin-nfacct --enable-plugin-freeipmi --disable-lto
251 - - $HOME/netdata/usr/sbin/netdata -W unittest
252 - env: CFLAGS='-O1 -DNETDATA_INTERNAL_CHECKS=1 -DNETDATA_VERIFY_LOCKS=1'
253 - after_failure: post_message "TRAVIS_MESSAGE" "Unit testing failed"
254 -
255 - - name: Build/install on ubuntu 14.04 (not containerized)
256 - script: fakeroot ./netdata-installer.sh --dont-wait --dont-start-it --install $HOME
257 - after_failure: post_message "TRAVIS_MESSAGE" "Build/Install failed on ubuntu 14.04"
248 + name: Unit Testing
249 + script:
250 + - fakeroot ./netdata-installer.sh --install $HOME --dont-wait --dont-start-it --enable-plugin-nfacct --enable-plugin-freeipmi --disable-lto
251 + - $HOME/netdata/usr/sbin/netdata -W unittest
252 + env: CFLAGS='-O1 -DNETDATA_INTERNAL_CHECKS=1 -DNETDATA_VERIFY_LOCKS=1'
253 + after_failure: post_message "TRAVIS_MESSAGE" "Unit testing failed"
254 +
255 + - name: Build/install on ubuntu 14.04 (not containerized)
256 + script: fakeroot ./netdata-installer.sh --dont-wait --dont-start-it --install $HOME
257 + after_failure: post_message "TRAVIS_MESSAGE" "Build/Install failed on ubuntu 14.04"
258
259 - - name: Build/Install for ubuntu 18.04 (not containerized)
260 - script: fakeroot ./netdata-installer.sh --dont-wait --dont-start-it --install $HOME
261 - after_failure: post_message "TRAVIS_MESSAGE" "Build/Install failed on ubuntu 18.04"
259 + - name: Build/Install for ubuntu 18.04 (not containerized)
260 + script: fakeroot ./netdata-installer.sh --dont-wait --dont-start-it --install $HOME
261 + after_failure: post_message "TRAVIS_MESSAGE" "Build/Install failed on ubuntu 18.04"
262
263 - - name: Run netdata lifecycle, on ubuntu 18.04 (Containerized)
264 - script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "netdata/os-test:ubuntu1804" bats --tap tests/lifecycle.bats
265 - after_failure: post_message "TRAVIS_MESSAGE" "Netdata lifecycle test script failed on ubuntu 18.04"
263 + - name: Run netdata lifecycle, on ubuntu 18.04 (Containerized)
264 + script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "netdata/os-test:ubuntu1804" bats --tap tests/lifecycle.bats
265 + after_failure: post_message "TRAVIS_MESSAGE" "Netdata lifecycle test script failed on ubuntu 18.04"
266
267 - - name: Run netdata lifecycle from stable to current, on CentOS 7 (Containerized)
268 - script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "netdata/os-test:centos7" tests/updater_checks.sh
269 - after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on CentOS 7"
270 -
271 - - name: Build/install for CentOS 6 (Containerized)
272 - script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "netdata/os-test:centos6" ./netdata-installer.sh --dont-wait --dont-start-it --install /tmp
273 - after_failure: post_message "TRAVIS_MESSAGE" "Build/Install failed on CentOS 6"
267 + - name: Run netdata lifecycle from stable to current, on CentOS 7 (Containerized)
268 + script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "netdata/os-test:centos7" tests/updater_checks.sh
269 + after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on CentOS 7"
270 +
271 + - name: Build/install for CentOS 6 (Containerized)
272 + script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "netdata/os-test:centos6" ./netdata-installer.sh --dont-wait --dont-start-it --install /tmp
273 + after_failure: post_message "TRAVIS_MESSAGE" "Build/Install failed on CentOS 6"
274
275 - - name: Build/install for CentOS 7 (Containerized)
276 - script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "netdata/os-test:centos7" ./netdata-installer.sh --dont-wait --dont-start-it --install /tmp
277 - after_failure: post_message "TRAVIS_MESSAGE" "Build/Install failed on CentOS 7"
275 + - name: Build/install for CentOS 7 (Containerized)
276 + script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "netdata/os-test:centos7" ./netdata-installer.sh --dont-wait --dont-start-it --install /tmp
277 + after_failure: post_message "TRAVIS_MESSAGE" "Build/Install failed on CentOS 7"
278
279
280
281 - - stage: "Artifacts validation on bare OS, stable to current lifecycle checks"
282 -
283 - # Ubuntu runs
284 - name: Run netdata lifecycle on Ubuntu 16.04 (xenial)
285 - script: sudo -E tests/updater_checks.sh
286 - after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare Ubuntu 16.04"
281 + - stage: "Artifacts validation on bare OS, stable to current lifecycle checks"
282 +
283 + # Ubuntu runs
284 + name: Run netdata lifecycle on Ubuntu 16.04 (xenial)
285 + script: sudo -E tests/updater_checks.sh
286 + after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare Ubuntu 16.04"
287
288 - - name: Run netdata lifecycle, on Ubuntu 19.04 (Containerized)
289 - script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "ubuntu:19.04" tests/updater_checks.sh
290 - after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare Ubuntu 19.04"
288 + - name: Run netdata lifecycle, on Ubuntu 19.04 (Containerized)
289 + script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "ubuntu:19.04" tests/updater_checks.sh
290 + after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare Ubuntu 19.04"
291
292 - # Centos runs
293 - - name: Run netdata lifecycle on CentOS 7 (Containerized)
294 - script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "centos:7" tests/updater_checks.sh
295 - after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare CentOS 7"
292 + # Centos runs
293 + - name: Run netdata lifecycle on CentOS 7 (Containerized)
294 + script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "centos:7" tests/updater_checks.sh
295 + after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare CentOS 7"
296
297 - # Debian runs
298 - - name: Run netdata lifecycle, on Debian 9 (Containerized)
299 - script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "debian:stretch" tests/updater_checks.sh
300 - after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare Debian 9 (stretch)"
297 + # Debian runs
298 + - name: Run netdata lifecycle, on Debian 9 (Containerized)
299 + script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "debian:stretch" tests/updater_checks.sh
300 + after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare Debian 9 (stretch)"
301
302 - # openSuSE runs
303 - - name: Run netdata lifecycle, on openSuSE 15.0
304 - script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "opensuse/leap:15.0" tests/updater_checks.sh
305 - after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare opensuse/leap:15.0"
302 + # openSuSE runs
303 + - name: Run netdata lifecycle, on openSuSE 15.0
304 + script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "opensuse/leap:15.0" tests/updater_checks.sh
305 + after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare opensuse/leap:15.0"
306
307 - - name: Run netdata lifecycle, on openSuSE 15.1
308 - script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "opensuse/leap:15.1" tests/updater_checks.sh
309 - after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare opensuse/leap:15.1"
307 + - name: Run netdata lifecycle, on openSuSE 15.1
308 + script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "opensuse/leap:15.1" tests/updater_checks.sh
309 + after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare opensuse/leap:15.1"
310
311 - - name: Run netdata lifecycle, on openSuSE Tumbleweed
312 - script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "opensuse/tumbleweed:latest" tests/updater_checks.sh
313 - after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare opensuse/tumbleweed:latest"
311 + - name: Run netdata lifecycle, on openSuSE Tumbleweed
312 + script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "opensuse/tumbleweed:latest" tests/updater_checks.sh
313 + after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare opensuse/tumbleweed:latest"
314
315 - # Alpine runs
316 - - name: Run netdata lifecycle, on Alpine linux
317 - script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "alpine" tests/updater_checks.sh
318 - after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare Alpine"
315 + # Alpine runs
316 + - name: Run netdata lifecycle, on Alpine linux
317 + script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "alpine" tests/updater_checks.sh
318 + after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare Alpine"
319
320 - # Arch linux runs
321 - - name: Run netdata lifecycle, on ArchLinux
322 - script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "archlinux/base:latest" tests/updater_checks.sh
323 - after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare archlinux/base:latest"
320 + # Arch linux runs
321 + - name: Run netdata lifecycle, on ArchLinux
322 + script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "archlinux/base:latest" tests/updater_checks.sh
323 + after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare archlinux/base:latest"
324
325 - # Fedora runs
326 - - name: Run netdata lifecycle, on Fedora 28
327 - script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "fedora:28" tests/updater_checks.sh
328 - after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare Fedora 28"
325 + # Fedora runs
326 + - name: Run netdata lifecycle, on Fedora 28
327 + script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "fedora:28" tests/updater_checks.sh
328 + after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare Fedora 28"
329
330 - - name: Run netdata lifecycle, on Fedora 29
331 - script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "fedora:29" tests/updater_checks.sh
332 - after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare Fedora 29"
330 + - name: Run netdata lifecycle, on Fedora 29
331 + script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "fedora:29" tests/updater_checks.sh
332 + after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare Fedora 29"
333
334 - - name: Run netdata lifecycle, on Fedora 30 (Containerized)
335 - script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "fedora:30" tests/updater_checks.sh
336 - after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare Fedora 30"
334 + - name: Run netdata lifecycle, on Fedora 30 (Containerized)
335 + script: docker run -it -v "${PWD}:/netdata:rw" -w /netdata "fedora:30" tests/updater_checks.sh
336 + after_failure: post_message "TRAVIS_MESSAGE" "Netdata updater process failed on bare Fedora 30"
337
338
339
340 - - stage: Packaging for release
340 + - stage: Packaging for release
341
342 - name: Generate changelog and TAG the release (only on special commit msg)
343 - before_script: post_message "TRAVIS_MESSAGE" "Packaging step for release initiated" "${NOTIF_CHANNEL}"
344 - script:
345 - - echo "GIT Branch:" && git branch
346 - - echo "Last commit:" && git log -1
347 - - echo "GIT Describe:" && git describe
348 - - echo "packaging/version:" && cat packaging/version
349 - - .travis/generate_changelog_and_tag_release.sh
350 - after_failure: post_message "TRAVIS_MESSAGE" "<!here> Packaging for release failed"
351 - git:
352 - depth: false
342 + name: Generate changelog and TAG the release (only on special commit msg)
343 + before_script: post_message "TRAVIS_MESSAGE" "Packaging step for release initiated" "${NOTIF_CHANNEL}"
344 + script:
345 + - echo "GIT Branch:" && git branch
346 + - echo "Last commit:" && git log -1
347 + - echo "GIT Describe:" && git describe
348 + - echo "packaging/version:" && cat packaging/version
349 + - .travis/generate_changelog_and_tag_release.sh
350 + after_failure: post_message "TRAVIS_MESSAGE" "<!here> Packaging for release failed"
351 + git:
352 + depth: false
353
354 - - name: Run labeler on github issues
355 - script: .travis/labeler.sh # labeler should be replaced with GitHub Actions when they hit GA
354 + - name: Run labeler on github issues
355 + script: .travis/labeler.sh # labeler should be replaced with GitHub Actions when they hit GA
356
357
358
359 - # ###### Packaging workflow section ######
360 - # References:
361 - # https://us.images.linuxcontainers.org
362 - # https://packagecloud.io/docs#install_repo
359 + # ###### Packaging workflow section ######
360 + # References:
361 + # https://us.images.linuxcontainers.org
362 + # https://packagecloud.io/docs#install_repo
363
364 - # Ubuntu distros build
365 - #
366 - - stage:
367 - <<: *_DEB_TEMPLATE
368 - stage: "Package ubuntu/disco"
369 - env:
370 - - BUILDER_NAME="builder" BUILD_DISTRO="ubuntu" BUILD_RELEASE="disco" BUILD_STRING="ubuntu/disco"
371 - - PACKAGE_TYPE="deb" REPO_TOOL="apt-get"
372 - - ALLOW_SOFT_FAILURE_HERE=true
364 + # Ubuntu distros build
365 + #
366 + - stage:
367 + <<: *_DEB_TEMPLATE
368 + stage: "Package ubuntu/disco"
369 + env:
370 + - BUILDER_NAME="builder" BUILD_DISTRO="ubuntu" BUILD_RELEASE="disco" BUILD_STRING="ubuntu/disco"
371 + - PACKAGE_TYPE="deb" REPO_TOOL="apt-get"
372 + - ALLOW_SOFT_FAILURE_HERE=true
373
374
375
376 - - stage:
377 - <<: *_DEB_TEMPLATE
378 - stage: "Package ubuntu/cosmic"
379 - env:
380 - - BUILDER_NAME="builder" BUILD_DISTRO="ubuntu" BUILD_RELEASE="cosmic" BUILD_STRING="ubuntu/cosmic"
381 - - PACKAGE_TYPE="deb" REPO_TOOL="apt-get"
382 - - ALLOW_SOFT_FAILURE_HERE=true
376 + - stage:
377 + <<: *_DEB_TEMPLATE
378 + stage: "Package ubuntu/cosmic"
379 + env:
380 + - BUILDER_NAME="builder" BUILD_DISTRO="ubuntu" BUILD_RELEASE="cosmic" BUILD_STRING="ubuntu/cosmic"
381 + - PACKAGE_TYPE="deb" REPO_TOOL="apt-get"
382 + - ALLOW_SOFT_FAILURE_HERE=true
383
384
385
386 - - stage:
387 - <<: *_DEB_TEMPLATE
388 - stage: "Package ubuntu/bionic"
389 - env:
390 - - BUILDER_NAME="builder" BUILD_DISTRO="ubuntu" BUILD_RELEASE="bionic" BUILD_STRING="ubuntu/bionic"
391 - - PACKAGE_TYPE="deb" REPO_TOOL="apt-get"
392 - - ALLOW_SOFT_FAILURE_HERE=true
386 + - stage:
387 + <<: *_DEB_TEMPLATE
388 + stage: "Package ubuntu/bionic"
389 + env:
390 + - BUILDER_NAME="builder" BUILD_DISTRO="ubuntu" BUILD_RELEASE="bionic" BUILD_STRING="ubuntu/bionic"
391 + - PACKAGE_TYPE="deb" REPO_TOOL="apt-get"
392 + - ALLOW_SOFT_FAILURE_HERE=true
393
394
395
396 - # Debian distros build
397 - - stage:
398 - <<: *_DEB_TEMPLATE
399 - stage: "Package debian/buster"
400 - env:
401 - - BUILDER_NAME="builder" BUILD_DISTRO="debian" BUILD_RELEASE="buster" BUILD_STRING="debian/buster"
402 - - PACKAGE_TYPE="deb" REPO_TOOL="apt-get"
403 - - ALLOW_SOFT_FAILURE_HERE=true
396 + # Debian distros build
397 + - stage:
398 + <<: *_DEB_TEMPLATE
399 + stage: "Package debian/buster"
400 + env:
401 + - BUILDER_NAME="builder" BUILD_DISTRO="debian" BUILD_RELEASE="buster" BUILD_STRING="debian/buster"
402 + - PACKAGE_TYPE="deb" REPO_TOOL="apt-get"
403 + - ALLOW_SOFT_FAILURE_HERE=true
404
405
406
407 - - stage:
408 - <<: *_DEB_TEMPLATE
409 - stage: "Package debian/stretch"
410 - env:
411 - - BUILDER_NAME="builder" BUILD_DISTRO="debian" BUILD_RELEASE="stretch" BUILD_STRING="debian/stretch"
412 - - PACKAGE_TYPE="deb" REPO_TOOL="apt-get"
413 - - ALLOW_SOFT_FAILURE_HERE=true
407 + - stage:
408 + <<: *_DEB_TEMPLATE
409 + stage: "Package debian/stretch"
410 + env:
411 + - BUILDER_NAME="builder" BUILD_DISTRO="debian" BUILD_RELEASE="stretch" BUILD_STRING="debian/stretch"
412 + - PACKAGE_TYPE="deb" REPO_TOOL="apt-get"
413 + - ALLOW_SOFT_FAILURE_HERE=true
414
415
416
417 - - stage:
418 - <<: *_DEB_TEMPLATE
419 - stage: "Package debian/jessie"
420 - env:
421 - - BUILDER_NAME="builder" BUILD_DISTRO="debian" BUILD_RELEASE="jessie" BUILD_STRING="debian/jessie"
422 - - PACKAGE_TYPE="deb" REPO_TOOL="apt-get"
423 - - ALLOW_SOFT_FAILURE_HERE=true
417 + - stage:
418 + <<: *_DEB_TEMPLATE
419 + stage: "Package debian/jessie"
420 + env:
421 + - BUILDER_NAME="builder" BUILD_DISTRO="debian" BUILD_RELEASE="jessie" BUILD_STRING="debian/jessie"
422 + - PACKAGE_TYPE="deb" REPO_TOOL="apt-get"
423 + - ALLOW_SOFT_FAILURE_HERE=true
424
425
426
427 - # Enterprise linux builds (Centos, Redhat, Amazon linux (el/6))
428 - #
429 - - stage:
430 - <<: *_RPM_TEMPLATE
431 - stage: "Package Enterprise Linux 7"
432 - env:
433 - - BUILDER_NAME="builder" BUILD_DISTRO="centos" BUILD_RELEASE="7" BUILD_STRING="el/7"
434 - - PACKAGE_TYPE="rpm" REPO_TOOL="yum"
435 - - ALLOW_SOFT_FAILURE_HERE=true
427 + # Enterprise linux builds (Centos, Redhat, Amazon linux (el/6))
428 + #
429 + - stage:
430 + <<: *_RPM_TEMPLATE
431 + stage: "Package Enterprise Linux 7"
432 + env:
433 + - BUILDER_NAME="builder" BUILD_DISTRO="centos" BUILD_RELEASE="7" BUILD_STRING="el/7"
434 + - PACKAGE_TYPE="rpm" REPO_TOOL="yum"
435 + - ALLOW_SOFT_FAILURE_HERE=true
436
437
438 -
439 - - stage:
440 - <<: *_RPM_TEMPLATE
441 - stage: "Package Enterprise linux 6"
442 - env:
443 - - BUILDER_NAME="builder" BUILD_DISTRO="centos" BUILD_RELEASE="6" BUILD_STRING="el/6"
444 - - PACKAGE_TYPE="rpm" REPO_TOOL="yum"
445 - - ALLOW_SOFT_FAILURE_HERE=true
438 +
439 + - stage:
440 + <<: *_RPM_TEMPLATE
441 + stage: "Package Enterprise linux 6"
442 + env:
443 + - BUILDER_NAME="builder" BUILD_DISTRO="centos" BUILD_RELEASE="6" BUILD_STRING="el/6"
444 + - PACKAGE_TYPE="rpm" REPO_TOOL="yum"
445 + - ALLOW_SOFT_FAILURE_HERE=true
446
447
448
449 - # Fedora distros build
450 - #
451 - - stage:
452 - <<: *_RPM_TEMPLATE
453 - stage: "Package Fedora 30"
454 - env:
455 - - BUILDER_NAME="builder" BUILD_DISTRO="fedora" BUILD_RELEASE="30" BUILD_STRING="fedora/30"
456 - - PACKAGE_TYPE="rpm" REPO_TOOL="dnf"
457 - - ALLOW_SOFT_FAILURE_HERE=true
449 + # Fedora distros build
450 + #
451 + - stage:
452 + <<: *_RPM_TEMPLATE
453 + stage: "Package Fedora 30"
454 + env:
455 + - BUILDER_NAME="builder" BUILD_DISTRO="fedora" BUILD_RELEASE="30" BUILD_STRING="fedora/30"
456 + - PACKAGE_TYPE="rpm" REPO_TOOL="dnf"
457 + - ALLOW_SOFT_FAILURE_HERE=true
458
459 -
460 -
461 - - stage:
462 - <<: *_RPM_TEMPLATE
463 - stage: "Package Fedora 29"
464 - env:
465 - - BUILDER_NAME="builder" BUILD_DISTRO="fedora" BUILD_RELEASE="29" BUILD_STRING="fedora/29"
466 - - PACKAGE_TYPE="rpm" REPO_TOOL="dnf"
467 - - ALLOW_SOFT_FAILURE_HERE=true
459 +
460 +
461 + - stage:
462 + <<: *_RPM_TEMPLATE
463 + stage: "Package Fedora 29"
464 + env:
465 + - BUILDER_NAME="builder" BUILD_DISTRO="fedora" BUILD_RELEASE="29" BUILD_STRING="fedora/29"
466 + - PACKAGE_TYPE="rpm" REPO_TOOL="dnf"
467 + - ALLOW_SOFT_FAILURE_HERE=true
468
469
470
471 - - stage:
472 - <<: *_RPM_TEMPLATE
473 - stage: "Package Fedora 28"
474 - env:
475 - - BUILDER_NAME="builder" BUILD_DISTRO="fedora" BUILD_RELEASE="28" BUILD_STRING="fedora/28"
476 - - PACKAGE_TYPE="rpm" REPO_TOOL="dnf"
477 - - ALLOW_SOFT_FAILURE_HERE=true
478 -
479 -
480 -
481 - # Opensuse distros build
482 - #
483 - - stage:
484 - <<: *_RPM_TEMPLATE
485 - stage: "Package OpenSuSE 15.1"
486 - env:
487 - - BUILDER_NAME="builder" BUILD_DISTRO="opensuse" BUILD_RELEASE="15.0" BUILD_STRING="opensuse/15.1"
488 - - PACKAGE_TYPE="rpm" REPO_TOOL="zypper"
489 - - ALLOW_SOFT_FAILURE_HERE=true
490 -
491 -
492 -
493 - - stage:
494 - <<: *_RPM_TEMPLATE
495 - stage: "Package OpenSuSE 15.0"
496 - env:
497 - - BUILDER_NAME="builder" BUILD_DISTRO="opensuse" BUILD_RELEASE="15.0" BUILD_STRING="opensuse/15.0"
498 - - PACKAGE_TYPE="rpm" REPO_TOOL="zypper"
499 - - ALLOW_SOFT_FAILURE_HERE=true
500 - # ###### End of packaging workflow section ###### #
501 - # ############################################### #
502 -
503 -
504 -
505 - # We only publish if a TAG has been set during packaging
506 - - stage: Publish for release
507 -
508 - name: Build & Publish docker images
509 - before_script: post_message "TRAVIS_MESSAGE" "Publishing docker images" "${NOTIF_CHANNEL}"
510 - script:
511 - - echo "GIT Branch:" && git branch
512 - - echo "Last commit:" && git log -1
513 - - echo "GIT Describe:" && git describe
514 - - echo "packaging/version:" && cat packaging/version
515 - - packaging/docker/check_login.sh
516 - - echo "Switching to latest master branch, to pick up tagging if any" && git checkout master && git pull
517 - - packaging/docker/build.sh
518 - - packaging/docker/publish.sh
519 - after_failure: post_message "TRAVIS_MESSAGE" "<!here> Docker image publishing failed"
520 - git:
521 - depth: false
522 - env: ALLOW_SOFT_FAILURE_HERE=true
523 - # We don't run on release candidates
524 - if: tag !~ /(-rc)/
525 -
526 - - name: Create release draft
527 - before_script: post_message "TRAVIS_MESSAGE" "Drafting release on github" "${NOTIF_CHANNEL}"
528 - script:
529 - - echo "GIT Branch:" && git branch
530 - - echo "Last commit:" && git log -1
531 - - echo "GIT Describe:" && git describe
532 - - echo "packaging/version:" && cat packaging/version
533 - - echo "Generating release artifacts" && .travis/create_artifacts.sh # Could/should be a common storage to put this and share between jobs
534 - - .travis/draft_release.sh
535 - git:
536 - depth: false
537 - after_failure: post_message "TRAVIS_MESSAGE" "<!here> Draft release submission failed"
538 - # We don't run on release candidates
539 - if: tag !~ /(-rc)/
540 -
541 -
542 -
543 - # This is the nightly pre-execution step (Jobs, preparatory steps for nightly, etc)
544 - - stage: Nightly operations
545 -
546 - name: Run coverity scan
547 - # Just notify people that Nightly ops triggered, use the first step as a hook to do that
548 - before_script: post_message "TRAVIS_MESSAGE" "Starting nightly operations" "${NOTIF_CHANNEL}"
549 - script: ./coverity-install.sh && ./coverity-scan.sh || echo "Coverity failed :("
550 -
551 - - name: Kickstart files integrity testing (extended)
552 - script: ./tests/installer/checksums.sh
553 -
554 - - name: Run labeler on github issues
555 - script: .travis/labeler.sh # labeler should be replaced with GitHub Actions when they hit GA
556 -
557 - # This is generating the changelog for nightly release and publish it
558 - - name: Generate nightly changelog
559 - before_script: post_message "TRAVIS_MESSAGE" "Starting changelog generation for nightlies" "${NOTIF_CHANNEL}"
560 - script:
561 - - ".travis/nightlies.sh"
562 - - ".travis/check_changelog_last_modification.sh"
563 - after_failure: post_message "TRAVIS_MESSAGE" "<!here> Nightly changelog generation failed"
564 - git:
565 - depth: false
566 -
567 -
568 -
569 - # This is the nightly execution step
570 - #
571 - - stage: Nightly release
572 -
573 - name: Build & Publish docker images
574 - before_script: post_message "TRAVIS_MESSAGE" "Publishing docker images for nightlies" "${NOTIF_CHANNEL}"
575 - script:
576 - - echo "GIT Branch:" && git branch
577 - - echo "Last commit:" && git log -1
578 - - echo "GIT Describe:" && git describe
579 - - echo "packaging/version:" && cat packaging/version
580 - - docker info
581 - - packaging/docker/check_login.sh
582 - - packaging/docker/build.sh
583 - - packaging/docker/publish.sh
584 - after_failure: post_message "TRAVIS_MESSAGE" "<!here> Nightly docker image publish failed"
585 - git:
586 - depth: false
587 - env: ALLOW_SOFT_FAILURE_HERE=true
588 -
589 - - name: Create nightly release artifacts, publish to GCS
590 - before_script: post_message "TRAVIS_MESSAGE" "Starting artifacts generation for nightlies" "${NOTIF_CHANNEL}"
591 - script:
592 - - echo "GIT Branch:" && git branch
593 - - echo "Last commit:" && git log -1
594 - - echo "GIT Describe:" && git describe
595 - - echo "packaging/version:" && cat packaging/version
596 - - .travis/create_artifacts.sh
597 - after_failure: post_message "TRAVIS_MESSAGE" "<!here> Nightly artifacts generation failed"
598 - git:
599 - depth: false
600 - before_deploy:
601 - echo "Preparing creds under ${TRAVIS_REPO_SLUG}";
602 - if [ "${TRAVIS_REPO_SLUG}" == "netdata/netdata" ]; then
603 - openssl aes-256-cbc -K $encrypted_8daf19481253_key -iv $encrypted_8daf19481253_iv -in .travis/gcs-credentials.json.enc -out .travis/gcs-credentials.json -d;
604 - else
605 - echo "Beta deployment stage in progress";
606 - openssl aes-256-cbc -K $encrypted_8daf19481253_key -iv $encrypted_8daf19481253_iv -in .travis/gcs-credentials.json.enc -out .travis/gcs-credentials.json -d;
607 - fi;
608 - deploy:
609 - # Beta storage, used for testing purposes
610 - - provider: gcs
611 - edge:
612 - branch: gcs-ng
613 - project_id: netdata-storage
614 - credentials: .travis/gcs-credentials.json
615 - bucket: "netdata-dev-nightlies"
616 - skip_cleanup: true
617 - local_dir: "artifacts"
618 - on:
619 - # Only deploy on netdata/netdata, master branch, when artifacts directory is created
620 - repo: ${TRAVIS_REPO_SLUG}
621 - branch: master
622 - condition: -d "artifacts" && ${TRAVIS_REPO_SLUG} != "netdata/netdata"
623 -
624 - # Production storage
625 - - provider: gcs
626 - edge:
627 - branch: gcs-ng
628 - project_id: netdata-storage
629 - credentials: .travis/gcs-credentials.json
630 - bucket: "netdata-nightlies"
631 - skip_cleanup: true
632 - local_dir: "artifacts"
633 - on:
634 - # Only deploy on netdata/netdata, master branch, when artifacts directory is created
635 - repo: netdata/netdata
636 - branch: master
637 - condition: -d "artifacts" && ${TRAVIS_REPO_SLUG} = "netdata/netdata"
638 - after_deploy: rm -f .travis/gcs-credentials.json
471 + - stage:
472 + <<: *_RPM_TEMPLATE
473 + stage: "Package Fedora 28"
474 + env:
475 + - BUILDER_NAME="builder" BUILD_DISTRO="fedora" BUILD_RELEASE="28" BUILD_STRING="fedora/28"
476 + - PACKAGE_TYPE="rpm" REPO_TOOL="dnf"
477 + - ALLOW_SOFT_FAILURE_HERE=true
478 +
479 +
480 +
481 + # Opensuse distros build
482 + #
483 + - stage:
484 + <<: *_RPM_TEMPLATE
485 + stage: "Package OpenSuSE 15.1"
486 + env:
487 + - BUILDER_NAME="builder" BUILD_DISTRO="opensuse" BUILD_RELEASE="15.0" BUILD_STRING="opensuse/15.1"
488 + - PACKAGE_TYPE="rpm" REPO_TOOL="zypper"
489 + - ALLOW_SOFT_FAILURE_HERE=true
490 +
491 +
492 +
493 + - stage:
494 + <<: *_RPM_TEMPLATE
495 + stage: "Package OpenSuSE 15.0"
496 + env:
497 + - BUILDER_NAME="builder" BUILD_DISTRO="opensuse" BUILD_RELEASE="15.0" BUILD_STRING="opensuse/15.0"
498 + - PACKAGE_TYPE="rpm" REPO_TOOL="zypper"
499 + - ALLOW_SOFT_FAILURE_HERE=true
500 + # ###### End of packaging workflow section ###### #
501 + # ############################################### #
502 +
503 +
504 +
505 + # We only publish if a TAG has been set during packaging
506 + - stage: Publish for release
507 +
508 + name: Build & Publish docker images
509 + before_script: post_message "TRAVIS_MESSAGE" "Publishing docker images" "${NOTIF_CHANNEL}"
510 + script:
511 + - echo "GIT Branch:" && git branch
512 + - echo "Last commit:" && git log -1
513 + - echo "GIT Describe:" && git describe
514 + - echo "packaging/version:" && cat packaging/version
515 + - packaging/docker/check_login.sh
516 + - echo "Switching to latest master branch, to pick up tagging if any" && git checkout master && git pull
517 + - packaging/docker/build.sh
518 + - packaging/docker/publish.sh
519 + after_failure: post_message "TRAVIS_MESSAGE" "<!here> Docker image publishing failed"
520 + git:
521 + depth: false
522 + env: ALLOW_SOFT_FAILURE_HERE=true
523 + # We don't run on release candidates
524 + if: tag !~ /(-rc)/
525 +
526 + - name: Create release draft
527 + before_script: post_message "TRAVIS_MESSAGE" "Drafting release on github" "${NOTIF_CHANNEL}"
528 + script:
529 + - echo "GIT Branch:" && git branch
530 + - echo "Last commit:" && git log -1
531 + - echo "GIT Describe:" && git describe
532 + - echo "packaging/version:" && cat packaging/version
533 + - echo "Generating release artifacts" && .travis/create_artifacts.sh # Could/should be a common storage to put this and share between jobs
534 + - .travis/draft_release.sh
535 + git:
536 + depth: false
537 + after_failure: post_message "TRAVIS_MESSAGE" "<!here> Draft release submission failed"
538 + # We don't run on release candidates
539 + if: tag !~ /(-rc)/
540 +
541 +
542 +
543 + # This is the nightly pre-execution step (Jobs, preparatory steps for nightly, etc)
544 + - stage: Nightly operations
545 +
546 + name: Run coverity scan
547 + # Just notify people that Nightly ops triggered, use the first step as a hook to do that
548 + before_script: post_message "TRAVIS_MESSAGE" "Starting nightly operations" "${NOTIF_CHANNEL}"
549 + script: ./coverity-install.sh && ./coverity-scan.sh || echo "Coverity failed :("
550 +
551 + - name: Kickstart files integrity testing (extended)
552 + script: ./tests/installer/checksums.sh
553 +
554 + - name: Run labeler on github issues
555 + script: .travis/labeler.sh # labeler should be replaced with GitHub Actions when they hit GA
556 +
557 + # This is generating the changelog for nightly release and publish it
558 + - name: Generate nightly changelog
559 + before_script: post_message "TRAVIS_MESSAGE" "Starting changelog generation for nightlies" "${NOTIF_CHANNEL}"
560 + script:
561 + - ".travis/nightlies.sh"
562 + - ".travis/check_changelog_last_modification.sh"
563 + after_failure: post_message "TRAVIS_MESSAGE" "<!here> Nightly changelog generation failed"
564 + git:
565 + depth: false
566 +
567 +
568 +
569 + # This is the nightly execution step
570 + #
571 + - stage: Nightly release
572 +
573 + name: Build & Publish docker images
574 + before_script: post_message "TRAVIS_MESSAGE" "Publishing docker images for nightlies" "${NOTIF_CHANNEL}"
575 + script:
576 + - echo "GIT Branch:" && git branch
577 + - echo "Last commit:" && git log -1
578 + - echo "GIT Describe:" && git describe
579 + - echo "packaging/version:" && cat packaging/version
580 + - docker info
581 + - packaging/docker/check_login.sh
582 + - packaging/docker/build.sh
583 + - packaging/docker/publish.sh
584 + after_failure: post_message "TRAVIS_MESSAGE" "<!here> Nightly docker image publish failed"
585 + git:
586 + depth: false
587 + env: ALLOW_SOFT_FAILURE_HERE=true
588 +
589 + - name: Create nightly release artifacts, publish to GCS
590 + before_script: post_message "TRAVIS_MESSAGE" "Starting artifacts generation for nightlies" "${NOTIF_CHANNEL}"
591 + script:
592 + - echo "GIT Branch:" && git branch
593 + - echo "Last commit:" && git log -1
594 + - echo "GIT Describe:" && git describe
595 + - echo "packaging/version:" && cat packaging/version
596 + - .travis/create_artifacts.sh
597 + after_failure: post_message "TRAVIS_MESSAGE" "<!here> Nightly artifacts generation failed"
598 + git:
599 + depth: false
600 + before_deploy:
601 + echo "Preparing creds under ${TRAVIS_REPO_SLUG}";
602 + if [ "${TRAVIS_REPO_SLUG}" == "netdata/netdata" ]; then
603 + openssl aes-256-cbc -K $encrypted_8daf19481253_key -iv $encrypted_8daf19481253_iv -in .travis/gcs-credentials.json.enc -out .travis/gcs-credentials.json -d;
604 + else
605 + echo "Beta deployment stage in progress";
606 + openssl aes-256-cbc -K $encrypted_8daf19481253_key -iv $encrypted_8daf19481253_iv -in .travis/gcs-credentials.json.enc -out .travis/gcs-credentials.json -d;
607 + fi;
608 + deploy:
609 + # Beta storage, used for testing purposes
610 + - provider: gcs
611 + edge:
612 + branch: gcs-ng
613 + project_id: netdata-storage
614 + credentials: .travis/gcs-credentials.json
615 + bucket: "netdata-dev-nightlies"
616 + skip_cleanup: true
617 + local_dir: "artifacts"
618 + on:
619 + # Only deploy on netdata/netdata, master branch, when artifacts directory is created
620 + repo: ${TRAVIS_REPO_SLUG}
621 + branch: master
622 + condition: -d "artifacts" && ${TRAVIS_REPO_SLUG} != "netdata/netdata"
623 +
624 + # Production storage
625 + - provider: gcs
626 + edge:
627 + branch: gcs-ng
628 + project_id: netdata-storage
629 + credentials: .travis/gcs-credentials.json
630 + bucket: "netdata-nightlies"
631 + skip_cleanup: true
632 + local_dir: "artifacts"
633 + on:
634 + # Only deploy on netdata/netdata, master branch, when artifacts directory is created
635 + repo: netdata/netdata
636 + branch: master
637 + condition: -d "artifacts" && ${TRAVIS_REPO_SLUG} = "netdata/netdata"
638 + after_deploy: rm -f .travis/gcs-credentials.json