@cryptotaxi247 / netdata-1 / commits / 597f08dee

Assorted infrastructure cleanup. (#14223)

* Remove old documentation check related config files. These are no longer used by any of our CI as far as I can tell. * Purge LGTM configuration and references. It has been fully shut down, so none of this works anymore. * Purge Travis CI config, scripts, and references. We are no longer using Travis CI, so all of this is useless. * Pureg config for other CI tools we are no longer using. * Remove old packaging related test scripts. These haven’t been used in years, and are potentially confusing for new contributors. * Restore MLC configuration. It is, in fact, still in use. * Fix bogus CI config in dist files. * Fix botched merge in CODEOWNERS.

Austin S. Hemmelgarn committed Jan 25, 2023 at 11:10 UTC 597f08dee6d8cbfdcc24fa89a37c710b237f06da
34 files changed +3 -1275
.csslintrc deleted
-2
@@ -1,2 +0,0 @@
1 ---exclude-exts=.min.css
2 ---ignore=adjoining-classes,box-model,ids,order-alphabetical,unqualified-attributes
.github/CODEOWNERS
-2
@@ -5,7 +5,6 @@
5 * @Ferroin
6
7 # Ownership by directory structure
8 -.travis/ @Ferroin @tkatsoulas
8 .github/ @Ferroin @tkatsoulas
9 aclk/ @stelfrag @underhood
10 build/ @Ferroin @tkatsoulas
@@ -41,7 +40,6 @@ Dockerfile* @Ferroin @tkatsoulas
40
41 # Ownership of specific files
42 .gitignore @Ferroin @tkatsoulas @vkalintiris
44 -.travis.yml @Ferroin @tkatsoulas
43 .eslintrc @Ferroin @tkatsoulas
44 .eslintignore @Ferroin @tkatsoulas
45 .csslintrc @Ferroin @tkatsoulas
.github/labeler.yml
-2
@@ -34,8 +34,6 @@ area/build:
34 - "**/Makefile.am"
35
36 area/ci:
37 - - .travis/*
38 - - .travis/**/*
37 - .github/*
38 - .github/**/*
39
.remarkignore deleted
-1
@@ -1 +0,0 @@
1 -CHANGELOG.md
\ No newline at end of file
.remarkrc.js deleted
-111
@@ -1,111 +0,0 @@
1 -// Source: https://github.com/codacy/codacy-remark-lint/raw/master/.remarkrc.js
2 -
3 -exports.settings = {
4 - gfm: true,
5 - commonmark: true,
6 - looseTable: false,
7 - spacedTable: false,
8 - paddedTable: false,
9 - fences: true,
10 - rule: "-",
11 - ruleRepetition: 3,
12 - emphasis: "*",
13 - strong: "*",
14 - bullet: "-",
15 - listItemIndent: "1",
16 - incrementListMarker: true
17 -};
18 -
19 -const remarkPresetLintMarkdownStyleGuide = {
20 - plugins: require("remark-preset-lint-markdown-style-guide").plugins.filter(
21 - function(elem) {
22 - return elem != require("remark-lint-no-duplicate-headings");
23 - }
24 - )
25 -};
26 -
27 -exports.plugins = [
28 - require("remark-preset-lint-consistent"),
29 - require("remark-preset-lint-recommended"),
30 - remarkPresetLintMarkdownStyleGuide,
31 - [require("remark-lint-no-dead-urls"), { skipOffline: true }],
32 - require("remark-lint-heading-whitespace"),
33 - [require("remark-lint-maximum-line-length"), 120],
34 - [require("remark-lint-maximum-heading-length"), 120],
35 - [require("remark-lint-list-item-indent"), "tab-size"],
36 - [require("remark-lint-list-item-spacing"), false],
37 - [require("remark-lint-strong-marker"), "*"],
38 - [require("remark-lint-emphasis-marker"), "_"],
39 - [require("remark-lint-unordered-list-marker-style"), "-"],
40 - [require("remark-lint-ordered-list-marker-style"), "."],
41 - [require("remark-lint-ordered-list-marker-value"), "ordered"],
42 - /*[
43 - require("remark-lint-write-good"),
44 - [
45 - "warn",
46 - {
47 - passive: false,
48 - illusion: true,
49 - so: true,
50 - thereIs: true,
51 - weasel: true,
52 - adverb: true,
53 - tooWordy: true,
54 - cliches: true,
55 - eprime: false
56 - }
57 - ]
58 - ],*/
59 - require("remark-validate-links"),
60 - require("remark-frontmatter"),
61 - /*[
62 - require("remark-retext"),
63 - require("unified")().use({
64 - plugins: [
65 - require("retext-english"),
66 - require("retext-syntax-urls"),
67 - [
68 - require("retext-spell"),
69 - {
70 - ignoreLiteral: true,
71 - dictionary: require("dictionary-en-us"),
72 - ...personalDictionary
73 - }
74 - ],
75 - [
76 - require("retext-sentence-spacing"),
77 - {
78 - preferred: 1
79 - }
80 - ],
81 - require("retext-repeated-words"),
82 - require("retext-usage"),
83 - require("retext-indefinite-article"),
84 - require("retext-redundant-acronyms"),
85 - [
86 - require("retext-contractions"),
87 - {
88 - straight: true,
89 - allowLiteral: true
90 - }
91 - ],
92 - require("retext-diacritics"),
93 - [
94 - require("retext-quotes"),
95 - {
96 - preferred: "straight"
97 - }
98 - ],
99 - require("retext-equality"),
100 - require("retext-passive"),
101 - require("retext-profanities"),
102 - [
103 - require("retext-readability"),
104 - {
105 - age: 20
106 - }
107 - ]
108 - ]
109 - })
110 - ]*/
111 -];
.squash.yml deleted
-7
@@ -1,7 +0,0 @@
1 -deployments:
2 - netdata:
3 - auto_deploy_on_commits: true
4 - filename: ./packaging/docker/Dockerfile
5 - context_path: ./
6 - port_forwarding: 80:19999
7 - run_options: -v /proc:/host/proc:ro -v /sys:/host/sys:ro -v /var/run/docker.sock:/var/run/docker.sock:ro --cap-add SYS_PTRACE --security-opt apparmor=unconfined
.travis.yml deleted
-68
@@ -1,68 +0,0 @@
1 ----
2 -dist: focal
3 -language: c
4 -
5 -addons:
6 - apt:
7 - packages: ['moreutils']
8 -
9 -env:
10 - global:
11 - - RELEASE_CHANNEL=nightly
12 -
13 -before_install:
14 - - exec > >(ts -s '%H:%M:%.S ') 2>&1
15 - - source .travis/utils.sh
16 -
17 -# Install dependencies for all, once
18 -#
19 -install:
20 - - sudo apt-get install -y libuv1-dev liblz4-dev libcap2-bin zlib1g-dev uuid-dev fakeroot libipmimonitoring-dev libmnl-dev libnetfilter-acct-dev gnupg python3-pip
21 - - sudo pip3 install git-semver==0.3.2 # 11/Sep/2019: git-semver tip was broken, so we had to force last good run of it
22 - - source tests/installer/slack.sh
23 - - export NOTIF_CHANNEL="automation-beta"
24 - - if [ "${TRAVIS_REPO_SLUG}" = "netdata/netdata" ]; then export NOTIF_CHANNEL="automation"; fi;
25 - - export BUILD_VERSION="$(cat packaging/version | cut -d'-' -f1)"
26 - - export LATEST_RELEASE_VERSION="$(cat packaging/version | cut -d'-' -f1)"
27 - - export LATEST_RELEASE_DATE="$(git log -1 --format=%aD "${LATEST_RELEASE_VERSION}" | cat)"
28 - - if [[ "${TRAVIS_COMMIT_MESSAGE}" = *"[Build latest]"* ]]; then export BUILD_VERSION="$(cat packaging/version | cut -d'-' -f1,2 | sed -e 's/-/./g').latest"; fi;
29 - - export DEPLOY_REPO="netdata" # Default production packaging repository
30 - - export PACKAGING_USER="netdata" # Standard package cloud account
31 - - if [[ "${TRAVIS_COMMIT_MESSAGE}" = *"[Build latest]"* ]]; then export DEPLOY_REPO="netdata-edge"; fi;
32 - - export PACKAGE_CLOUD_RETENTION_DAYS=30
33 - - if [ ! "${TRAVIS_REPO_SLUG}" = "netdata/netdata" ]; then export DEPLOY_REPO="netdata-devel"; fi;
34 - # These are release-related artifacts and have to be evaluated before we start doing conditional checks inside stages
35 - - source ".travis/tagger.sh"
36 - - export GIT_TAG="$(git tag --points-at)"
37 - - git submodule update --init --recursive
38 -
39 -
40 -# Setup notification system
41 -#
42 -notifications:
43 - webhooks:
44 - urls:
45 - - https://app.fossa.io/hooks/travisci
46 -
47 -# Define the stage sequence and conditionals
48 -#
49 -stages:
50 - # Mandatory runs, we always want these executed
51 - - name: Build process
52 - if: commit_message =~ /^((?!\[Package (amd64|arm64|i386) (DEB|RPM)( .*)?\]).)*$/
53 -
54 -
55 -# Define stage implementation details
56 -#
57 -jobs:
58 - # This is a hook to help us introduce "soft" errors on our process
59 - allow_failures:
60 - - env: ALLOW_SOFT_FAILURE_HERE=true
61 - include:
62 - # Ensure netdata code builds successfully
63 - - stage: Build process
64 -
65 - name: Standard netdata build
66 - script: fakeroot ./netdata-installer.sh --install-prefix $HOME --dont-wait --dont-start-it --enable-plugin-nfacct --enable-plugin-freeipmi --disable-lto
67 - env: CFLAGS='-O1 -Wall -Wextra -Wformat-signedness -fstack-protector-all -fno-common -DNETDATA_INTERNAL_CHECKS=1 -D_FORTIFY_SOURCE=2 -DNETDATA_VERIFY_LOCKS=1'
68 - after_failure: post_message "TRAVIS_MESSAGE" "<!here> standard netdata build is failing (Still dont know which one, will improve soon)"
.travis/README.md deleted
-149
@@ -1,149 +0,0 @@
1 -<!--
2 ----
3 -title: "Description of CI build configuration"
4 -custom_edit_url: https://github.com/netdata/netdata/edit/master/.travis/README.md
5 ----
6 --->
7 -
8 -# Description of CI build configuration
9 -
10 -## Variables needed by travis
11 -
12 -- GITHUB_TOKEN - GitHub token with push access to repository
13 -- DOCKER_USERNAME - Username (netdatabot) with write access to docker hub repository
14 -- DOCKER_PWD - Password to docker hub
15 -- encrypted_8daf19481253_key - key needed by openssl to decrypt GCS credentials file
16 -- encrypted_8daf19481253_iv - IV needed by openssl to decrypt GCS credentials file
17 -- COVERITY_SCAN_TOKEN - Token to allow coverity test analysis uploads
18 -- SLACK_USERNAME - This is required for the slack notifications triggered by travis pipeline
19 -- SLACK_CHANNEL - This is the channel that Travis will be posting messages
20 -- SLACK_NOTIFY_WEBHOOK_URL - This is the incoming URL webhook as provided by slack integration. Visit Apps integration in slack to generate the required hook
21 -- SLACK_BOT_NAME - This is the name your bot will appear with on slack
22 -
23 -## CI workflow details
24 -Our CI pipeline is designed to help us identify and mitigate risks at all stages of implementation.
25 -To accommodate this need, we used [Travis CI](http://www.travis-ci.com) as our CI/CD tool.
26 -Our main areas of concern are:
27 -1) Only push code that is working. That means fail fast so that we can improve before we reach the public
28 -
29 -2) Reduce the time to market to minimum, by streamlining the release process.
30 - That means a lot of testing, a lot of consistency checks, a lot of validations
31 -
32 -3) Generated artifacts consistency. We should not allow broken software to reach the public.
33 - When this happens, it's embarrassing and we struggle to eliminate it.
34 -
35 -4) We are an innovative company, so we love to automate :)
36 -
37 -
38 -Having said that, here's a brief introduction to Netdata's improved CI/CD pipeline with Travis.
39 -Our CI/CD lifecycle contains three different execution entry points:
40 -1) A user opens a pull request to netdata/master: Travis will run a pipeline on the branch under that PR
41 -2) A merge or commit happens on netdata/master. This will trigger travis to run, but we have two distinct cases in this scenario:
42 - a) A user merges a pull request to netdata/master: Travis will run on master, after the merge.
43 - b) A user runs a commit/merge with a special keyword (mentioned later).
44 - This triggers a release for either minor, major or release candidate versions, depending the keyword
45 -3) A scheduled job runs on master once per day: Travis will run on master at the scheduled interval
46 -
47 -To accommodate all three entry points our CI/CD workflow has a set of steps that run on all three entry points.
48 -Once all these steps are successful, then our pipeline executes another subset of steps for entry points 2 and 3.
49 -In travis terms the "steps" are "Stages" and within each stage we execute a set of activities called "jobs" in travis.
50 -
51 -### Always run: Stages that running on all three execution entry points
52 -
53 -## Code quality, linting, syntax, code style
54 -At this early stage we iterate through a set of basic quality control checks:
55 -- Shell checking: Run linters for our various BASH scripts
56 -- Checksum validators: Run validators to ensure our installers and documentation are in sync
57 -- Dashboard validator: We provide a pre-generated dashboard.js script file that we need to make sure its up to date. We validate that.
58 -
59 -## Build process
60 -At this stage, basically, we build :-)
61 -We do a baseline check of our build artifacts to guarantee they are not broken
62 -Briefly our activities include:
63 -- Verify docker builds successfully
64 -- Run the standard Netdata installer, to make sure we build & run properly
65 -- Do the same through 'make dist', as this is our stable channel for our kickstart files
66 -
67 -## Artifacts validation
68 -At this point we know our software is building, we need to go through the a set of checks, to guarantee
69 -that our product meets certain expectations. At the current stage, we are focusing on basic capabilities
70 -like installing in different distributions, running the full lifecycle of install-run-update-install and so on.
71 -We are still working on enriching this with more and more use cases, to get us closer to achieving full stability of our software.
72 -Briefly we currently evaluate the following activities:
73 -- Basic software unit testing (only run when changes happen that require it)
74 -- Non containerized build and install on ubuntu 14.04
75 -- Non containerized build and install on ubuntu 18.04
76 -- Running the full Netdata lifecycle (install, update, uninstall) on ubuntu 18.04
77 -- Build and install on CentOS 7
78 -(More to come)
79 -
80 -### Nightly operations: Stages that run daily under cronjob
81 -The nightly stages are related to the daily nightly activities, that produce our daily latest releases.
82 -We also maintain a couple of cronjobs that run during the night to provide us with deeper insights,
83 -like for example coverity scanning or extended kickstart checksum checks
84 -
85 -## Nightly operations
86 -At this stage we run scheduled jobs and execute the nightly changelog generator, coverity scans,
87 -labeler for our issues and extended kickstart files checksum validations.
88 -
89 -## Nightly release
90 -During this stage we are building and publishing latest docker images, prepare the nightly artifacts
91 -and deploy them (the artifacts) to our google cloud service provider.
92 -
93 -
94 -### Publishing
95 -Publishing is responsible for executing the major/minor/patch releases and is separated
96 -in two stages: packaging preparation process and publishing.
97 -
98 -## Packaging for release
99 -During packaging we are preparing the release changelog information and run the labeler.
100 -
101 -## Publish for release
102 -The publishing stage is the most complex part in publishing. This is the stage were we generate and publish docker images,
103 -prepare the release artifacts and get ready with the release draft.
104 -
105 -### Package Management workflows
106 -As part of our goal to provide the best support to our customers, we have created a set of CI workflows to automatically produce
107 -DEB and RPM for multiple distributions. These workflows are implemented under the templated stages '_DEB_TEMPLATE' and '_RPM_TEMPLATE'.
108 -We currently plan to actively support the following Operating Systems, with a plan to further expand this list following our users needs.
109 -
110 -### Operating systems supported
111 -The following distributions are supported
112 -- Debian versions
113 - - Buster (TBD - not released yet, check [debian releases](https://www.debian.org/releases/) for details)
114 - - Stretch
115 - - Jessie
116 - - Wheezy
117 -
118 -- Ubuntu versions
119 - - Disco
120 - - Cosmic
121 - - Bionic
122 - - artful
123 -
124 -- Enterprise Linux versions (Covers Red Hat, CentOS, and Amazon Linux with version 6)
125 - - Version 8 (TBD)
126 - - Version 7
127 - - Version 6
128 -
129 -- Fedora versions
130 - - Version 31 (TBD)
131 - - Version 30
132 - - Version 29
133 - - Version 28
134 -
135 -- openSUSE versions
136 - - 15.1
137 - - 15.0
138 -
139 -- Gentoo distributions
140 - - TBD
141 -
142 -### Architectures supported
143 -We plan to support amd64, x86 and arm64 architectures. As of June 2019 only amd64 and x86 will become available, as we are still working on solving issues with the architecture.
144 -
145 -The Package deployment can be triggered manually by executing an empty commit with the following message pattern: `[Package PACKAGE_TYPE PACKAGE_ARCH] DESCRIBE_THE_REASONING_HERE`.
146 -Travis Yaml configuration allows the user to combine package type and architecture as necessary to regenerate the current stable release (For example tag v1.15.0 as of 4th of May 2019)
147 -Sample patterns to trigger building of packages for all amd64 supported architecture:
148 -- '[Package amd64 RPM]': Build & publish all amd64 available RPM packages
149 -- '[Package amd64 DEB]': Build & publish all amd64 available DEB packages
.travis/check_changelog_last_modification.sh deleted
-38
@@ -1,38 +0,0 @@
1 -#!/usr/bin/env bash
2 -#
3 -# This scriptlet validates nightlies age and notifies is if it gets too old
4 -#
5 -# Copyright: SPDX-License-Identifier: GPL-3.0-or-later
6 -#
7 -# Author : Pavlos Emm. Katsoulakis (paul@netdata.cloud)
8 -
9 -set -e
10 -
11 -# If we are not in netdata git repo, at the top level directory, fail
12 -TOP_LEVEL=$(basename "$(git rev-parse --show-toplevel)")
13 -CWD=$(git rev-parse --show-cdup || echo "")
14 -if [ -n "${CWD}" ] || [ ! "${TOP_LEVEL}" == "netdata" ]; then
15 - echo "Run as .travis/$(basename "$0") from top level directory of netdata git repository"
16 - echo "Changelog age checker exited abnormally"
17 - exit 1
18 -fi
19 -
20 -source tests/installer/slack.sh || echo "I could not load slack library"
21 -
22 -LAST_MODIFICATION="$(git log -1 --pretty="format:%at" CHANGELOG.md)"
23 -CURRENT_TIME="$(date +"%s")"
24 -TWO_DAYS_IN_SECONDS=172800
25 -
26 -DIFF=$((CURRENT_TIME - LAST_MODIFICATION))
27 -
28 -echo "Checking CHANGELOG.md last modification time on GIT.."
29 -echo "CHANGELOG.md timestamp: ${LAST_MODIFICATION}"
30 -echo "Current timestamp: ${CURRENT_TIME}"
31 -echo "Diff: ${DIFF}"
32 -
33 -if [ ${DIFF} -gt ${TWO_DAYS_IN_SECONDS} ]; then
34 - echo "CHANGELOG.md is more than two days old!"
35 - post_message "TRAVIS_MESSAGE" "Hi <!here>, CHANGELOG.md was found more than two days old (Diff: ${DIFF} seconds)" "${NOTIF_CHANNEL}"
36 -else
37 - echo "CHANGELOG.md is less than two days old, fine"
38 -fi
.travis/create_artifacts.sh deleted
-77
@@ -1,77 +0,0 @@
1 -#!/usr/bin/env bash
2 -#
3 -# Artifacts creation script.
4 -# This script generates two things:
5 -# 1) The static binary that can run on all linux distros (built-in dependencies etc)
6 -# 2) The distribution source tarball
7 -#
8 -# Copyright: SPDX-License-Identifier: GPL-3.0-or-later
9 -#
10 -# Author: Paul Emm. Katsoulakis <paul@netdata.cloud>
11 -#
12 -# shellcheck disable=SC2230
13 -
14 -set -e
15 -
16 -# If we are not in netdata git repo, at the top level directory, fail
17 -TOP_LEVEL=$(basename "$(git rev-parse --show-toplevel)")
18 -CWD=$(git rev-parse --show-cdup || echo "")
19 -if [ -n "${CWD}" ] || [ ! "${TOP_LEVEL}" == "netdata" ]; then
20 - echo "Run as .travis/$(basename "$0") from top level directory of netdata git repository"
21 - exit 1
22 -fi
23 -
24 -if [ ! "${TRAVIS_REPO_SLUG}" == "netdata/netdata" ]; then
25 - echo "Beta mode on ${TRAVIS_REPO_SLUG}, not running anything here"
26 - exit 0
27 -fi
28 -
29 -echo "--- Initialize git configuration ---"
30 -git checkout "${1-master}"
31 -git pull
32 -
33 -if [ "${RELEASE_CHANNEL}" == stable ]; then
34 - echo "--- Set default release channel to stable ---"
35 - sed -i 's/^RELEASE_CHANNEL="nightly" *#/RELEASE_CHANNEL="stable" #/' \
36 - netdata-installer.sh \
37 - packaging/makeself/install-or-update.sh
38 -fi
39 -
40 -# Everything from this directory will be uploaded to GCS
41 -mkdir -p artifacts
42 -BASENAME="netdata-$(git describe)"
43 -
44 -# Make sure stdout is in blocking mode. If we don't, then conda create will barf during downloads.
45 -# See https://github.com/travis-ci/travis-ci/issues/4704#issuecomment-348435959 for details.
46 -python -c 'import os,sys,fcntl; flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL); fcntl.fcntl(sys.stdout, fcntl.F_SETFL, flags&~os.O_NONBLOCK);'
47 -echo "--- Create tarball ---"
48 -command -v git > /dev/null && [ -d .git ] && git clean -d -f
49 -autoreconf -ivf
50 -./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/libexec --with-zlib --with-math --with-user=netdata CFLAGS=-O2
51 -make dist
52 -mv "${BASENAME}.tar.gz" artifacts/
53 -
54 -echo "--- Create self-extractor ---"
55 -sxarches="x86_64 armv7l aarch64"
56 -for arch in ${sxarches}; do
57 - git clean -d -f
58 - rm -rf packating/makeself/tmp
59 - ./packaging/makeself/build-static.sh ${arch}
60 -done
61 -
62 -# Needed for GCS
63 -echo "--- Copy artifacts to separate directory ---"
64 -#shellcheck disable=SC2164
65 -cp packaging/version artifacts/latest-version.txt
66 -cd artifacts
67 -ln -s "${BASENAME}.tar.gz" netdata-latest.tar.gz
68 -
69 -for arch in ${sxarches}; do
70 - ln -s "netdata-${arch}-$(git describe).gz.run" netdata-${arch}-latest.gz.run
71 -done
72 -
73 -ln -s "${BASENAME}.gz.run" netdata-latest.gz.run
74 -
75 -sha256sum -b ./* > "sha256sums.txt"
76 -echo "checksums:"
77 -cat sha256sums.txt
.travis/create_changelog.sh deleted
-47
@@ -1,47 +0,0 @@
1 -#!/usr/bin/env bash
2 -#
3 -# Copyright: SPDX-License-Identifier: GPL-3.0-or-later
4 -#
5 -# Author : Pavlos Emm. Katsoulakis (paul@netdata.cloud)
6 -set -e
7 -
8 -# If we are not in netdata git repo, at the top level directory, fail
9 -TOP_LEVEL=$(basename "$(git rev-parse --show-toplevel)")
10 -CWD=$(git rev-parse --show-cdup || echo "")
11 -if [ -n "$CWD" ] || [ ! "${TOP_LEVEL}" == "netdata" ]; then
12 - echo "Run as .travis/$(basename "$0") from top level directory of netdata git repository"
13 - echo "Changelog creation aborted"
14 - exit 1
15 -fi
16 -
17 -ORGANIZATION=$(echo "$TRAVIS_REPO_SLUG" | awk -F '/' '{print $1}')
18 -PROJECT=$(echo "$TRAVIS_REPO_SLUG" | awk -F '/' '{print $2}')
19 -GIT_MAIL=${GIT_MAIL:-"bot@netdata.cloud"}
20 -GIT_USER=${GIT_USER:-"netdatabot"}
21 -
22 -if [ -z ${GIT_TAG+x} ]; then
23 - OPTS=""
24 -else
25 - OPTS="--future-release ${GIT_TAG}"
26 -fi
27 -
28 -if [ ! "${TRAVIS_REPO_SLUG}" == "netdata/netdata" ]; then
29 - echo "Beta mode on ${TRAVIS_REPO_SLUG}, nothing else to do here"
30 - exit 0
31 -fi
32 -
33 -echo "--- Creating changelog ---"
34 -git checkout master
35 -git pull
36 -
37 -docker login -u "${DOCKER_USERNAME}" -p "${DOCKER_PWD}"
38 -docker run -it -v "$(pwd)":/project markmandel/github-changelog-generator:latest \
39 - --user "${ORGANIZATION}" \
40 - --project "${PROJECT}" \
41 - --token "${GITHUB_TOKEN}" \
42 - --since-tag "v1.10.0" \
43 - --unreleased-label "**Next release**" \
44 - --no-issues \
45 - --exclude-labels "stale,duplicate,question,invalid,wontfix,discussion,no changelog" \
46 - --max-issues 500 \
47 - --bug-labels IGNOREBUGS ${OPTS}
.travis/current_build_status deleted
-1
@@ -1 +0,0 @@
1 -changes-#18220
.travis/draft_release.sh deleted
-65
@@ -1,65 +0,0 @@
1 -#!/bin/bash
2 -#
3 -# Draft release generator.
4 -# This utility is responsible for submitting a draft release to github repo
5 -# It is agnostic of other processes, when executed it will draft a release,
6 -# based on the most recent reachable tag.
7 -#
8 -# Requirements:
9 -# - GITHUB_TOKEN variable set with GitHub token. Access level: repo.public_repo
10 -# - artifacts directory in place
11 -# - The directory is created by create_artifacts.sh mechanism
12 -# - The artifacts need to be created with the same tag, obviously
13 -#
14 -# Copyright: SPDX-License-Identifier: GPL-3.0-or-later
15 -#
16 -# Author: Pavlos Emm. Katsoulakis <paul@netdata.cloud>
17 -
18 -set -e
19 -
20 -if [ ! -f .gitignore ]; then
21 - echo "Run as ./travis/$(basename "$0") from top level directory of git repository"
22 - exit 1
23 -fi
24 -
25 -echo "--- Initialize git configuration ---"
26 -git checkout master
27 -git pull
28 -
29 -
30 -if [[ $(git describe) =~ -rc* ]]; then
31 - echo "This is a release candidate tag, we do not generate a release draft"
32 - exit 0
33 -fi
34 -
35 -# Load the tag, if any
36 -GIT_TAG=$(git describe)
37 -
38 -if [ ! "${TRAVIS_REPO_SLUG}" == "netdata/netdata" ]; then
39 - echo "Beta mode on ${TRAVIS_REPO_SLUG}, i was about to run for release (${GIT_TAG}), but i am emulating, so bye"
40 - exit 0
41 -fi;
42 -
43 -echo "---- CREATING RELEASE DRAFT WITH ASSETS -----"
44 -# Download hub
45 -HUB_VERSION=${HUB_VERSION:-"2.5.1"}
46 -wget "https://github.com/github/hub/releases/download/v${HUB_VERSION}/hub-linux-amd64-${HUB_VERSION}.tgz" -O "/tmp/hub-linux-amd64-${HUB_VERSION}.tgz"
47 -tar -C /tmp -xvf "/tmp/hub-linux-amd64-${HUB_VERSION}.tgz"
48 -export PATH=$PATH:"/tmp/hub-linux-amd64-${HUB_VERSION}/bin"
49 -
50 -# Create a release draft
51 -if [ -z ${GIT_TAG+x} ]; then
52 - echo "Variable GIT_TAG is not set. Something went terribly wrong! Exiting."
53 - exit 1
54 -fi
55 -if [ "${GIT_TAG}" != "$(git tag --points-at)" ]; then
56 - echo "ERROR! Current commit is not tagged. Stopping release creation."
57 - exit 1
58 -fi
59 -until hub release create --draft \
60 - -a "artifacts/netdata-${GIT_TAG}.tar.gz" \
61 - -a "artifacts/netdata-${GIT_TAG}.gz.run" \
62 - -a "artifacts/sha256sums.txt" \
63 - -m "${GIT_TAG}" "${GIT_TAG}"; do
64 - sleep 5
65 -done
.travis/gcs-credentials.json.enc
Binary files a/.travis/gcs-credentials.json.enc and /dev/null differ
.travis/generate_changelog_and_tag_release.sh deleted
-64
@@ -1,64 +0,0 @@
1 -#!/bin/bash
2 -#
3 -# Script to automatically do a couple of things:
4 -# - generate a new tag according to semver (https://semver.org/)
5 -# - generate CHANGELOG.md by using https://github.com/skywinder/github-changelog-generator
6 -#
7 -# Tags are generated by searching for a keyword in last commit message. Keywords are:
8 -# - [patch] or [fix] to bump patch number
9 -# - [minor], [feature] or [feat] to bump minor number
10 -# - [major] or [breaking change] to bump major number
11 -# All keywords MUST be surrounded with square braces.
12 -#
13 -# Script uses git mechanisms for locking, so it can be used in parallel builds
14 -#
15 -# Requirements:
16 -# - GITHUB_TOKEN variable set with GitHub token. Access level: repo.public_repo
17 -# - docker
18 -#
19 -# This is a modified version of:
20 -# https://github.com/paulfantom/travis-helper/blob/master/releasing/releaser.sh
21 -#
22 -# Copyright: SPDX-License-Identifier: GPL-3.0-or-later
23 -#
24 -# Author: Pavlos Emm. Katsoulakis <paul@netdata.cloud>
25 -# Author: Pawel Krupa (@paulfantom)
26 -set -e
27 -
28 -if [ ! -f .gitignore ]; then
29 - echo "Run as ./travis/$(basename "$0") from top level directory of git repository"
30 - exit 1
31 -fi
32 -
33 -echo "--- Changelog generator script starting ---"
34 -# If we dont have a produced TAG there is nothing to do, so bail out happy
35 -if [ -z "${GIT_TAG}" ]; then
36 - echo "GIT_TAG is empty, that is not suppose to happen (Value: $GIT_TAG)"
37 - exit 1
38 -fi
39 -
40 -if [ ! "${TRAVIS_REPO_SLUG}" == "netdata/netdata" ]; then
41 - echo "Beta mode on ${TRAVIS_REPO_SLUG}, nothing to do on the changelog generator and tagging script for (${GIT_TAG}), bye"
42 - exit 0
43 -fi
44 -
45 -echo "--- Initialize git configuration ---"
46 -export GIT_MAIL="bot@netdata.cloud"
47 -export GIT_USER="netdatabot"
48 -git checkout master
49 -git pull
50 -
51 -echo "---- UPDATE VERSION FILE ----"
52 -echo "$GIT_TAG" >packaging/version
53 -git add packaging/version
54 -
55 -echo "---- Create CHANGELOG -----"
56 -./.travis/create_changelog.sh
57 -git add CHANGELOG.md
58 -
59 -echo "---- COMMIT AND PUSH CHANGES ----"
60 -git commit -m "[ci skip] release $GIT_TAG" --author "${GIT_USER} <${GIT_MAIL}>"
61 -git tag "$GIT_TAG" -a -m "Automatic tag generation for travis build no. $TRAVIS_BUILD_NUMBER"
62 -git push "https://${GITHUB_TOKEN}:@$(git config --get remote.origin.url | sed -e 's/^https:\/\///')"
63 -git push "https://${GITHUB_TOKEN}:@$(git config --get remote.origin.url | sed -e 's/^https:\/\///')" --tags
64 -# After those operations output of command `git describe` should be identical with a value of GIT_TAG
.travis/generate_changelog_for_nightlies.sh deleted
-50
@@ -1,50 +0,0 @@
1 -#!/usr/bin/env bash
2 -#
3 -# Changelog generation scriptlet, for nightlies
4 -#
5 -# Copyright: SPDX-License-Identifier: GPL-3.0-or-later
6 -#
7 -# Author : Pawel Krupa (paulfantom)
8 -# Author : Pavlos Emm. Katsoulakis (paul@netdata.cloud)
9 -set -e
10 -
11 -# If we are not in netdata git repo, at the top level directory, fail
12 -TOP_LEVEL=$(basename "$(git rev-parse --show-toplevel)")
13 -CWD=$(git rev-parse --show-cdup || echo "")
14 -if [ -n "$CWD" ] || [ ! "${TOP_LEVEL}" == "netdata" ]; then
15 - echo "Run as .travis/$(basename "$0") from top level directory of netdata git repository"
16 - echo "Changelog generation process aborted"
17 - exit 1
18 -fi
19 -
20 -LAST_TAG="$1"
21 -COMMITS_SINCE_RELEASE="$2"
22 -NEW_VERSION="${LAST_TAG}-$((COMMITS_SINCE_RELEASE + 1))-nightly"
23 -GIT_MAIL=${GIT_MAIL:-"bot@netdata.cloud"}
24 -GIT_USER=${GIT_USER:-"netdatabot"}
25 -PUSH_URL=$(git config --get remote.origin.url | sed -e 's/^https:\/\///')
26 -FAIL=0
27 -
28 -if [ ! "${TRAVIS_REPO_SLUG}" == "netdata/netdata" ]; then
29 - echo "Beta mode on ${TRAVIS_REPO_SLUG}, nothing else to do here"
30 - exit 0
31 -fi
32 -
33 -echo "Running changelog creation mechanism"
34 -.travis/create_changelog.sh
35 -
36 -echo "Changelog created! Adding packaging/version(${NEW_VERSION}) and CHANGELOG.md to the repository"
37 -echo "${NEW_VERSION}" > packaging/version
38 -git add packaging/version && echo "1) Added packaging/version to repository" || FAIL=1
39 -git add CHANGELOG.md && echo "2) Added changelog file to repository" || FAIL=1
40 -git commit -m '[ci skip] create nightly packages and update changelog' --author "${GIT_USER} <${GIT_MAIL}>" && echo "3) Committed changes to repository" || FAIL=1
41 -git push "https://${GITHUB_TOKEN}:@${PUSH_URL}" && echo "4) Pushed changes to remote ${PUSH_URL}" || FAIL=1
42 -
43 -# In case of a failure, wrap it up and bail out cleanly
44 -if [ $FAIL -eq 1 ]; then
45 - git clean -xfd
46 - echo "Changelog generation failed during github UPDATE!"
47 - exit 1
48 -fi
49 -
50 -echo "Changelog generation completed successfully!"
.travis/nightlies.sh deleted
-51
@@ -1,51 +0,0 @@
1 -#!/usr/bin/env bash
2 -#
3 -# This is the nightly changelog generation script
4 -# It is responsible for two major activities:
5 -# 1) Update packaging/version with the current nightly version
6 -# 2) Generate the changelog for the mentioned version
7 -#
8 -# Copyright: SPDX-License-Identifier: GPL-3.0-or-later
9 -#
10 -# Author : Pawel Krupa (paulfantom)
11 -# Author : Pavlos Emm. Katsoulakis (paul@netdata.cloud)
12 -set -e
13 -FAIL=0
14 -
15 -source tests/installer/slack.sh || echo "Could not load slack library"
16 -
17 -# If we are not in netdata git repo, at the top level directory, fail
18 -TOP_LEVEL=$(basename "$(git rev-parse --show-toplevel)")
19 -CWD=$(git rev-parse --show-cdup || echo "")
20 -if [ -n "${CWD}" ] || [ ! "${TOP_LEVEL}" == "netdata" ]; then
21 - echo "Run as .travis/$(basename "$0") from top level directory of netdata git repository"
22 - echo "Changelog generation process aborted"
23 - exit 1
24 -fi
25 -
26 -LAST_TAG=$(git describe --abbrev=0 --tags)
27 -COMMITS_SINCE_RELEASE=$(git rev-list "${LAST_TAG}"..HEAD --count)
28 -PREVIOUS_NIGHTLY_COUNT="$(rev <packaging/version | cut -d- -f 2 | rev)"
29 -
30 -# If no commits since release, just stop
31 -if [ "${COMMITS_SINCE_RELEASE}" == "${PREVIOUS_NIGHTLY_COUNT}" ]; then
32 - echo "No changes since last nightly release, nothing else to do"
33 - exit 0
34 -fi
35 -
36 -if [ ! "${TRAVIS_REPO_SLUG}" == "netdata/netdata" ]; then
37 - echo "Beta mode -- nothing to do for ${TRAVIS_REPO_SLUG} on the nightlies script, bye"
38 - exit 0
39 -fi
40 -
41 -echo "--- Running Changelog generation ---"
42 -echo "We got $COMMITS_SINCE_RELEASE changes since $LAST_TAG, re-generating changelog"
43 -NIGHTLIES_CHANGELOG_FAILED=0
44 -.travis/generate_changelog_for_nightlies.sh "${LAST_TAG}" "${COMMITS_SINCE_RELEASE}" || NIGHTLIES_CHANGELOG_FAILED=1
45 -
46 -if [ ${NIGHTLIES_CHANGELOG_FAILED} -eq 1 ]; then
47 - echo "Changelog generation has failed, this is a soft error, process continues"
48 - post_message "TRAVIS_MESSAGE" "Changelog generation job for nightlies failed, possibly due to github issues" "${NOTIF_CHANNEL}" || echo "Slack notification failed"
49 -fi
50 -
51 -exit "${FAIL}"
.travis/tagger.sh deleted
-61
@@ -1,61 +0,0 @@
1 -# #BASH library
2 -#
3 -# Tags are generated by searching for a keyword in last commit message. Keywords are:
4 -# - [patch] or [fix] to bump patch number
5 -# - [minor], [feature] or [feat] to bump minor number
6 -# - [major] or [breaking change] to bump major number
7 -# All keywords MUST be surrounded with square braces.
8 -#
9 -# Requirements:
10 -# - GITHUB_TOKEN variable set with GitHub token. Access level: repo.public_repo
11 -# - git-semver python package (pip install git-semver)
12 -#
13 -# Original script is available at https://github.com/paulfantom/travis-helper/blob/master/releasing/releaser.sh
14 -#
15 -# Copyright: SPDX-License-Identifier: GPL-3.0-or-later
16 -#
17 -# Author : Pawel Krupa (paulfantom)
18 -# Author : Pavlos Emm. Katsoulakis (paul@netdata.cloud)
19 -
20 -# Figure out what will be new release candidate tag based only on previous ones.
21 -# This assumes that RELEASES are in format of "v0.1.2" and prereleases (RCs) are using "v0.1.2-rc0"
22 -function set_tag_release_candidate() {
23 - LAST_TAG=$(git semver)
24 - echo "${0}: Last tag found is: ${LAST_TAG}"
25 -
26 - if [[ $LAST_TAG =~ -rc* ]]; then
27 - VERSION=$(echo "$LAST_TAG" | cut -d'-' -f 1)
28 - LAST_RC=$(echo "$LAST_TAG" | cut -d'c' -f 2)
29 - RC=$((LAST_RC + 1))
30 - else
31 - VERSION="$(git semver --next-minor)"
32 - RC=0
33 - echo "${0}: Warning: Will set version to ${VERSION} (Last tag: ${LAST_TAG}) while tagged for release candidate generation"
34 - fi
35 -
36 - GIT_TAG="v${VERSION}-rc${RC}"
37 - echo "${0}: Generated a new tag, set to: (${GIT_TAG})"
38 -}
39 -
40 -function set_tag_for_release() {
41 - echo "${0}: Checking for tag existence"
42 - if [ -z "${GIT_TAG}" ]; then
43 - echo "${0}: No tag was found, generating a new tag"
44 - git semver
45 -
46 - echo "${0}: Last commit message: ${TRAVIS_COMMIT_MESSAGE}"
47 -
48 - # Figure out next tag based on commit message
49 - case "${TRAVIS_COMMIT_MESSAGE}" in
50 - *"[netdata patch release]"*) GIT_TAG="v$(git semver --next-patch)" ;;
51 - *"[netdata minor release]"*) GIT_TAG="v$(git semver --next-minor)" ;;
52 - *"[netdata major release]"*) GIT_TAG="v$(git semver --next-major)" ;;
53 - *"[netdata release candidate]"*) set_tag_release_candidate ;;
54 - *)
55 - echo "${0}: Keyword not detected. Nothing to set for GIT_TAG"
56 - ;;
57 - esac
58 - else
59 - echo "${0}: We seem to already have a GIT_TAG set to (${GIT_TAG})"
60 - fi
61 -}
.travis/trigger_artifact_build.sh deleted
-20
@@ -1,20 +0,0 @@
1 -#!/bin/sh
2 -
3 -token="${1}"
4 -version="${2}"
5 -type="${3}"
6 -
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/build.yml/dispatches" \
11 - -d "{\"ref\": \"master\", \"inputs\": {\"version\": \"${version}\", \"type\": \"${type}\"}}")"
12 -
13 -if [ -z "${resp}" ]; then
14 - echo "Successfully triggered release artifact build."
15 - exit 0
16 -else
17 - echo "Failed to trigger release artifact build. Output:"
18 - echo "${resp}"
19 - exit 1
20 -fi
.travis/trigger_docker_build.sh deleted
-19
@@ -1,19 +0,0 @@
1 -#!/bin/sh
2 -
3 -token="${1}"
4 -version="${2}"
5 -
6 -resp="$(curl -X POST \
7 - -H 'Accept: application/vnd.github.v3+json' \
8 - -H "Authorization: Bearer ${token}" \
9 - "https://api.github.com/repos/netdata/netdata/actions/workflows/docker.yml/dispatches" \
10 - -d "{\"ref\": \"master\", \"inputs\": {\"version\": \"${version}\"}}")"
11 -
12 -if [ -z "${resp}" ]; then
13 - echo "Successfully triggered Docker image build."
14 - exit 0
15 -else
16 - echo "Failed to trigger Docker image build. Output:"
17 - echo "${resp}"
18 - exit 1
19 -fi
.travis/trigger_package_build.sh deleted
-20
@@ -1,20 +0,0 @@
1 -#!/bin/sh
2 -
3 -token="${1}"
4 -version="${2}"
5 -pkgtype="${3}"
6 -
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/packaging.yml/dispatches" \
11 - -d "{\"ref\": \"master\", \"inputs\": {\"version\": \"${version}\", \"type\": \"${pkgtype}\"}}")"
12 -
13 -if [ -z "${resp}" ]; then
14 - echo "Successfully triggered binary package builds."
15 - exit 0
16 -else
17 - echo "Failed to trigger binary package builds. Output:"
18 - echo "${resp}"
19 - exit 1
20 -fi
.travis/utils.sh deleted
-29
@@ -1,29 +0,0 @@
1 -#!/usr/bin/env bash
2 -
3 -# Prevent travis from timing out after 10 minutes of no output
4 -tick() {
5 - (while true; do sleep 300; echo; done) &
6 - local PID=$!
7 - disown
8 -
9 - "$@"
10 - local RET=$?
11 -
12 - kill $PID
13 - return $RET
14 -}
15 -export -f tick
16 -
17 -retry() {
18 - local tries=$1
19 - shift
20 -
21 - local i=0
22 - while [ "$i" -lt "$tries" ]; do
23 - "$@" && return 0
24 - sleep $((2**((i++))))
25 - done
26 -
27 - return 1
28 -}
29 -export -f retry
Makefile.am
-1
@@ -23,7 +23,6 @@ CLEANFILES = \
23
24 EXTRA_DIST = \
25 .gitignore \
26 - .csslintrc \
26 .eslintignore \
27 .eslintrc \
28 .github/CODEOWNERS \
README.md
-1
@@ -8,7 +8,6 @@
8 <a href="https://github.com/netdata/netdata/releases/latest"><img src="https://img.shields.io/github/release/netdata/netdata.svg" alt="Latest release"></a>
9 <a href="https://github.com/netdata/netdata-nightlies/releases/latest"><img src="https://img.shields.io/github/release/netdata/netdata-nightlies.svg" alt="Latest nightly build"></a>
10 <br />
11 - <a href="https://travis-ci.com/netdata/netdata"><img src="https://travis-ci.com/netdata/netdata.svg?branch=master" alt="Build status"></a>
11 <a href="https://bestpractices.coreinfrastructure.org/projects/2231"><img src="https://bestpractices.coreinfrastructure.org/projects/2231/badge" alt="CII Best Practices"></a>
12 <a href="https://codeclimate.com/github/netdata/netdata"><img src="https://codeclimate.com/github/netdata/netdata/badges/gpa.svg" alt="Code Climate"></a>
13 <a href="https://www.gnu.org/licenses/gpl-3.0"><img src="https://img.shields.io/badge/License-GPL%20v3%2B-blue.svg" alt="License: GPL v3+"></a>
build-artifacts.sh deleted
-27
@@ -1,27 +0,0 @@
1 -#!/bin/sh
2 -
3 -BASENAME="netdata-$(git describe)"
4 -
5 -mkdir -p artifacts
6 -
7 -autoreconf -ivf
8 -./configure \
9 - --prefix=/usr \
10 - --sysconfdir=/etc \
11 - --localstatedir=/var \
12 - --libexecdir=/usr/libexec \
13 - --with-zlib \
14 - --with-math \
15 - --with-user=netdata \
16 - CFLAGS=-O2
17 -make dist
18 -mv "${BASENAME}.tar.gz" artifacts/
19 -
20 -USER="" ./packaging/makeself/build-x86_64-static.sh
21 -
22 -cp packaging/version artifacts/latest-version.txt
23 -
24 -cd artifacts || exit 1
25 -ln -s "${BASENAME}.tar.gz" netdata-latest.tar.gz
26 -ln -s "${BASENAME}.gz.run" netdata-latest.gz.run
27 -sha256sum -b ./* > "sha256sums.txt"
contrib/debian/rules
-1
@@ -95,7 +95,6 @@ override_dh_installdocs:
95
96 find . \
97 -name README.md \
98 - -not -path './.travis/*' \
98 -not -path './debian/*' \
99 -not -path './contrib/*' \
100 -exec cp \
packaging/docker/README.md
+1 -44
@@ -520,47 +520,4 @@ Caddyfile.
520 ## Publish a test image to your own repository
521
522 At Netdata, we provide multiple ways of testing your Docker images using your own repositories.
523 -You may either use the command line tools available or take advantage of our Travis CI infrastructure.
524 -
525 -### Inside Netdata organization, using Travis CI
526 -
527 -To enable Travis CI integration on your own repositories (Docker and GitHub), you need to be part of the Netdata
528 -organization.
529 -
530 -Once you have contacted the Netdata owners to setup you up on GitHub and Travis, execute the following steps
531 -
532 -- Preparation
533 - - Have Netdata forked on your personal GitHub account
534 - - Get a GitHub token: Go to **GitHub settings** -> **Developer Settings** -> **Personal access tokens**, and
535 - generate a new token with full access to `repo_hook`, read-only access to `admin:org`, `public_repo`,
536 - `repo_deployment`, `repo:status`, and `user:email` settings enabled. This will be your `GITHUB_TOKEN` that is
537 - described later in the instructions, so keep it somewhere safe.
538 - - Contact the Netdata team and seek for permissions on `https://scan.coverity.com` should you require Travis to be
539 - able to push your forked code to coverity for analysis and report. Once you are setup, you should have your
540 - email you used in coverity and a token from them. These will be your `COVERITY_SCAN_SUBMIT_EMAIL` and
541 - `COVERITY_SCAN_TOKEN` that we will refer to later.
542 - - Have a valid Docker hub account, the credentials from this account will be your `DOCKER_USERNAME` and
543 - `DOCKER_PWD` mentioned later.
544 -
545 -- Setting up Travis CI for your own fork (Detailed instructions provided by Travis team [here](https://docs.travis-ci.com/user/tutorial/))
546 - - Login to travis with your own GITHUB credentials (There is Open Auth access)
547 - - Go to your profile settings, under [repositories](https://travis-ci.com/account/repositories) section and setup
548 - your Netdata fork to be built by Travis CI.
549 - - Once the repository has been setup, go to repository settings within Travis CI (usually under
550 - `https://travis-ci.com/NETDATA_DEVELOPER/netdata/settings`, where `NETDATA_DEVELOPER` is your GitHub handle),
551 - and select your desired settings.
552 -
553 -- While in Travis settings, under Netdata repository settings in the Environment Variables section, you need to add
554 - the following:
555 - - `DOCKER_USERNAME` and `DOCKER_PWD` variables so that Travis can log in to your Docker Hub account and publish
556 - Docker images there.
557 - - `REPOSITORY` variable to `NETDATA_DEVELOPER/netdata`, where `NETDATA_DEVELOPER` is your GitHub handle again.
558 - - `GITHUB_TOKEN` variable with the token generated on the preparation step, for Travis workflows to function
559 - properly.
560 - - `COVERITY_SCAN_SUBMIT_EMAIL` and `COVERITY_SCAN_TOKEN` variables to enable Travis to submit your code for
561 - analysis to Coverity.
562 -
563 -Having followed these instructions, your forked repository should be all set up for integration with Travis CI. Happy
564 -testing!
565 -
566 -
523 +You may either use the command line tools available or take advantage of our GitHub Acions infrastructure.
packaging/makeself/install-or-update.sh
+1 -1
@@ -27,7 +27,7 @@ fi
27
28 STARTIT=1
29 REINSTALL_OPTIONS=""
30 -RELEASE_CHANNEL="nightly" # check .travis/create_artifacts.sh before modifying
30 +RELEASE_CHANNEL="nightly"
31
32 while [ "${1}" ]; do
33 case "${1}" in
tests/installer/checksums.sh deleted
-53
@@ -1,53 +0,0 @@
1 -#!/bin/sh
2 -
3 -#
4 -# Mechanism to validate kickstart files integrity status
5 -#
6 -# Copyright: SPDX-License-Identifier: GPL-3.0-or-later
7 -#
8 -# Author : Pawel Krupa (pawel@netdata.cloud)
9 -# Author : Pavlos Emm. Katsoulakis (paul@netdata.cloud)
10 -# Author : Austin S. Hemmelgarn (austin@netdata.cloud)
11 -set -e
12 -
13 -# If we are not in netdata git repo, at the top level directory, fail
14 -TOP_LEVEL=$(basename "$(git rev-parse --show-toplevel 2>/dev/null || echo "")")
15 -CWD="$(git rev-parse --show-cdup 2>/dev/null || echo "")"
16 -if [ -n "$CWD" ] || [ "${TOP_LEVEL}" != "netdata" ]; then
17 - echo "Run as ./tests/installer/$(basename "$0") from top level directory of netdata git repository"
18 - echo "Kickstart validation process aborted"
19 - exit 1
20 -fi
21 -
22 -check_file() {
23 - README_MD5=$(grep "$1" "$2" | grep md5sum | grep curl | cut -d '"' -f2)
24 - KICKSTART_URL="https://my-netdata.io/$1"
25 - KICKSTART="packaging/installer/$1"
26 - KICKSTART_MD5="$(md5sum "${KICKSTART}" | cut -d' ' -f1)"
27 - CALCULATED_MD5="$(curl -Ss "${KICKSTART_URL}" | md5sum | cut -d ' ' -f 1)"
28 -
29 - # Conditionally run the website validation
30 - if [ -z "${LOCAL_ONLY}" ]; then
31 - echo "Validating ${KICKSTART_URL} against local file ${KICKSTART} with MD5 ${KICKSTART_MD5}.."
32 - if [ "$KICKSTART_MD5" = "$CALCULATED_MD5" ]; then
33 - echo "${KICKSTART_URL} looks fine"
34 - else
35 - echo "${KICKSTART_URL} md5sum does not match local file, it needs to be updated"
36 - exit 2
37 - fi
38 - fi
39 -
40 - echo "Validating documentation for $1"
41 - if [ "$KICKSTART_MD5" != "$README_MD5" ]; then
42 - echo "Invalid checksum for $1 in $2."
43 - echo "checksum in docs: $README_MD5"
44 - echo "current checksum: $KICKSTART_MD5"
45 - exit 2
46 - else
47 - echo "$1 MD5Sum is well documented"
48 - fi
49 -}
50 -
51 -check_file kickstart.sh packaging/installer/methods/kickstart.md
52 -
53 -echo "No problems found, exiting successfully!"
tests/installer/slack.sh deleted
-65
@@ -1,65 +0,0 @@
1 -# #No shebang necessary
2 -# BASH Lib: Simple incoming webhook for slack integration.
3 -#
4 -# The script expects the following parameters to be defined by the upper layer:
5 -# SLACK_NOTIFY_WEBHOOK_URL
6 -# SLACK_BOT_NAME
7 -# SLACK_CHANNEL
8 -#
9 -# Copyright:
10 -#
11 -# Author: Pavlos Emm. Katsoulakis <paul@netdata.cloud
12 -
13 -post_message() {
14 - TYPE="$1"
15 - MESSAGE="$2"
16 - CUSTOM_CHANNEL="$3"
17 -
18 - case "$TYPE" in
19 - "PLAIN_MESSAGE")
20 - curl -X POST --data-urlencode "payload={\"channel\": \"${SLACK_CHANNEL}\", \"username\": \"${SLACK_BOT_NAME}\", \"text\": \"${MESSAGE}\", \"icon_emoji\": \":space_invader:\"}" "${SLACK_NOTIFY_WEBHOOK_URL}"
21 - ;;
22 - "TRAVIS_MESSAGE")
23 - if [ "${TRAVIS_EVENT_TYPE}" == "pull_request" ] || [ "${TRAVIS_BRANCH}" != "master" ] ; then
24 - echo "Skipping notification due to build type."
25 - return 0
26 - fi
27 -
28 - if [ -n "${CUSTOM_CHANNEL}" ]; then
29 - echo "Sending travis message to custom channel ${CUSTOM_CHANNEL}"
30 - OPTIONAL_CHANNEL_INFO="\"channel\": \"${CUSTOM_CHANNEL}\","
31 - fi
32 -
33 - POST_MESSAGE="{
34 - ${OPTIONAL_CHANNEL_INFO}
35 - \"text\": \"${TRAVIS_REPO_SLUG}, ${MESSAGE}\",
36 - \"attachments\": [{
37 - \"text\": \"${TRAVIS_JOB_NUMBER}: Event type '${TRAVIS_EVENT_TYPE}', on '${TRAVIS_OS_NAME}' \",
38 - \"fallback\": \"I could not determine the build\",
39 - \"callback_id\": \"\",
40 - \"color\": \"#3AA3E3\",
41 - \"attachment_type\": \"default\",
42 - \"actions\": [
43 - {
44 - \"name\": \"${TRAVIS_BUILD_NUMBER}\",
45 - \"text\": \"Build #${TRAVIS_BUILD_NUMBER}\",
46 - \"type\": \"button\",
47 - \"url\": \"${TRAVIS_BUILD_WEB_URL}\"
48 - },
49 - {
50 - \"name\": \"${TRAVIS_JOB_NUMBER}\",
51 - \"text\": \"Job #${TRAVIS_JOB_NUMBER}\",
52 - \"type\": \"button\",
53 - \"url\": \"${TRAVIS_JOB_WEB_URL}\"
54 - }]
55 - }]
56 - }"
57 - echo "Sending ${POST_MESSAGE}"
58 - curl -X POST --data-urlencode "payload=${POST_MESSAGE}" "${SLACK_NOTIFY_WEBHOOK_URL}"
59 - ;;
60 - *)
61 - echo "Unrecognized message type \"$TYPE\" was given"
62 - return 1
63 - ;;
64 - esac
65 -}
tests/lifecycle.bats deleted
-60
@@ -1,60 +0,0 @@
1 -#!/usr/bin/env bats
2 -#
3 -# Netdata installation lifecycle testing script.
4 -# This is to validate the install, update and uninstall of netdata
5 -#
6 -# Copyright: SPDX-License-Identifier: GPL-3.0-or-later
7 -#
8 -# Author : Pavlos Emm. Katsoulakis <paul@netdata.cloud)
9 -#
10 -
11 -INSTALLATION="$BATS_TMPDIR/installation"
12 -ENV="${INSTALLATION}/netdata/etc/netdata/.environment"
13 -# list of files which need to be checked. Path cannot start from '/'
14 -FILES="usr/libexec/netdata/plugins.d/go.d.plugin
15 - usr/libexec/netdata/plugins.d/charts.d.plugin
16 - usr/libexec/netdata/plugins.d/python.d.plugin"
17 -
18 -DIRS="usr/sbin/netdata
19 - etc/netdata
20 - usr/share/netdata
21 - usr/libexec/netdata
22 - var/cache/netdata
23 - var/lib/netdata
24 - var/log/netdata"
25 -
26 -setup() {
27 - # If we are not in netdata git repo, at the top level directory, fail
28 - TOP_LEVEL=$(basename "$(git rev-parse --show-toplevel)")
29 - CWD=$(git rev-parse --show-cdup || echo "")
30 - if [ -n "${CWD}" ] || [ ! "${TOP_LEVEL}" == "netdata" ]; then
31 - echo "Run as ./tests/lifecycle/$(basename "$0") from top level directory of git repository"
32 - exit 1
33 - fi
34 -}
35 -
36 -@test "install netdata" {
37 - ./netdata-installer.sh --dont-wait --dont-start-it --auto-update --install-prefix "${INSTALLATION}"
38 -
39 - # Validate particular files
40 - for file in $FILES; do
41 - [ ! -f "$BATS_TMPDIR/$file" ]
42 - done
43 -
44 - # Validate particular directories
45 - for a_dir in $DIRS; do
46 - [ ! -d "$BATS_TMPDIR/$a_dir" ]
47 - done
48 -}
49 -
50 -@test "update netdata" {
51 - export ENVIRONMENT_FILE="${ENV}"
52 - ${INSTALLATION}/netdata/usr/libexec/netdata/netdata-updater.sh --not-running-from-cron
53 - ! grep "new_installation" "${ENV}"
54 -}
55 -
56 -@test "uninstall netdata" {
57 - ./packaging/installer/netdata-uninstaller.sh --yes --force --env "${ENV}"
58 - [ ! -f "${INSTALLATION}/netdata/usr/sbin/netdata" ]
59 - [ ! -f "/etc/cron.daily/netdata-updater" ]
60 -}
tests/updater_checks.bats deleted
-65
@@ -1,65 +0,0 @@
1 -#!/usr/bin/env bats
2 -#
3 -# This script is responsible for validating
4 -# updater capabilities after a change
5 -#
6 -# Copyright: SPDX-License-Identifier: GPL-3.0-or-later
7 -#
8 -# Author : Pavlos Emm. Katsoulakis <paul@netdata.cloud)
9 -#
10 -
11 -INSTALLATION="$BATS_TMPDIR/installation"
12 -ENV="${INSTALLATION}/netdata/etc/netdata/.environment"
13 -# list of files which need to be checked. Path cannot start from '/'
14 -FILES="usr/libexec/netdata/plugins.d/go.d.plugin
15 - usr/libexec/netdata/plugins.d/charts.d.plugin
16 - usr/libexec/netdata/plugins.d/python.d.plugin"
17 -
18 -DIRS="usr/sbin/netdata
19 - etc/netdata
20 - usr/share/netdata
21 - usr/libexec/netdata
22 - var/cache/netdata
23 - var/lib/netdata
24 - var/log/netdata"
25 -
26 -setup() {
27 - # If we are not in netdata git repo, at the top level directory, fail
28 - TOP_LEVEL=$(basename "$(git rev-parse --show-toplevel)")
29 - CWD=$(git rev-parse --show-cdup || echo "")
30 - if [ -n "${CWD}" ] || [ ! "${TOP_LEVEL}" == "netdata" ]; then
31 - echo "Run as ./tests/$(basename "$0") from top level directory of git repository"
32 - exit 1
33 - fi
34 -}
35 -
36 -@test "install stable netdata using kickstart" {
37 - ./packaging/installer/kickstart.sh --dont-wait --dont-start-it --auto-update --install-prefix ${INSTALLATION}
38 -
39 - # Validate particular files
40 - for file in $FILES; do
41 - [ ! -f "$BATS_TMPDIR/$file" ]
42 - done
43 -
44 - # Validate particular directories
45 - for a_dir in $DIRS; do
46 - [ ! -d "$BATS_TMPDIR/$a_dir" ]
47 - done
48 -
49 - # Cleanup
50 - rm -rf ${kickstart_file}
51 -}
52 -
53 -@test "update netdata using the new updater" {
54 - export ENVIRONMENT_FILE="${ENV}"
55 - # Run the updater, with the override so that it uses the local repo we have at hand
56 - export NETDATA_LOCAL_TARBALL_OVERRIDE="${PWD}"
57 - ${INSTALLATION}/netdata/usr/libexec/netdata/netdata-updater.sh --not-running-from-cron
58 - ! grep "new_installation" "${ENV}"
59 -}
60 -
61 -@test "uninstall netdata using latest uninstaller" {
62 - ./packaging/installer/netdata-uninstaller.sh --yes --force --env "${ENV}"
63 - [ ! -f "${INSTALLATION}/netdata/usr/sbin/netdata" ]
64 - [ ! -f "/etc/cron.daily/netdata-updater" ]
65 -}
tests/updater_checks.sh deleted
-71
@@ -1,71 +0,0 @@
1 -#!/usr/bin/env sh
2 -#
3 -# Wrapper script that installs the required dependencies
4 -# for the BATS script to run successfully
5 -#
6 -# Copyright: SPDX-License-Identifier: GPL-3.0-or-later
7 -#
8 -# Author : Pavlos Emm. Katsoulakis <paul@netdata.cloud)
9 -#
10 -
11 -echo "Syncing/updating repository.."
12 -
13 -blind_arch_grep_install() {
14 - # There is a peculiar docker case with arch, where grep is not available
15 - # This method will have to be triggered blindly, to inject grep so that we can process
16 - # It starts to become a chicken-egg situation with all the distros..
17 - echo "* * Workaround hack * *"
18 - echo "Attempting blind install for archlinux case"
19 -
20 - if command -v pacman > /dev/null 2>&1; then
21 - echo "Executing grep installation"
22 - pacman -Sy
23 - pacman --noconfirm --needed -S grep
24 - fi
25 -}
26 -blind_arch_grep_install || echo "Workaround failed, proceed as usual"
27 -
28 -running_os="$(grep '^ID=' /etc/os-release | cut -d'=' -f2 | sed -e 's/"//g')"
29 -
30 -case "${running_os}" in
31 -"centos"|"fedora"|"CentOS")
32 - echo "Running on CentOS, updating YUM repository.."
33 - yum clean all
34 - yum update -y
35 -
36 - echo "Installing extra dependencies.."
37 - yum install -y epel-release
38 - yum install -y bats curl
39 - ;;
40 -"debian"|"ubuntu")
41 - echo "Running ${running_os}, updating APT repository"
42 - apt-get update -y
43 - apt-get install -y bats curl
44 - ;;
45 -"opensuse-leap"|"opensuse-tumbleweed")
46 - zypper update -y
47 - zypper install -y bats curl
48 -
49 - # Fixes curl: (60) SSL certificate problem: unable to get local issuer certificate
50 - # https://travis-ci.com/netdata/netdata/jobs/267573805
51 - update-ca-certificates
52 - ;;
53 -"arch")
54 - pacman --noconfirm -Syu
55 - pacman --noconfirm --needed -S bash-bats curl libffi
56 - ;;
57 -"alpine")
58 - apk update
59 - apk add bash curl bats
60 - ;;
61 -*)
62 - echo "Running on ${running_os}, no repository preparation done"
63 - ;;
64 -esac
65 -
66 -# Run dependency scriptlet, before anything else
67 -#
68 -./packaging/installer/install-required-packages.sh --non-interactive netdata
69 -
70 -echo "Running BATS file.."
71 -bats --tap tests/updater_checks.bats
web/gui/main.js
+1 -2
@@ -4932,8 +4932,7 @@ function handleSignInMessage(e) {
4932
4933 netdataRegistryCallback(registryAgents);
4934 if (e.data.redirectURI && !window.location.href.includes(e.data.redirectURI)) {
4935 - // lgtm false-positive - redirectURI does not come from user input, but from iframe callback
4936 - window.location.replace(e.data.redirectURI); // lgtm[js/client-side-unvalidated-url-redirection]
4935 + window.location.replace(e.data.redirectURI);
4936 }
4937 }
4938