@cryptotaxi247 / netdata-1 / commits / 0cab09f48

Overhaul build CI. (#11699)

* Overhaul build CI. This makes a number of changes that make our build CI easier to maintain and much safer with respect to the possibility of accidentally pushing broken nightlies. * The release-build.yml workflow has been renamed to just build.yml * The updater.yml and build-and-install.yml workflows have been consolidated into the build.yml workflow. * The updater checks now use the dist tarball produced by the dist tarball build instead of building one for each matrix job. * The updater and build checks now use a set of jobs for generating their test environments. * The updater and build checks and their shared test environment builds now use a unified build matrix, handled in an external data file (.github/data/build-matrix.json). * Nightly artifact uploads and release creation are now dependent on the updater checks passing. * Properly handle generated build matrix. * Minor fixes. * Fix shellcheck complaints. * Fixed stub script handling. * Mangle the build matrix JSON properly. * Properly handle stub scripts. * Fix distro name handling. * Fix typos. * Fix test environment image handling. * Fix updater checks. * Skip CentOS 7 JSON-C bundling check. * Fix handling of artifacts for updater check. * Fix yamllint errors. * Fix dist tarball handling. * Fix updater check script permissions. * Restructure build test Dockerfile for better caching. * Remove parallelization limits for test environment builds. These complete fast enough that it is perfectly reasonable to run them all in parallel simultaneously. In the best case scenario, this will save roughly 5-10 minutes of time during CI runs. * Add more in-line documentation and tidy up a few unneeded parameters. * Add checks to verify consolidated artifacts are good. * Fix distfile name handling. * Fix artifact checking. * Better delineate phases of updater check in logs. * Simplify updater checks. * Print checksums of artifacts. To simplify debugging. * Fix handling of updater checks.

Austin S. Hemmelgarn committed Nov 15, 2021 at 10:02 UTC 0cab09f488fa70ce1b47831446f949b93ca87414
8 files changed +662 -479
.github/data/build-matrix.json new
+109
@@ -0,0 +1,109 @@
1 +{
2 + "include": [
3 + {
4 + "distro": "alpine:edge",
5 + "artifact_key": "alpine-edge",
6 + "pre": "apk add -U bash",
7 + "rmjsonc": "apk del json-c-dev"
8 + },
9 + {
10 + "distro": "alpine:3.14",
11 + "artifact_key": "alpine-3.14",
12 + "pre": "apk add -U bash",
13 + "rmjsonc": "apk del json-c-dev"
14 + },
15 + {
16 + "distro": "alpine:3.13",
17 + "artifact_key": "alpine-3.13",
18 + "pre": "apk add -U bash",
19 + "rmjsonc": "apk del json-c-dev"
20 + },
21 + {
22 + "distro": "alpine:3.12",
23 + "artifact_key": "alpine-3.12",
24 + "pre": "apk add -U bash",
25 + "rmjsonc": "apk del json-c-dev"
26 + },
27 + {
28 + "distro": "archlinux:latest",
29 + "artifact_key": "archlinux",
30 + "pre": "pacman --noconfirm -Syu && pacman --noconfirm -Sy grep libffi"
31 + },
32 + {
33 + "distro": "centos:7",
34 + "artifact_key": "centos7"
35 + },
36 + {
37 + "distro": "centos:8",
38 + "artifact_key": "centos8",
39 + "rmjsonc": "dnf remove -y json-c-devel"
40 + },
41 + {
42 + "distro": "debian:11",
43 + "artifact_key": "debian11",
44 + "pre": "apt-get update",
45 + "rmjsonc": "apt-get remove -y libjson-c-dev"
46 + },
47 + {
48 + "distro": "debian:10",
49 + "artifact_key": "debian10",
50 + "pre": "apt-get update",
51 + "rmjsonc": "apt-get remove -y libjson-c-dev"
52 + },
53 + {
54 + "distro": "debian:9",
55 + "artifact_key": "debian9",
56 + "pre": "apt-get update",
57 + "rmjsonc": "apt-get remove -y libjson-c-dev"
58 + },
59 + {
60 + "distro": "fedora:35",
61 + "artifact_key": "fedora35",
62 + "rmjsonc": "dnf remove -y json-c-devel"
63 + },
64 + {
65 + "distro": "fedora:34",
66 + "artifact_key": "fedora34",
67 + "rmjsonc": "dnf remove -y json-c-devel"
68 + },
69 + {
70 + "distro": "fedora:33",
71 + "artifact_key": "fedora33",
72 + "rmjsonc": "dnf remove -y json-c-devel"
73 + },
74 + {
75 + "distro": "opensuse/leap:15.3",
76 + "artifact_key": "opensuse15.3",
77 + "rmjsonc": "zypper rm -y libjson-c-devel"
78 + },
79 + {
80 + "distro": "opensuse/leap:15.2",
81 + "artifact_key": "opensuse15.2",
82 + "rmjsonc": "zypper rm -y libjson-c-devel"
83 + },
84 + {
85 + "distro": "ubuntu:21.10",
86 + "artifact_key": "ubuntu21.10",
87 + "pre": "rm -f /etc/apt/apt.conf.d/docker && apt-get update",
88 + "rmjsonc": "apt-get remove -y libjson-c-dev"
89 + },
90 + {
91 + "distro": "ubuntu:21.04",
92 + "artifact_key": "ubuntu21.04",
93 + "pre": "apt-get update",
94 + "rmjsonc": "apt-get remove -y libjson-c-dev"
95 + },
96 + {
97 + "distro": "ubuntu:20.04",
98 + "artifact_key": "ubuntu20.04",
99 + "pre": "apt-get update",
100 + "rmjsonc": "apt-get remove -y libjson-c-dev"
101 + },
102 + {
103 + "distro": "ubuntu:18.04",
104 + "artifact_key": "ubuntu18.04",
105 + "pre": "apt-get update",
106 + "rmjsonc": "apt-get remove -y libjson-c-dev"
107 + }
108 + ]
109 +}
.github/dockerfiles/Dockerfile.build_test
+6 -1
@@ -4,10 +4,15 @@ FROM ${BASE}
4
5 ARG PRE
6 ENV PRE=${PRE}
7 +ARG RMJSONC
8 +ENV RMJSONC=${RMJSONC}
9 ENV DO_NOT_TRACK=1
10 ENV GITHUB_ACTIONS=true
11
12 +RUN echo "${PRE}" > /prep-cmd.sh && \
13 + echo "${RMJSONC}" > /rmjsonc.sh && chmod +x /rmjsonc.sh && \
14 + /bin/sh /prep-cmd.sh
15 +
16 COPY . /netdata
17
12 -RUN /bin/sh /netdata/prep-cmd.sh
18 RUN /netdata/packaging/installer/install-required-packages.sh --dont-wait --non-interactive netdata-all
.github/scripts/run-updater-check.sh new
+9
@@ -0,0 +1,9 @@
1 +#!/bin/sh
2 +
3 +echo ">>> Installing Netdata..."
4 +/netdata/packaging/installer/kickstart.sh --dont-wait --disable-telemetry || exit 1
5 +echo ">>> Updating Netdata..."
6 +export NETDATA_NIGHTLIES_BASEURL="http://localhost:8080/artifacts/" # Pull the tarball from the local web server.
7 +/netdata/packaging/installer/netdata-updater.sh --not-running-from-cron --no-updater-self-update || exit 1
8 +echo ">>> Checking if update was successful..."
9 +/netdata/.github/scripts/check-updater.sh || exit 1
.github/workflows/build-and-install.yml deleted
-125
@@ -1,125 +0,0 @@
1 ----
2 -name: Builder
3 -on:
4 - push:
5 - branches:
6 - - master
7 - pull_request: null
8 -env:
9 - DO_NOT_TRACK: 1
10 -concurrency:
11 - group: builder-${{ github.ref }}
12 - cancel-in-progress: true
13 -jobs:
14 - source-build:
15 - name: Build & Install
16 - strategy:
17 - fail-fast: false
18 - max-parallel: 8
19 - matrix:
20 - distro:
21 - - 'alpine:edge'
22 - - 'alpine:3.14'
23 - - 'alpine:3.13'
24 - - 'alpine:3.12'
25 - - 'archlinux:latest'
26 - - 'centos:8'
27 - - 'centos:7'
28 - - 'debian:bullseye' # 11
29 - - 'debian:10'
30 - - 'debian:9'
31 - - 'fedora:35'
32 - - 'fedora:34'
33 - - 'fedora:33'
34 - - 'opensuse/leap:15.2'
35 - - 'opensuse/leap:15.3'
36 - - 'ubuntu:21.10'
37 - - 'ubuntu:21.04'
38 - - 'ubuntu:20.04'
39 - - 'ubuntu:18.04'
40 - include:
41 - - distro: 'alpine:edge'
42 - pre: 'apk add -U bash'
43 - rmjsonc: 'apk del json-c-dev'
44 - - distro: 'alpine:3.14'
45 - pre: 'apk add -U bash'
46 - rmjsonc: 'apk del json-c-dev'
47 - - distro: 'alpine:3.13'
48 - pre: 'apk add -U bash'
49 - rmjsonc: 'apk del json-c-dev'
50 - - distro: 'alpine:3.12'
51 - pre: 'apk add -U bash'
52 - rmjsonc: 'apk del json-c-dev'
53 -
54 - - distro: 'archlinux:latest'
55 - pre: 'pacman --noconfirm -Syu && pacman --noconfirm -Sy grep libffi'
56 -
57 - - distro: 'centos:8'
58 - rmjsonc: 'dnf remove -y json-c-devel'
59 -
60 - - distro: 'debian:bullseye' # 11
61 - pre: 'apt-get update'
62 - rmjsonc: 'apt-get remove -y libjson-c-dev'
63 - - distro: 'debian:10'
64 - pre: 'apt-get update'
65 - rmjsonc: 'apt-get remove -y libjson-c-dev'
66 - - distro: 'debian:9'
67 - pre: 'apt-get update'
68 - rmjsonc: 'apt-get remove -y libjson-c-dev'
69 -
70 - - distro: 'fedora:35'
71 - rmjsonc: 'dnf remove -y json-c-devel'
72 - - distro: 'fedora:34'
73 - rmjsonc: 'dnf remove -y json-c-devel'
74 - - distro: 'fedora:33'
75 - rmjsonc: 'dnf remove -y json-c-devel'
76 -
77 - - distro: 'opensuse/leap:15.2'
78 - rmjsonc: 'zypper rm -y libjson-c-devel'
79 - - distro: 'opensuse/leap:15.3'
80 - rmjsonc: 'zypper rm -y libjson-c-devel'
81 -
82 - - distro: 'ubuntu:21.10'
83 - pre: 'rm -f /etc/apt/apt.conf.d/docker* && apt-get update'
84 - rmjsonc: 'apt-get remove -y libjson-c-dev'
85 - - distro: 'ubuntu:21.04'
86 - pre: 'apt-get update'
87 - rmjsonc: 'apt-get remove -y libjson-c-dev'
88 - - distro: 'ubuntu:20.04'
89 - pre: 'apt-get update'
90 - rmjsonc: 'apt-get remove -y libjson-c-dev'
91 - - distro: 'ubuntu:18.04'
92 - pre: 'apt-get update'
93 - rmjsonc: 'apt-get remove -y libjson-c-dev'
94 - runs-on: ubuntu-latest
95 - steps:
96 - - name: Git clone repository
97 - uses: actions/checkout@v2
98 - with:
99 - submodules: recursive
100 - - name: install-required-packages.sh on ${{ matrix.distro }}
101 - env:
102 - PRE: ${{ matrix.pre }}
103 - RMJSONC: ${{ matrix.rmjsonc }}
104 - run: |
105 - echo $PRE > ./prep-cmd.sh
106 - echo $RMJSONC > ./rmjsonc.sh && chmod +x ./rmjsonc.sh
107 - docker build . -f .github/dockerfiles/Dockerfile.build_test -t test --build-arg BASE=${{ matrix.distro }}
108 - - name: Regular build on ${{ matrix.distro }}
109 - run: |
110 - docker run --security-opt seccomp=unconfined -w /netdata test /bin/sh -c 'autoreconf -ivf && ./configure && make -j2'
111 - - name: netdata-installer on ${{ matrix.distro }}, disable cloud
112 - run: |
113 - docker run --security-opt seccomp=unconfined -w /netdata test /bin/sh -c './netdata-installer.sh --dont-wait --dont-start-it --disable-cloud'
114 - - name: netdata-installer on ${{ matrix.distro }}, require cloud
115 - run: |
116 - docker run --security-opt seccomp=unconfined -w /netdata test /bin/sh -c './netdata-installer.sh --dont-wait --dont-start-it --require-cloud'
117 - - name: netdata-installer on ${{ matrix.distro }}, require cloud, require ACLK-NG
118 - run: |
119 - docker run --security-opt seccomp=unconfined -w /netdata -e NETDATA_CONFIGURE_OPTIONS='--with-aclk-ng' test \
120 - /bin/sh -c './netdata-installer.sh --dont-wait --dont-start-it --require-cloud'
121 - - name: netdata-installer on ${{ matrix.distro }}, require cloud, no JSON-C
122 - if: matrix.rmjsonc != ''
123 - run: |
124 - docker run --security-opt seccomp=unconfined -w /netdata test \
125 - /bin/sh -c '/netdata/rmjsonc.sh && ./netdata-installer.sh --dont-wait --dont-start-it --require-cloud'
.github/workflows/build.yml new
+537
@@ -0,0 +1,537 @@
1 +---
2 +# Ci code for building release artifacts.
3 +name: Build
4 +on:
5 + push: # Master branch checks only validate the build and generate artifacts for testing.
6 + branches:
7 + - master
8 + pull_request: null # PR checks only validate the build and generate artifacts for testing.
9 + workflow_dispatch: # Dispatch runs build and validate, then push to the appropriate storage location.
10 + inputs:
11 + type:
12 + description: Build Type
13 + default: nightly
14 + required: true
15 + version:
16 + description: Version Tag
17 + default: nightly
18 + required: true
19 +concurrency: # This keeps multiple instances of the job from running concurrently for the same ref and event type.
20 + group: release-${{ github.ref }}-${{ github.event_name }}
21 + cancel-in-progress: true
22 +jobs:
23 + build-dist: # Build the distribution tarball and store it as an artifact.
24 + name: Build Distribution Tarball
25 + runs-on: ubuntu-latest
26 + outputs:
27 + distfile: ${{ steps.build.outputs.distfile }}
28 + steps:
29 + - name: Checkout
30 + uses: actions/checkout@v2
31 + with:
32 + fetch-depth: 0
33 + submodules: recursive
34 + - name: Mark Stable
35 + if: github.event_name == 'workflow_dispatch' && github.event.inputs.type != 'nightly'
36 + run: |
37 + sed -i 's/^RELEASE_CHANNEL="nightly" *#/RELEASE_CHANNEL="stable" #/' netdata-installer.sh
38 + - name: Build
39 + id: build
40 + run: |
41 + mkdir -p artifacts
42 + ./packaging/installer/install-required-packages.sh --dont-wait --non-interactive netdata
43 + autoreconf -ivf
44 + ./configure --prefix=/usr \
45 + --sysconfdir=/etc \
46 + --localstatedir=/var \
47 + --libexecdir=/usr/libexec \
48 + --with-zlib \
49 + --with-math \
50 + --with-user=netdata
51 + make dist
52 + echo "::set-output name=distfile::$(find . -name 'netdata-*.tar.gz')"
53 + cp netdata-*.tar.gz artifacts/
54 + - name: Store
55 + uses: actions/upload-artifact@v2
56 + with:
57 + name: dist-tarball
58 + path: artifacts/*.tar.gz
59 + retention-days: 30
60 + - name: Failure Notification
61 + uses: rtCamp/action-slack-notify@v2
62 + env:
63 + SLACK_COLOR: 'danger'
64 + SLACK_FOOTER: ''
65 + SLACK_ICON_EMOJI: ':github-actions:'
66 + SLACK_TITLE: 'Distribution tarball build failed:'
67 + SLACK_USERNAME: 'GitHub Actions'
68 + SLACK_MESSAGE: "Distribution tarball build failed."
69 + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
70 + if: >-
71 + ${{
72 + failure()
73 + && startsWith(github.ref, 'refs/heads/master')
74 + && github.event_name != 'pull_request'
75 + }}
76 +
77 + build-static: # Build the static binary archives, and store them as artifacts.
78 + name: Build Static
79 + runs-on: ubuntu-latest
80 + strategy:
81 + matrix:
82 + arch:
83 + - 'x86_64'
84 + - 'armv7l'
85 + - 'aarch64'
86 + steps:
87 + - name: Checkout
88 + uses: actions/checkout@v2
89 + with:
90 + fetch-depth: 0
91 + submodules: recursive
92 + - name: Mark Stable
93 + if: github.event_name == 'workflow_dispatch' && github.event.inputs.type != 'nightly'
94 + run: |
95 + sed -i 's/^RELEASE_CHANNEL="nightly" *#/RELEASE_CHANNEL="stable" #/' netdata-installer.sh packaging/makeself/install-or-update.sh
96 + - name: Build
97 + run: .github/scripts/build-static.sh ${{ matrix.arch }}
98 + - name: Store
99 + uses: actions/upload-artifact@v2
100 + with:
101 + name: static-archive
102 + path: artifacts/*.gz.run
103 + retention-days: 30
104 + - name: Failure Notification
105 + uses: rtCamp/action-slack-notify@v2
106 + env:
107 + SLACK_COLOR: 'danger'
108 + SLACK_FOOTER: ''
109 + SLACK_ICON_EMOJI: ':github-actions:'
110 + SLACK_TITLE: 'Static build for ${{ matrix.arch }} failed:'
111 + SLACK_USERNAME: 'GitHub Actions'
112 + SLACK_MESSAGE: "Static build for ${{ matrix.arch }} failed."
113 + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
114 + if: >-
115 + ${{
116 + failure()
117 + && startsWith(github.ref, 'refs/heads/master')
118 + && github.event_name != 'pull_request'
119 + }}
120 +
121 + matrix: # Generate the shared build matrix for our build tests.
122 + name: Prepare Build Matrix
123 + runs-on: ubuntu-latest
124 + outputs:
125 + matrix: ${{ steps.set-matrix.outputs.matrix }}
126 + steps:
127 + - name: Checkout
128 + uses: actions/checkout@v2
129 + - name: Prepare tools
130 + run: |
131 + sudo apt-get update && sudo apt-get install -y jq
132 + - name: Read build matrix
133 + id: set-matrix
134 + run: |
135 + TASKS="$(jq -c . .github/data/build-matrix.json)"
136 + echo "Generated Matrix: $TASKS"
137 + echo "::set-output name=matrix::$TASKS"
138 +
139 + prepare-test-images: # Prepare the test environments for our build checks. This also checks dependency handling code for each tested environment.
140 + name: Prepare Test Environments
141 + runs-on: ubuntu-latest
142 + needs:
143 + - matrix
144 + strategy:
145 + # Unlike the actal build tests, this completes _very_ fast (average of about 3 minutes for each job), so we
146 + # just run everything in parallel instead lof limiting job concurrency.
147 + fail-fast: false
148 + matrix: ${{ fromJson(needs.matrix.outputs.matrix) }}
149 + steps:
150 + - name: Git clone repository
151 + uses: actions/checkout@v2
152 + - name: Setup Buildx
153 + uses: docker/setup-buildx-action@v1
154 + - name: Build test environment
155 + uses: docker/build-push-action@v2
156 + with:
157 + push: false
158 + load: false
159 + file: .github/dockerfiles/Dockerfile.build_test
160 + build-args: |
161 + BASE=${{ matrix.distro }}
162 + PRE=${{ matrix.pre }}
163 + RMJSONC=${{ matrix.rmjsonc }}
164 + outputs: type=oci,dest=/tmp/image.tar
165 + tags: test:${{ matrix.artifact_key }}
166 + - name: Upload image artifact
167 + uses: actions/upload-artifact@v2
168 + with:
169 + name: ${{ matrix.artifact_key }}-test-env
170 + path: /tmp/image.tar
171 + retention-days: 30
172 + - name: Failure Notification
173 + uses: rtCamp/action-slack-notify@v2
174 + env:
175 + SLACK_COLOR: 'danger'
176 + SLACK_FOOTER: ''
177 + SLACK_ICON_EMOJI: ':github-actions:'
178 + SLACK_TITLE: 'Test environment preparation for ${{ matrix.distro }} failed:'
179 + SLACK_USERNAME: 'GitHub Actions'
180 + SLACK_MESSAGE: "Test environment preparation for ${{ matrix.distro }} failed."
181 + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
182 + if: >-
183 + ${{
184 + failure()
185 + && startsWith(github.ref, 'refs/heads/master')
186 + && github.event_name != 'pull_request'
187 + }}
188 +
189 + source-build: # Test various source build arrangements.
190 + name: Test Source Build
191 + runs-on: ubuntu-latest
192 + needs:
193 + - matrix
194 + - prepare-test-images
195 + strategy:
196 + fail-fast: false
197 + max-parallel: 8
198 + matrix: ${{ fromJson(needs.matrix.outputs.matrix) }}
199 + steps:
200 + - name: Git clone repository
201 + uses: actions/checkout@v2
202 + with:
203 + submodules: recursive
204 + - name: Fetch test environment
205 + uses: actions/download-artifact@v2
206 + with:
207 + name: ${{ matrix.artifact_key }}-test-env
208 + - name: Load test environment
209 + id: load
210 + run: |
211 + docker load --input image.tar | tee image-info.txt
212 + echo "::set-output name=image::$(cut -d ':' -f 3 image-info.txt)"
213 + - name: Regular build on ${{ matrix.distro }}
214 + run: |
215 + docker run --security-opt seccomp=unconfined -w /netdata sha256:${{ steps.load.outputs.image }} \
216 + /bin/sh -c 'autoreconf -ivf && ./configure && make -j2'
217 + - name: netdata-installer on ${{ matrix.distro }}, disable cloud
218 + run: |
219 + docker run --security-opt seccomp=unconfined -w /netdata sha256:${{ steps.load.outputs.image }} \
220 + /bin/sh -c './netdata-installer.sh --dont-wait --dont-start-it --disable-cloud'
221 + - name: netdata-installer on ${{ matrix.distro }}, require cloud
222 + run: |
223 + docker run --security-opt seccomp=unconfined -w /netdata sha256:${{ steps.load.outputs.image }} \
224 + /bin/sh -c './netdata-installer.sh --dont-wait --dont-start-it --require-cloud'
225 + - name: netdata-installer on ${{ matrix.distro }}, require cloud, require ACLK-NG
226 + run: |
227 + docker run --security-opt seccomp=unconfined -w /netdata -e NETDATA_CONFIGURE_OPTIONS='--with-aclk-ng' \
228 + sha256:${{ steps.load.outputs.image }} /bin/sh -c './netdata-installer.sh --dont-wait --dont-start-it --require-cloud'
229 + - name: netdata-installer on ${{ matrix.distro }}, require cloud, no JSON-C
230 + if: matrix.rmjsonc != ''
231 + run: |
232 + docker run --security-opt seccomp=unconfined -w /netdata sha256:${{ steps.load.outputs.image }} \
233 + /bin/sh -c '/rmjsonc.sh && ./netdata-installer.sh --dont-wait --dont-start-it --require-cloud'
234 + - name: Failure Notification
235 + uses: rtCamp/action-slack-notify@v2
236 + env:
237 + SLACK_COLOR: 'danger'
238 + SLACK_FOOTER: ''
239 + SLACK_ICON_EMOJI: ':github-actions:'
240 + SLACK_TITLE: 'Build tests for ${{ matrix.distro }} failed:'
241 + SLACK_USERNAME: 'GitHub Actions'
242 + SLACK_MESSAGE: "Build tests for ${{ matrix.distro }} failed."
243 + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
244 + if: >-
245 + ${{
246 + failure()
247 + && startsWith(github.ref, 'refs/heads/master')
248 + && github.event_name != 'pull_request'
249 + }}
250 +
251 + updater-check: # Test the generated dist archive using the updater code.
252 + name: Test Generated Distfile and Updater Code
253 + runs-on: ubuntu-latest
254 + needs:
255 + - build-dist
256 + - matrix
257 + - prepare-test-images
258 + strategy:
259 + fail-fast: false
260 + max-parallel: 8
261 + matrix: ${{ fromJson(needs.matrix.outputs.matrix) }}
262 + services:
263 + apache: # This gets used to serve the dist tarball for the updater script.
264 + image: httpd:2.4
265 + ports:
266 + - 8080:80
267 + volumes:
268 + - ${{ github.workspace }}:/usr/local/apache2/htdocs/
269 + steps:
270 + - name: Checkout
271 + uses: actions/checkout@v2
272 + - name: Fetch dist tarball artifacts
273 + uses: actions/download-artifact@v2
274 + with:
275 + name: dist-tarball
276 + path: dist-tarball
277 + - name: Prepare artifact directory
278 + run: |
279 + mkdir -p artifacts || exit 1
280 + echo "9999.0.0-0" > artifacts/latest-version.txt || exit 1
281 + cp dist-tarball/* artifacts || exit 1
282 + cd artifacts || exit 1
283 + ln -s ${{ needs.build-dist.outputs.distfile }} netdata-latest.tar.gz || exit 1
284 + sha256sum -b ./* > "sha256sums.txt" || exit 1
285 + cat sha256sums.txt
286 + - name: Fetch test environment
287 + uses: actions/download-artifact@v2
288 + with:
289 + name: ${{ matrix.artifact_key }}-test-env
290 + - name: Load test environment
291 + id: load
292 + run: |
293 + docker load --input image.tar | tee image-info.txt
294 + echo "::set-output name=image::$(cut -d ':' -f 3 image-info.txt)"
295 + - name: Install netdata and run the updater on ${{ matrix.distro }}
296 + run: |
297 + docker run --security-opt seccomp=unconfined -e DO_NOT_TRACK=1 --network host -w /netdata sha256:${{ steps.load.outputs.image }} \
298 + /netdata/.github/scripts/run-updater-check.sh
299 + - name: Failure Notification
300 + uses: rtCamp/action-slack-notify@v2
301 + env:
302 + SLACK_COLOR: 'danger'
303 + SLACK_FOOTER: ''
304 + SLACK_ICON_EMOJI: ':github-actions:'
305 + SLACK_TITLE: 'Updater checks for ${{ matrix.distro }} failed:'
306 + SLACK_USERNAME: 'GitHub Actions'
307 + SLACK_MESSAGE: "Updater checks for ${{ matrix.distro }} failed."
308 + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
309 + if: >-
310 + ${{
311 + failure()
312 + && startsWith(github.ref, 'refs/heads/master')
313 + && github.event_name != 'pull_request'
314 + }}
315 +
316 + prepare-upload: # Consolidate the artifacts for uploading or releasing.
317 + name: Prepare Artifacts
318 + runs-on: ubuntu-latest
319 + needs:
320 + - build-dist
321 + - build-static
322 + steps:
323 + - name: Checkout
324 + uses: actions/checkout@v2
325 + - name: Prepare Environment
326 + run: mkdir -p artifacts
327 + - name: Retrieve Dist Tarball
328 + uses: actions/download-artifact@v2
329 + with:
330 + name: dist-tarball
331 + path: dist-tarball
332 + - name: Retrieve Static Build Artifacts
333 + uses: actions/download-artifact@v2
334 + with:
335 + name: static-archive
336 + path: static-archive
337 + - name: Prepare Artifacts
338 + working-directory: ./artifacts/
339 + run: |
340 + mv ../dist-tarball/* . || exit 1
341 + mv ../static-archive/* . || exit 1
342 + ln -s ${{ needs.build-dist.outputs.distfile }} netdata-latest.tar.gz || exit 1
343 + cp ../packaging/version ./latest-version.txt || exit 1
344 + sha256sum -b ./* > sha256sums.txt || exit 1
345 + cat sha256sums.txt
346 + - name: Store Artifacts
347 + uses: actions/upload-artifact@v2
348 + with:
349 + name: final-artifacts
350 + path: artifacts/*
351 + retention-days: 30
352 + - name: Failure Notification
353 + uses: rtCamp/action-slack-notify@v2
354 + env:
355 + SLACK_COLOR: 'danger'
356 + SLACK_FOOTER: ''
357 + SLACK_ICON_EMOJI: ':github-actions:'
358 + SLACK_TITLE: 'Failed to prepare release artifacts for upload:'
359 + SLACK_USERNAME: 'GitHub Actions'
360 + SLACK_MESSAGE: "Failed to prepare release artifacts for upload."
361 + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
362 + if: >-
363 + ${{
364 + failure()
365 + && startsWith(github.ref, 'refs/heads/master')
366 + && github.event_name != 'pull_request'
367 + }}
368 +
369 + artifact-verification-dist: # Verify the regular installer works with the consolidated artifacts.
370 + name: Test Consolidated Artifacts (Source)
371 + runs-on: ubuntu-latest
372 + needs:
373 + - prepare-upload
374 + services:
375 + apache: # This gets used to serve the dist tarball for the updater script.
376 + image: httpd:2.4
377 + ports:
378 + - 8080:80
379 + volumes:
380 + - ${{ github.workspace }}:/usr/local/apache2/htdocs/
381 + steps:
382 + - name: Checkout
383 + uses: actions/checkout@v2
384 + - name: Fetch artifacts
385 + uses: actions/download-artifact@v2
386 + with:
387 + name: final-artifacts
388 + path: artifacts
389 + - name: Verify that artifacts work with installer
390 + env:
391 + NETDATA_TARBALL_BASEURL: http://localhost:8080/artifacts
392 + run: packaging/installer/kickstart.sh --dont-start-it --disable-telemetry --dont-wait
393 + - name: Failure Notification
394 + uses: rtCamp/action-slack-notify@v2
395 + env:
396 + SLACK_COLOR: 'danger'
397 + SLACK_FOOTER: ''
398 + SLACK_ICON_EMOJI: ':github-actions:'
399 + SLACK_TITLE: 'Artifact verification for source tarball failed.'
400 + SLACK_USERNAME: 'GitHub Actions'
401 + SLACK_MESSAGE: "Artifact verification for source tarball failed."
402 + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
403 + if: >-
404 + ${{
405 + failure()
406 + && startsWith(github.ref, 'refs/heads/master')
407 + && github.event_name != 'pull_request'
408 + }}
409 +
410 + artifact-verification-static: # Verify the static installer works with the consolidated artifacts.
411 + name: Test Consolidated Artifacts (Static)
412 + runs-on: ubuntu-latest
413 + needs:
414 + - prepare-upload
415 + services:
416 + apache: # This gets used to serve the static archives.
417 + image: httpd:2.4
418 + ports:
419 + - 8080:80
420 + volumes:
421 + - ${{ github.workspace }}:/usr/local/apache2/htdocs/
422 + steps:
423 + - name: Checkout
424 + uses: actions/checkout@v2
425 + - name: Fetch artifacts
426 + uses: actions/download-artifact@v2
427 + with:
428 + name: final-artifacts
429 + path: artifacts
430 + - name: Verify that artifacts work with installer
431 + env:
432 + NETDATA_TARBALL_BASEURL: http://localhost:8080/artifacts
433 + run: packaging/installer/kickstart-static64.sh --dont-start-it --disable-telemetry
434 + - name: Failure Notification
435 + uses: rtCamp/action-slack-notify@v2
436 + env:
437 + SLACK_COLOR: 'danger'
438 + SLACK_FOOTER: ''
439 + SLACK_ICON_EMOJI: ':github-actions:'
440 + SLACK_TITLE: 'Artifact verification for static build failed.'
441 + SLACK_USERNAME: 'GitHub Actions'
442 + SLACK_MESSAGE: "Artifact verification for static build failed."
443 + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
444 + if: >-
445 + ${{
446 + failure()
447 + && startsWith(github.ref, 'refs/heads/master')
448 + && github.event_name != 'pull_request'
449 + }}
450 +
451 + upload-nightly: # Upload the nightly build artifacts to GCS.
452 + name: Upload Nightly Artifacts
453 + runs-on: ubuntu-latest
454 + if: github.event_name == 'workflow_dispatch' && github.event.inputs.type == 'nightly'
455 + needs:
456 + - updater-check
457 + - source-build
458 + - artifact-verification-dist
459 + - artifact-verification-static
460 + steps:
461 + - name: Retrieve Artifacts
462 + uses: actions/download-artifact@v2
463 + with:
464 + name: final-artifacts
465 + path: final-artifacts
466 + - name: Setup Gcloud
467 + uses: google-github-actions/setup-gcloud@v0.2.1
468 + with:
469 + project_id: ${{ secrets.GCP_NIGHTLY_STORAGE_PROJECT }}
470 + service_account_key: ${{ secrets.GCP_STORAGE_SERVICE_ACCOUNT_KEY }}
471 + export_default_credentials: true
472 + - name: Upload Artifacts
473 + uses: google-github-actions/upload-cloud-storage@v0.4.0
474 + with:
475 + destination: ${{ secrets.GCP_NIGHTLY_STORAGE_BUCKET }}
476 + gzip: false
477 + path: ./final-artifacts
478 + parent: false
479 + - name: Failure Notification
480 + uses: rtCamp/action-slack-notify@v2
481 + env:
482 + SLACK_COLOR: 'danger'
483 + SLACK_FOOTER: ''
484 + SLACK_ICON_EMOJI: ':github-actions:'
485 + SLACK_TITLE: 'Failed to upload nightly release artifacts:'
486 + SLACK_USERNAME: 'GitHub Actions'
487 + SLACK_MESSAGE: "Failed to upload nightly release artifacts."
488 + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
489 + if: >-
490 + ${{
491 + failure()
492 + && startsWith(github.ref, 'refs/heads/master')
493 + && github.event_name != 'pull_request'
494 + }}
495 +
496 + upload-release: # Create the draft release and upload the build artifacts.
497 + name: Create Release Draft
498 + runs-on: ubuntu-latest
499 + if: github.event_name == 'workflow_dispatch' && github.event.inputs.type == 'release'
500 + needs:
501 + - updater-check
502 + - source-build
503 + - artifact-verification-dist
504 + - artifact-verification-static
505 + steps:
506 + - name: Checkout
507 + uses: actions/checkout@v2
508 + - name: Retrieve Artifacts
509 + uses: actions/download-artifact@v2
510 + with:
511 + name: final-artifacts
512 + path: final-artifacts
513 + - name: Create Release
514 + uses: ncipollo/release-action@v1
515 + with:
516 + allowUpdates: false
517 + artifactErrorsFailBuild: true
518 + artifacts: 'final-artifacts/sha256sums.txt,final-artifacts/netdata-*.tar.gz,final-artifacts/netdata-*.gz.run'
519 + draft: true
520 + tag: ${{ github.event.inputs.version }}
521 + token: ${{ secrets.NETDATABOT_TOKEN }}
522 + - name: Failure Notification
523 + uses: rtCamp/action-slack-notify@v2
524 + env:
525 + SLACK_COLOR: 'danger'
526 + SLACK_FOOTER: ''
527 + SLACK_ICON_EMOJI: ':github-actions:'
528 + SLACK_TITLE: 'Failed to draft release:'
529 + SLACK_USERNAME: 'GitHub Actions'
530 + SLACK_MESSAGE: "Failed to draft release."
531 + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
532 + if: >-
533 + ${{
534 + failure()
535 + && startsWith(github.ref, 'refs/heads/master')
536 + && github.event_name == 'workflow_dispatch'
537 + }}
.github/workflows/release-build.yml deleted
-257
@@ -1,257 +0,0 @@
1 ----
2 -# Ci code for building release artifacts.
3 -name: Release Build
4 -on:
5 - push: # Master branch checks only validate the build and generate artifacts for testing.
6 - branches:
7 - - master
8 - pull_request: null # PR checks only validate the build and generate artifacts for testing.
9 - workflow_dispatch:
10 - inputs:
11 - type:
12 - description: Build Type
13 - default: nightly
14 - required: true
15 - version:
16 - description: Version Tag
17 - default: nightly
18 - required: true
19 -concurrency:
20 - group: release-${{ github.ref }}-${{ github.event_name }}
21 - cancel-in-progress: true
22 -jobs:
23 - build-dist: # Build the distribution tarball and store it as an artifact.
24 - name: Build Distribution Tarball
25 - runs-on: ubuntu-latest
26 - outputs:
27 - distfile: ${{ steps.build.outputs.distfile }}
28 - steps:
29 - - name: Checkout
30 - uses: actions/checkout@v2
31 - with:
32 - fetch-depth: 0
33 - submodules: recursive
34 - - name: Mark Stable
35 - if: github.event_name == 'workflow_dispatch' && github.event.inputs.type != 'nightly'
36 - run: |
37 - sed -i 's/^RELEASE_CHANNEL="nightly" *#/RELEASE_CHANNEL="stable" #/' netdata-installer.sh
38 - - name: Build
39 - id: build
40 - run: |
41 - mkdir -p artifacts
42 - ./packaging/installer/install-required-packages.sh --dont-wait --non-interactive netdata-all
43 - autoreconf -ivf
44 - ./configure --prefix=/usr \
45 - --sysconfdir=/etc \
46 - --localstatedir=/var \
47 - --libexecdir=/usr/libexec \
48 - --with-zlib \
49 - --with-math \
50 - --with-user=netdata
51 - make dist
52 - echo "::set-output name=distfile::$(find . -name 'netdata-*.tar.gz')"
53 - cp netdata-*.tar.gz artifacts/
54 - - name: Test
55 - run: |
56 - .github/scripts/run_install_with_dist_file.sh ${{ steps.build.outputs.distfile }}
57 - - name: Store
58 - uses: actions/upload-artifact@v2
59 - with:
60 - name: dist-tarball
61 - path: artifacts/*.tar.gz
62 - retention-days: 30
63 - - name: Failure Notification
64 - uses: rtCamp/action-slack-notify@v2
65 - env:
66 - SLACK_COLOR: 'danger'
67 - SLACK_FOOTER: ''
68 - SLACK_ICON_EMOJI: ':github-actions:'
69 - SLACK_TITLE: 'Distribution tarball build failed:'
70 - SLACK_USERNAME: 'GitHub Actions'
71 - SLACK_MESSAGE: "Distribution tarball build failed."
72 - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
73 - if: >-
74 - ${{
75 - failure()
76 - && startsWith(github.ref, 'refs/heads/master')
77 - && github.event_name != 'pull_request'
78 - }}
79 -
80 - build-static: # Build the static binary archives, and store them as artifacts.
81 - name: Build Static
82 - runs-on: ubuntu-latest
83 - strategy:
84 - matrix:
85 - arch:
86 - - 'x86_64'
87 - - 'armv7l'
88 - - 'aarch64'
89 - steps:
90 - - name: Checkout
91 - uses: actions/checkout@v2
92 - with:
93 - fetch-depth: 0
94 - submodules: recursive
95 - - name: Mark Stable
96 - if: github.event_name == 'workflow_dispatch' && github.event.inputs.type != 'nightly'
97 - run: |
98 - sed -i 's/^RELEASE_CHANNEL="nightly" *#/RELEASE_CHANNEL="stable" #/' netdata-installer.sh packaging/makeself/install-or-update.sh
99 - - name: Build
100 - run: .github/scripts/build-static.sh ${{ matrix.arch }}
101 - - name: Store
102 - uses: actions/upload-artifact@v2
103 - with:
104 - name: static-archive
105 - path: artifacts/*.gz.run
106 - retention-days: 30
107 - - name: Failure Notification
108 - uses: rtCamp/action-slack-notify@v2
109 - env:
110 - SLACK_COLOR: 'danger'
111 - SLACK_FOOTER: ''
112 - SLACK_ICON_EMOJI: ':github-actions:'
113 - SLACK_TITLE: 'Static build for ${{ matrix.arch }} failed:'
114 - SLACK_USERNAME: 'GitHub Actions'
115 - SLACK_MESSAGE: "Static build for ${{ matrix.arch }} failed."
116 - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
117 - if: >-
118 - ${{
119 - failure()
120 - && startsWith(github.ref, 'refs/heads/master')
121 - && github.event_name != 'pull_request'
122 - }}
123 -
124 - prepare-upload: # Consolidate the artifacts for uploading or releasing.
125 - name: Prepare Artifacts
126 - if: github.event_name == 'workflow_dispatch'
127 - runs-on: ubuntu-latest
128 - needs:
129 - - build-dist
130 - - build-static
131 - steps:
132 - - name: Checkout
133 - uses: actions/checkout@v2
134 - - name: Prepare Environment
135 - run: mkdir -p artifacts
136 - - name: Retrieve Dist Tarball
137 - uses: actions/download-artifact@v2
138 - with:
139 - name: dist-tarball
140 - path: dist-tarball
141 - - name: Retrieve Static Build Artifacts
142 - uses: actions/download-artifact@v2
143 - with:
144 - name: static-archive
145 - path: static-archive
146 - - name: Prepare Artifacts
147 - working-directory: ./artifacts/
148 - run: |
149 - mv ../dist-tarball/* .
150 - mv ../static-archive/* .
151 - ln -s ${{ needs.build-dist.outputs.distfile }} netdata-latest.tar.gz
152 - cp ../packaging/version ./latest-version.txt
153 - sha256sum -b ./* > sha256sums.txt
154 - - name: Store Artifacts
155 - uses: actions/upload-artifact@v2
156 - with:
157 - name: final-artifacts
158 - path: artifacts/*
159 - retention-days: 30
160 - - name: Failure Notification
161 - uses: rtCamp/action-slack-notify@v2
162 - env:
163 - SLACK_COLOR: 'danger'
164 - SLACK_FOOTER: ''
165 - SLACK_ICON_EMOJI: ':github-actions:'
166 - SLACK_TITLE: 'Failed to prepare release artifacts for upload:'
167 - SLACK_USERNAME: 'GitHub Actions'
168 - SLACK_MESSAGE: "Failed to prepare release artifacts for upload."
169 - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
170 - if: >-
171 - ${{
172 - failure()
173 - && startsWith(github.ref, 'refs/heads/master')
174 - && github.event_name != 'pull_request'
175 - }}
176 -
177 - upload-nightly: # Upload the nightly build artifacts to GCS.
178 - name: Upload Nightly Artifacts
179 - runs-on: ubuntu-latest
180 - if: github.event_name == 'workflow_dispatch' && github.event.inputs.type == 'nightly'
181 - needs:
182 - - prepare-upload
183 - steps:
184 - - name: Retrieve Artifacts
185 - uses: actions/download-artifact@v2
186 - with:
187 - name: final-artifacts
188 - path: final-artifacts
189 - - name: Setup Gcloud
190 - uses: google-github-actions/setup-gcloud@v0.2.1
191 - with:
192 - project_id: ${{ secrets.GCP_NIGHTLY_STORAGE_PROJECT }}
193 - service_account_key: ${{ secrets.GCP_STORAGE_SERVICE_ACCOUNT_KEY }}
194 - export_default_credentials: true
195 - - name: Upload Artifacts
196 - uses: google-github-actions/upload-cloud-storage@v0.4.0
197 - with:
198 - destination: ${{ secrets.GCP_NIGHTLY_STORAGE_BUCKET }}
199 - gzip: false
200 - path: ./final-artifacts
201 - parent: false
202 - - name: Failure Notification
203 - uses: rtCamp/action-slack-notify@v2
204 - env:
205 - SLACK_COLOR: 'danger'
206 - SLACK_FOOTER: ''
207 - SLACK_ICON_EMOJI: ':github-actions:'
208 - SLACK_TITLE: 'Failed to upload nightly release artifacts:'
209 - SLACK_USERNAME: 'GitHub Actions'
210 - SLACK_MESSAGE: "Failed to upload nightly release artifacts."
211 - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
212 - if: >-
213 - ${{
214 - failure()
215 - && startsWith(github.ref, 'refs/heads/master')
216 - && github.event_name != 'pull_request'
217 - }}
218 -
219 - upload-release: # Create the draft release and upload the build artifacts.
220 - name: Create Release Draft
221 - runs-on: ubuntu-latest
222 - if: github.event_name == 'workflow_dispatch' && github.event.inputs.type == 'release'
223 - needs:
224 - - prepare-upload
225 - steps:
226 - - name: Checkout
227 - uses: actions/checkout@v2
228 - - name: Retrieve Artifacts
229 - uses: actions/download-artifact@v2
230 - with:
231 - name: final-artifacts
232 - path: final-artifacts
233 - - name: Create Release
234 - uses: ncipollo/release-action@v1
235 - with:
236 - allowUpdates: false
237 - artifactErrorsFailBuild: true
238 - artifacts: 'final-artifacts/sha256sums.txt,final-artifacts/netdata-*.tar.gz,final-artifacts/netdata-*.gz.run'
239 - draft: true
240 - tag: ${{ github.event.inputs.version }}
241 - token: ${{ secrets.NETDATABOT_TOKEN }}
242 - - name: Failure Notification
243 - uses: rtCamp/action-slack-notify@v2
244 - env:
245 - SLACK_COLOR: 'danger'
246 - SLACK_FOOTER: ''
247 - SLACK_ICON_EMOJI: ':github-actions:'
248 - SLACK_TITLE: 'Failed to draft release:'
249 - SLACK_USERNAME: 'GitHub Actions'
250 - SLACK_MESSAGE: "Failed to draft release."
251 - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
252 - if: >-
253 - ${{
254 - failure()
255 - && startsWith(github.ref, 'refs/heads/master')
256 - && github.event_name == 'workflow_dispatch'
257 - }}
.github/workflows/updater.yml deleted
-95
@@ -1,95 +0,0 @@
1 ----
2 -name: Updater
3 -on:
4 - push:
5 - branches:
6 - - master
7 - pull_request:
8 - branches:
9 - - master
10 -
11 -env:
12 - DO_NOT_TRACK: 1
13 -
14 -concurrency:
15 - group: updater-${{ github.ref }}
16 - cancel-in-progress: true
17 -
18 -jobs:
19 - source-build:
20 - name: Install, Build & Update
21 - strategy:
22 - fail-fast: false
23 - max-parallel: 8
24 - matrix:
25 - distro:
26 - - 'alpine:3.14'
27 - - 'alpine:3.13'
28 - - 'alpine:3.12'
29 - - 'archlinux:latest'
30 - - 'centos:7'
31 - - 'centos:8'
32 - - 'debian:9'
33 - - 'debian:10'
34 - - 'debian:bullseye' # 11
35 - - 'fedora:33'
36 - - 'fedora:34'
37 - - 'fedora:35'
38 - - 'ubuntu:18.04'
39 - - 'ubuntu:20.04'
40 - - 'ubuntu:21.04'
41 - - 'ubuntu:21.10'
42 - include:
43 - - distro: 'alpine:3.14'
44 - pre: 'apk add -U bash'
45 - - distro: 'alpine:3.13'
46 - pre: 'apk add -U bash'
47 - - distro: 'alpine:3.12'
48 - pre: 'apk add -U bash'
49 - - distro: 'debian:9'
50 - pre: 'apt-get update'
51 - - distro: 'debian:10'
52 - pre: 'apt-get update'
53 - - distro: 'debian:bullseye' # 11
54 - pre: 'apt-get update'
55 - - distro: 'ubuntu:18.04'
56 - pre: 'apt-get update'
57 - - distro: 'ubuntu:20.04'
58 - pre: 'apt-get update'
59 - - distro: 'ubuntu:21.04'
60 - pre: 'apt-get update'
61 - - distro: 'ubuntu:21.10'
62 - pre: 'rm -f /etc/apt/apt.conf.d/docker* && apt-get update'
63 - runs-on: ubuntu-latest
64 - steps:
65 - - name: Git clone repository
66 - uses: actions/checkout@v2
67 - with:
68 - submodules: recursive
69 - - name: Install required packages & build tarball
70 - run: |
71 - ./packaging/installer/install-required-packages.sh --dont-wait --non-interactive netdata-all
72 - .github/scripts/build-dist.sh
73 - - name: Run a dockerised web server to serve files used by the custom update script
74 - run: |
75 - docker run -dit --name my-apache-app -p 8080:80 -v "$PWD":/usr/local/apache2/htdocs/ httpd:2.4
76 - - name: Replace URLs in updater script to point at the local web server
77 - run: |
78 - ORIG_TARBALL="export NETDATA_TARBALL_URL=.*"
79 - ORIG_CHECKSUM="export NETDATA_TARBALL_CHECKSUM_URL=.*"
80 - CURRENT_VERSION="current_version=.*"
81 - NEW_TARBALL="export NETDATA_TARBALL_URL=http://localhost:8080/artifacts/netdata-latest.tar.gz"
82 - NEW_CHECKSUM="export NETDATA_TARBALL_CHECKSUM_URL=http://localhost:8080/artifacts/sha256sums.txt"
83 - sed -i "s|${ORIG_TARBALL}|${NEW_TARBALL}|g" packaging/installer/netdata-updater.sh
84 - sed -i "s|${ORIG_CHECKSUM}|${NEW_CHECKSUM}|g" packaging/installer/netdata-updater.sh
85 - sed -i "s|"current_version=.*"|"current_version=1"|g" packaging/installer/netdata-updater.sh
86 - - name: Install netdata and run the updater on ${{ matrix.distro }}
87 - env:
88 - PRE: ${{ matrix.pre }}
89 - run: |
90 - echo $PRE > ./prep-cmd.sh
91 - docker build . -f .github/dockerfiles/Dockerfile.build_test -t test --build-arg BASE=${{ matrix.distro }}
92 - docker run --security-opt seccomp=unconfined -e DO_NOT_TRACK=1 --network host -w /netdata test \
93 - /bin/sh -c '/netdata/packaging/installer/kickstart.sh --dont-wait \
94 - && /netdata/packaging/installer/netdata-updater.sh --not-running-from-cron --no-updater-self-update \
95 - && bash /netdata/.github/scripts/check-updater.sh'
.travis/trigger_artifact_build.sh
+1 -1
@@ -7,7 +7,7 @@ type="${3}"
7 resp="$(curl -X POST \
8 -H 'Accept: application/vnd.github.v3+json' \
9 -H "Authorization: Bearer ${token}" \
10 - "https://api.github.com/repos/netdata/netdata/actions/workflows/release-build.yml/dispatches" \
10 + "https://api.github.com/repos/netdata/netdata/actions/workflows/build.yml/dispatches" \
11 -d "{\"ref\": \"master\", \"inputs\": {\"version\": \"${version}\", \"type\": \"${type}\"}}")"
12
13 if [ -z "${resp}" ]; then