diff options
34 files changed, 3 insertions, 1275 deletions
diff --git a/.csslintrc b/.csslintrc deleted file mode 100644 index aacba956e5..0000000000 --- a/.csslintrc +++ /dev/null @@ -1,2 +0,0 @@ ---exclude-exts=.min.css ---ignore=adjoining-classes,box-model,ids,order-alphabetical,unqualified-attributes diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 1d00c5aa9c..34c9345503 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -5,7 +5,6 @@ * @Ferroin # Ownership by directory structure -.travis/ @Ferroin @tkatsoulas .github/ @Ferroin @tkatsoulas aclk/ @stelfrag @underhood build/ @Ferroin @tkatsoulas @@ -41,7 +40,6 @@ Dockerfile* @Ferroin @tkatsoulas # Ownership of specific files .gitignore @Ferroin @tkatsoulas @vkalintiris -.travis.yml @Ferroin @tkatsoulas .eslintrc @Ferroin @tkatsoulas .eslintignore @Ferroin @tkatsoulas .csslintrc @Ferroin @tkatsoulas diff --git a/.github/labeler.yml b/.github/labeler.yml index 2ff58d1272..4d3a614d4d 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -34,8 +34,6 @@ area/build: - "**/Makefile.am" area/ci: - - .travis/* - - .travis/**/* - .github/* - .github/**/* diff --git a/.remarkignore b/.remarkignore deleted file mode 100644 index 83b694704b..0000000000 --- a/.remarkignore +++ /dev/null @@ -1 +0,0 @@ -CHANGELOG.md
\ No newline at end of file diff --git a/.remarkrc.js b/.remarkrc.js deleted file mode 100644 index 55793e4384..0000000000 --- a/.remarkrc.js +++ /dev/null @@ -1,111 +0,0 @@ -// Source: https://github.com/codacy/codacy-remark-lint/raw/master/.remarkrc.js - -exports.settings = { - gfm: true, - commonmark: true, - looseTable: false, - spacedTable: false, - paddedTable: false, - fences: true, - rule: "-", - ruleRepetition: 3, - emphasis: "*", - strong: "*", - bullet: "-", - listItemIndent: "1", - incrementListMarker: true -}; - -const remarkPresetLintMarkdownStyleGuide = { - plugins: require("remark-preset-lint-markdown-style-guide").plugins.filter( - function(elem) { - return elem != require("remark-lint-no-duplicate-headings"); - } - ) -}; - -exports.plugins = [ - require("remark-preset-lint-consistent"), - require("remark-preset-lint-recommended"), - remarkPresetLintMarkdownStyleGuide, - [require("remark-lint-no-dead-urls"), { skipOffline: true }], - require("remark-lint-heading-whitespace"), - [require("remark-lint-maximum-line-length"), 120], - [require("remark-lint-maximum-heading-length"), 120], - [require("remark-lint-list-item-indent"), "tab-size"], - [require("remark-lint-list-item-spacing"), false], - [require("remark-lint-strong-marker"), "*"], - [require("remark-lint-emphasis-marker"), "_"], - [require("remark-lint-unordered-list-marker-style"), "-"], - [require("remark-lint-ordered-list-marker-style"), "."], - [require("remark-lint-ordered-list-marker-value"), "ordered"], - /*[ - require("remark-lint-write-good"), - [ - "warn", - { - passive: false, - illusion: true, - so: true, - thereIs: true, - weasel: true, - adverb: true, - tooWordy: true, - cliches: true, - eprime: false - } - ] - ],*/ - require("remark-validate-links"), - require("remark-frontmatter"), - /*[ - require("remark-retext"), - require("unified")().use({ - plugins: [ - require("retext-english"), - require("retext-syntax-urls"), - [ - require("retext-spell"), - { - ignoreLiteral: true, - dictionary: require("dictionary-en-us"), - ...personalDictionary - } - ], - [ - require("retext-sentence-spacing"), - { - preferred: 1 - } - ], - require("retext-repeated-words"), - require("retext-usage"), - require("retext-indefinite-article"), - require("retext-redundant-acronyms"), - [ - require("retext-contractions"), - { - straight: true, - allowLiteral: true - } - ], - require("retext-diacritics"), - [ - require("retext-quotes"), - { - preferred: "straight" - } - ], - require("retext-equality"), - require("retext-passive"), - require("retext-profanities"), - [ - require("retext-readability"), - { - age: 20 - } - ] - ] - }) - ]*/ -]; diff --git a/.squash.yml b/.squash.yml deleted file mode 100644 index 58e5910347..0000000000 --- a/.squash.yml +++ /dev/null @@ -1,7 +0,0 @@ -deployments: - netdata: - auto_deploy_on_commits: true - filename: ./packaging/docker/Dockerfile - context_path: ./ - port_forwarding: 80:19999 - 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 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index cf3ae2f662..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,68 +0,0 @@ ---- -dist: focal -language: c - -addons: - apt: - packages: ['moreutils'] - -env: - global: - - RELEASE_CHANNEL=nightly - -before_install: - - exec > >(ts -s '%H:%M:%.S ') 2>&1 - - source .travis/utils.sh - -# Install dependencies for all, once -# -install: - - 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 - - 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 - - source tests/installer/slack.sh - - export NOTIF_CHANNEL="automation-beta" - - if [ "${TRAVIS_REPO_SLUG}" = "netdata/netdata" ]; then export NOTIF_CHANNEL="automation"; fi; - - export BUILD_VERSION="$(cat packaging/version | cut -d'-' -f1)" - - export LATEST_RELEASE_VERSION="$(cat packaging/version | cut -d'-' -f1)" - - export LATEST_RELEASE_DATE="$(git log -1 --format=%aD "${LATEST_RELEASE_VERSION}" | cat)" - - if [[ "${TRAVIS_COMMIT_MESSAGE}" = *"[Build latest]"* ]]; then export BUILD_VERSION="$(cat packaging/version | cut -d'-' -f1,2 | sed -e 's/-/./g').latest"; fi; - - export DEPLOY_REPO="netdata" # Default production packaging repository - - export PACKAGING_USER="netdata" # Standard package cloud account - - if [[ "${TRAVIS_COMMIT_MESSAGE}" = *"[Build latest]"* ]]; then export DEPLOY_REPO="netdata-edge"; fi; - - export PACKAGE_CLOUD_RETENTION_DAYS=30 - - if [ ! "${TRAVIS_REPO_SLUG}" = "netdata/netdata" ]; then export DEPLOY_REPO="netdata-devel"; fi; - # These are release-related artifacts and have to be evaluated before we start doing conditional checks inside stages - - source ".travis/tagger.sh" - - export GIT_TAG="$(git tag --points-at)" - - git submodule update --init --recursive - - -# Setup notification system -# -notifications: - webhooks: - urls: - - https://app.fossa.io/hooks/travisci - -# Define the stage sequence and conditionals -# -stages: - # Mandatory runs, we always want these executed - - name: Build process - if: commit_message =~ /^((?!\[Package (amd64|arm64|i386) (DEB|RPM)( .*)?\]).)*$/ - - -# Define stage implementation details -# -jobs: - # This is a hook to help us introduce "soft" errors on our process - allow_failures: - - env: ALLOW_SOFT_FAILURE_HERE=true - include: - # Ensure netdata code builds successfully - - stage: Build process - - name: Standard netdata build - script: fakeroot ./netdata-installer.sh --install-prefix $HOME --dont-wait --dont-start-it --enable-plugin-nfacct --enable-plugin-freeipmi --disable-lto - env: CFLAGS='-O1 -Wall -Wextra -Wformat-signedness -fstack-protector-all -fno-common -DNETDATA_INTERNAL_CHECKS=1 -D_FORTIFY_SOURCE=2 -DNETDATA_VERIFY_LOCKS=1' - after_failure: post_message "TRAVIS_MESSAGE" "<!here> standard netdata build is failing (Still dont know which one, will improve soon)" diff --git a/.travis/README.md b/.travis/README.md deleted file mode 100644 index 8927dd4c54..0000000000 --- a/.travis/README.md +++ /dev/null @@ -1,149 +0,0 @@ -<!-- ---- -title: "Description of CI build configuration" -custom_edit_url: https://github.com/netdata/netdata/edit/master/.travis/README.md ---- ---> - -# Description of CI build configuration - -## Variables needed by travis - -- GITHUB_TOKEN - GitHub token with push access to repository -- DOCKER_USERNAME - Username (netdatabot) with write access to docker hub repository -- DOCKER_PWD - Password to docker hub -- encrypted_8daf19481253_key - key needed by openssl to decrypt GCS credentials file -- encrypted_8daf19481253_iv - IV needed by openssl to decrypt GCS credentials file -- COVERITY_SCAN_TOKEN - Token to allow coverity test analysis uploads -- SLACK_USERNAME - This is required for the slack notifications triggered by travis pipeline -- SLACK_CHANNEL - This is the channel that Travis will be posting messages -- 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 -- SLACK_BOT_NAME - This is the name your bot will appear with on slack - -## CI workflow details -Our CI pipeline is designed to help us identify and mitigate risks at all stages of implementation. -To accommodate this need, we used [Travis CI](http://www.travis-ci.com) as our CI/CD tool. -Our main areas of concern are: -1) Only push code that is working. That means fail fast so that we can improve before we reach the public - -2) Reduce the time to market to minimum, by streamlining the release process. - That means a lot of testing, a lot of consistency checks, a lot of validations - -3) Generated artifacts consistency. We should not allow broken software to reach the public. - When this happens, it's embarrassing and we struggle to eliminate it. - -4) We are an innovative company, so we love to automate :) - - -Having said that, here's a brief introduction to Netdata's improved CI/CD pipeline with Travis. -Our CI/CD lifecycle contains three different execution entry points: -1) A user opens a pull request to netdata/master: Travis will run a pipeline on the branch under that PR -2) A merge or commit happens on netdata/master. This will trigger travis to run, but we have two distinct cases in this scenario: - a) A user merges a pull request to netdata/master: Travis will run on master, after the merge. - b) A user runs a commit/merge with a special keyword (mentioned later). - This triggers a release for either minor, major or release candidate versions, depending the keyword -3) A scheduled job runs on master once per day: Travis will run on master at the scheduled interval - -To accommodate all three entry points our CI/CD workflow has a set of steps that run on all three entry points. -Once all these steps are successful, then our pipeline executes another subset of steps for entry points 2 and 3. -In travis terms the "steps" are "Stages" and within each stage we execute a set of activities called "jobs" in travis. - -### Always run: Stages that running on all three execution entry points - -## Code quality, linting, syntax, code style -At this early stage we iterate through a set of basic quality control checks: -- Shell checking: Run linters for our various BASH scripts -- Checksum validators: Run validators to ensure our installers and documentation are in sync -- Dashboard validator: We provide a pre-generated dashboard.js script file that we need to make sure its up to date. We validate that. - -## Build process -At this stage, basically, we build :-) -We do a baseline check of our build artifacts to guarantee they are not broken -Briefly our activities include: -- Verify docker builds successfully -- Run the standard Netdata installer, to make sure we build & run properly -- Do the same through 'make dist', as this is our stable channel for our kickstart files - -## Artifacts validation -At this point we know our software is building, we need to go through the a set of checks, to guarantee -that our product meets certain expectations. At the current stage, we are focusing on basic capabilities -like installing in different distributions, running the full lifecycle of install-run-update-install and so on. -We are still working on enriching this with more and more use cases, to get us closer to achieving full stability of our software. -Briefly we currently evaluate the following activities: -- Basic software unit testing (only run when changes happen that require it) -- Non containerized build and install on ubuntu 14.04 -- Non containerized build and install on ubuntu 18.04 -- Running the full Netdata lifecycle (install, update, uninstall) on ubuntu 18.04 -- Build and install on CentOS 7 -(More to come) - -### Nightly operations: Stages that run daily under cronjob -The nightly stages are related to the daily nightly activities, that produce our daily latest releases. -We also maintain a couple of cronjobs that run during the night to provide us with deeper insights, -like for example coverity scanning or extended kickstart checksum checks - -## Nightly operations -At this stage we run scheduled jobs and execute the nightly changelog generator, coverity scans, -labeler for our issues and extended kickstart files checksum validations. - -## Nightly release -During this stage we are building and publishing latest docker images, prepare the nightly artifacts -and deploy them (the artifacts) to our google cloud service provider. - - -### Publishing -Publishing is responsible for executing the major/minor/patch releases and is separated -in two stages: packaging preparation process and publishing. - -## Packaging for release -During packaging we are preparing the release changelog information and run the labeler. - -## Publish for release -The publishing stage is the most complex part in publishing. This is the stage were we generate and publish docker images, -prepare the release artifacts and get ready with the release draft. - -### Package Management workflows -As part of our goal to provide the best support to our customers, we have created a set of CI workflows to automatically produce -DEB and RPM for multiple distributions. These workflows are implemented under the templated stages '_DEB_TEMPLATE' and '_RPM_TEMPLATE'. -We currently plan to actively support the following Operating Systems, with a plan to further expand this list following our users needs. - -### Operating systems supported -The following distributions are supported -- Debian versions - - Buster (TBD - not released yet, check [debian releases](https://www.debian.org/releases/) for details) - - Stretch - - Jessie - - Wheezy - -- Ubuntu versions - - Disco - - Cosmic - - Bionic - - artful - -- Enterprise Linux versions (Covers Red Hat, CentOS, and Amazon Linux with version 6) - - Version 8 (TBD) - - Version 7 - - Version 6 - -- Fedora versions - - Version 31 (TBD) - - Version 30 - - Version 29 - - Version 28 - -- openSUSE versions - - 15.1 - - 15.0 - -- Gentoo distributions - - TBD - -### Architectures supported -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. - -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`. -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) -Sample patterns to trigger building of packages for all amd64 supported architecture: -- '[Package amd64 RPM]': Build & publish all amd64 available RPM packages -- '[Package amd64 DEB]': Build & publish all amd64 available DEB packages diff --git a/.travis/check_changelog_last_modification.sh b/.travis/check_changelog_last_modification.sh deleted file mode 100755 index ae0da877bc..0000000000 --- a/.travis/check_changelog_last_modification.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash -# -# This scriptlet validates nightlies age and notifies is if it gets too old -# -# Copyright: SPDX-License-Identifier: GPL-3.0-or-later -# -# Author : Pavlos Emm. Katsoulakis (paul@netdata.cloud) - -set -e - -# If we are not in netdata git repo, at the top level directory, fail -TOP_LEVEL=$(basename "$(git rev-parse --show-toplevel)") -CWD=$(git rev-parse --show-cdup || echo "") -if [ -n "${CWD}" ] || [ ! "${TOP_LEVEL}" == "netdata" ]; then - echo "Run as .travis/$(basename "$0") from top level directory of netdata git repository" - echo "Changelog age checker exited abnormally" - exit 1 -fi - -source tests/installer/slack.sh || echo "I could not load slack library" - -LAST_MODIFICATION="$(git log -1 --pretty="format:%at" CHANGELOG.md)" -CURRENT_TIME="$(date +"%s")" -TWO_DAYS_IN_SECONDS=172800 - -DIFF=$((CURRENT_TIME - LAST_MODIFICATION)) - -echo "Checking CHANGELOG.md last modification time on GIT.." -echo "CHANGELOG.md timestamp: ${LAST_MODIFICATION}" -echo "Current timestamp: ${CURRENT_TIME}" -echo "Diff: ${DIFF}" - -if [ ${DIFF} -gt ${TWO_DAYS_IN_SECONDS} ]; then - echo "CHANGELOG.md is more than two days old!" - post_message "TRAVIS_MESSAGE" "Hi <!here>, CHANGELOG.md was found more than two days old (Diff: ${DIFF} seconds)" "${NOTIF_CHANNEL}" -else - echo "CHANGELOG.md is less than two days old, fine" -fi diff --git a/.travis/create_artifacts.sh b/.travis/create_artifacts.sh deleted file mode 100755 index 27428913e6..0000000000 --- a/.travis/create_artifacts.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/usr/bin/env bash -# -# Artifacts creation script. -# This script generates two things: -# 1) The static binary that can run on all linux distros (built-in dependencies etc) -# 2) The distribution source tarball -# -# Copyright: SPDX-License-Identifier: GPL-3.0-or-later -# -# Author: Paul Emm. Katsoulakis <paul@netdata.cloud> -# -# shellcheck disable=SC2230 - -set -e - -# If we are not in netdata git repo, at the top level directory, fail -TOP_LEVEL=$(basename "$(git rev-parse --show-toplevel)") -CWD=$(git rev-parse --show-cdup || echo "") -if [ -n "${CWD}" ] || [ ! "${TOP_LEVEL}" == "netdata" ]; then - echo "Run as .travis/$(basename "$0") from top level directory of netdata git repository" - exit 1 -fi - -if [ ! "${TRAVIS_REPO_SLUG}" == "netdata/netdata" ]; then - echo "Beta mode on ${TRAVIS_REPO_SLUG}, not running anything here" - exit 0 -fi - -echo "--- Initialize git configuration ---" -git checkout "${1-master}" -git pull - -if [ "${RELEASE_CHANNEL}" == stable ]; then - echo "--- Set default release channel to stable ---" - sed -i 's/^RELEASE_CHANNEL="nightly" *#/RELEASE_CHANNEL="stable" #/' \ - netdata-installer.sh \ - packaging/makeself/install-or-update.sh -fi - -# Everything from this directory will be uploaded to GCS -mkdir -p artifacts -BASENAME="netdata-$(git describe)" - -# Make sure stdout is in blocking mode. If we don't, then conda create will barf during downloads. -# See https://github.com/travis-ci/travis-ci/issues/4704#issuecomment-348435959 for details. -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);' -echo "--- Create tarball ---" -command -v git > /dev/null && [ -d .git ] && git clean -d -f -autoreconf -ivf -./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/libexec --with-zlib --with-math --with-user=netdata CFLAGS=-O2 -make dist -mv "${BASENAME}.tar.gz" artifacts/ - -echo "--- Create self-extractor ---" -sxarches="x86_64 armv7l aarch64" -for arch in ${sxarches}; do - git clean -d -f - rm -rf packating/makeself/tmp - ./packaging/makeself/build-static.sh ${arch} -done - -# Needed for GCS -echo "--- Copy artifacts to separate directory ---" -#shellcheck disable=SC2164 -cp packaging/version artifacts/latest-version.txt -cd artifacts -ln -s "${BASENAME}.tar.gz" netdata-latest.tar.gz - -for arch in ${sxarches}; do - ln -s "netdata-${arch}-$(git describe).gz.run" netdata-${arch}-latest.gz.run -done - -ln -s "${BASENAME}.gz.run" netdata-latest.gz.run - -sha256sum -b ./* > "sha256sums.txt" -echo "checksums:" -cat sha256sums.txt diff --git a/.travis/create_changelog.sh b/.travis/create_changelog.sh deleted file mode 100755 index 83584aa666..0000000000 --- a/.travis/create_changelog.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright: SPDX-License-Identifier: GPL-3.0-or-later -# -# Author : Pavlos Emm. Katsoulakis (paul@netdata.cloud) -set -e - -# If we are not in netdata git repo, at the top level directory, fail -TOP_LEVEL=$(basename "$(git rev-parse --show-toplevel)") -CWD=$(git rev-parse --show-cdup || echo "") -if [ -n "$CWD" ] || [ ! "${TOP_LEVEL}" == "netdata" ]; then - echo "Run as .travis/$(basename "$0") from top level directory of netdata git repository" - echo "Changelog creation aborted" - exit 1 -fi - -ORGANIZATION=$(echo "$TRAVIS_REPO_SLUG" | awk -F '/' '{print $1}') -PROJECT=$(echo "$TRAVIS_REPO_SLUG" | awk -F '/' '{print $2}') -GIT_MAIL=${GIT_MAIL:-"bot@netdata.cloud"} -GIT_USER=${GIT_USER:-"netdatabot"} - -if [ -z ${GIT_TAG+x} ]; then - OPTS="" -else - OPTS="--future-release ${GIT_TAG}" -fi - -if [ ! "${TRAVIS_REPO_SLUG}" == "netdata/netdata" ]; then - echo "Beta mode on ${TRAVIS_REPO_SLUG}, nothing else to do here" - exit 0 -fi - -echo "--- Creating changelog ---" -git checkout master -git pull - -docker login -u "${DOCKER_USERNAME}" -p "${DOCKER_PWD}" -docker run -it -v "$(pwd)":/project markmandel/github-changelog-generator:latest \ - --user "${ORGANIZATION}" \ - --project "${PROJECT}" \ - --token "${GITHUB_TOKEN}" \ - --since-tag "v1.10.0" \ - --unreleased-label "**Next release**" \ - --no-issues \ - --exclude-labels "stale,duplicate,question,invalid,wontfix,discussion,no changelog" \ - --max-issues 500 \ - --bug-labels IGNOREBUGS ${OPTS} diff --git a/.travis/current_build_status b/.travis/current_build_status deleted file mode 100644 index 11a6d0a549..0000000000 --- a/.travis/current_build_status +++ /dev/null @@ -1 +0,0 @@ -changes-#18220 diff --git a/.travis/draft_release.sh b/.travis/draft_release.sh deleted file mode 100755 index ddc0f9ad51..0000000000 --- a/.travis/draft_release.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash -# -# Draft release generator. -# This utility is responsible for submitting a draft release to github repo -# It is agnostic of other processes, when executed it will draft a release, -# based on the most recent reachable tag. -# -# Requirements: -# - GITHUB_TOKEN variable set with GitHub token. Access level: repo.public_repo -# - artifacts directory in place -# - The directory is created by create_artifacts.sh mechanism -# - The artifacts need to be created with the same tag, obviously -# -# Copyright: SPDX-License-Identifier: GPL-3.0-or-later -# -# Author: Pavlos Emm. Katsoulakis <paul@netdata.cloud> - -set -e - -if [ ! -f .gitignore ]; then - echo "Run as ./travis/$(basename "$0") from top level directory of git repository" - exit 1 -fi - -echo "--- Initialize git configuration ---" -git checkout master -git pull - - -if [[ $(git describe) =~ -rc* ]]; then - echo "This is a release candidate tag, we do not generate a release draft" - exit 0 -fi - -# Load the tag, if any -GIT_TAG=$(git describe) - -if [ ! "${TRAVIS_REPO_SLUG}" == "netdata/netdata" ]; then - echo "Beta mode on ${TRAVIS_REPO_SLUG}, i was about to run for release (${GIT_TAG}), but i am emulating, so bye" - exit 0 -fi; - -echo "---- CREATING RELEASE DRAFT WITH ASSETS -----" -# Download hub -HUB_VERSION=${HUB_VERSION:-"2.5.1"} -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" -tar -C /tmp -xvf "/tmp/hub-linux-amd64-${HUB_VERSION}.tgz" -export PATH=$PATH:"/tmp/hub-linux-amd64-${HUB_VERSION}/bin" - -# Create a release draft -if [ -z ${GIT_TAG+x} ]; then - echo "Variable GIT_TAG is not set. Something went terribly wrong! Exiting." - exit 1 -fi -if [ "${GIT_TAG}" != "$(git tag --points-at)" ]; then - echo "ERROR! Current commit is not tagged. Stopping release creation." - exit 1 -fi -until hub release create --draft \ - -a "artifacts/netdata-${GIT_TAG}.tar.gz" \ - -a "artifacts/netdata-${GIT_TAG}.gz.run" \ - -a "artifacts/sha256sums.txt" \ - -m "${GIT_TAG}" "${GIT_TAG}"; do - sleep 5 -done diff --git a/.travis/gcs-credentials.json.enc b/.travis/gcs-credentials.json.enc Binary files differdeleted file mode 100644 index 5d1e7b2dd1..0000000000 --- a/.travis/gcs-credentials.json.enc +++ /dev/null diff --git a/.travis/generate_changelog_and_tag_release.sh b/.travis/generate_changelog_and_tag_release.sh deleted file mode 100755 index bf5555b4cd..0000000000 --- a/.travis/generate_changelog_and_tag_release.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash -# -# Script to automatically do a couple of things: -# - generate a new tag according to semver (https://semver.org/) -# - generate CHANGELOG.md by using https://github.com/skywinder/github-changelog-generator -# -# Tags are generated by searching for a keyword in last commit message. Keywords are: -# - [patch] or [fix] to bump patch number -# - [minor], [feature] or [feat] to bump minor number -# - [major] or [breaking change] to bump major number -# All keywords MUST be surrounded with square braces. -# -# Script uses git mechanisms for locking, so it can be used in parallel builds -# -# Requirements: -# - GITHUB_TOKEN variable set with GitHub token. Access level: repo.public_repo -# - docker -# -# This is a modified version of: -# https://github.com/paulfantom/travis-helper/blob/master/releasing/releaser.sh -# -# Copyright: SPDX-License-Identifier: GPL-3.0-or-later -# -# Author: Pavlos Emm. Katsoulakis <paul@netdata.cloud> -# Author: Pawel Krupa (@paulfantom) -set -e - -if [ ! -f .gitignore ]; then - echo "Run as ./travis/$(basename "$0") from top level directory of git repository" - exit 1 -fi - -echo "--- Changelog generator script starting ---" -# If we dont have a produced TAG there is nothing to do, so bail out happy -if [ -z "${GIT_TAG}" ]; then - echo "GIT_TAG is empty, that is not suppose to happen (Value: $GIT_TAG)" - exit 1 -fi - -if [ ! "${TRAVIS_REPO_SLUG}" == "netdata/netdata" ]; then - echo "Beta mode on ${TRAVIS_REPO_SLUG}, nothing to do on the changelog generator and tagging script for (${GIT_TAG}), bye" - exit 0 -fi - -echo "--- Initialize git configuration ---" -export GIT_MAIL="bot@netdata.cloud" -export GIT_USER="netdatabot" -git checkout master -git pull - -echo "---- UPDATE VERSION FILE ----" -echo "$GIT_TAG" >packaging/version -git add packaging/version - -echo "---- Create CHANGELOG -----" -./.travis/create_changelog.sh -git add |