summaryrefslogtreecommitdiffstats
path: root/.travis.yml
diff options
context:
space:
mode:
authorPaul Emm. Katsoulakis <34388743+paulkatsoulakis@users.noreply.github.com>2019-09-23 19:23:48 +0200
committerChris Akritidis <43294513+cakrit@users.noreply.github.com>2019-09-23 19:23:48 +0200
commitae4bb0286e615da649cd1f7c2011931cc35acf29 (patch)
tree2267f7c712733ffbeea5ae28ced42d0ed2c46634 /.travis.yml
parent2ba4d7cefabd46c6a22a9809f9ec331f1674764c (diff)
netdata/ci: nits and fixes around package release workflow (#6914)
* netdata/packaging: bring el/6 first, because this appears on all cases. Otherwise travis craps out the steps * netdata/ci: Attempt to sanitise workflow for master branch commits 1) Rename Packaging for release, now named: Support activities on main branch 2) Adjust instruction messages to reflect more realistically the activities 3) Put labeler first on the stage, since this will always run 4) Make changelog and tag for release conditionally run, so that it does not confuse people * netdata/ci: Sanitise workflow for release more (explained below) We need to clean up tagging logic more and in order to do this we need to bring tagger logic to travis.yml Then we have the complete control of tagging and triggering for changelog generation in travis. To mitigate this, we need to: 1) make tagger script a lirbary. Keep the tagging logic in a method and remove the things needed when it was an executable (checks, executions etc) 2) make travis handle GIT_TAG checking and setting at the beginning. We need this outside of any conditionals so that we have GIT_TAG result available inside the steps 3) COMMIT_TAG_POINTS_AT can now become GIT_TAG, since this is what we actually wanted. We just named differently before to avoid any weird conflicts 4) make changelog generation for release to NOT source tagger any more. Also make it fail in case GIT_TAG is not there, we wont run the script if git tag not in place so that should be error if it happens 5) Rename .travis/generate_changelog_for_release.sh -> .travis/create_changelog_for_release.sh 6) Rename .travis/generate_changelog_and_tag_release.sh -> .travis/generate_changelog_for_release.sh * netdata/ci: reinstate filename here. we basically do the git tag operation here still * netdata/ci: simplify more the changelog generation process 1) Rename create_changelog_for_release.sh -> create_changelog.sh 2) Add comments and the standard path checks in create_changelog.sh 3) Do some minor changes to help diff with nightlies changelog (no functional change though, primarily messages and move flags lower) 4) Inside generate_changelog_for_nightlies.sh, use create_changelog.sh and remove code related to create changelog process 5) in nightlies.sh, use standard shebang adn fix some messages Note: might follow up with more changes, this is just a first batch * netdata/packaging: reinstate accidentally removed OPTS from other iterationns (different engineer)
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml32
1 files changed, 18 insertions, 14 deletions
diff --git a/.travis.yml b/.travis.yml
index 5c12e52dd7..b4569326e7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -31,6 +31,10 @@ install:
- 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)"
+ - if [[ -z "${GIT_TAG}" ]]; then echo "Running set tag for release" && set_tag_for_release; fi;
@@ -58,7 +62,7 @@ stages:
if: branch = master AND type = cron
# Scheduled releases
- - name: Packaging for release
+ - name: Support activities on main branch
if: branch = master AND type != pull_request AND type != cron
- name: Publish for release
@@ -240,22 +244,22 @@ jobs:
- - stage: Packaging for release
+ - stage: Support activities on main branch
+ name: Run labeler on github issues
+ script: .travis/labeler.sh # labeler should be replaced with GitHub Actions when they hit GA
- name: Generate changelog and TAG the release (only on special commit msg)
- before_script: post_message "TRAVIS_MESSAGE" "Packaging step for release initiated" "${NOTIF_CHANNEL}"
+ - name: Generate changelog for release (only on special and tagged commit msg)
+ before_script: post_message "TRAVIS_MESSAGE" "Support activities on main branch initiated" "${NOTIF_CHANNEL}"
script:
- echo "GIT Branch:" && git branch
- echo "Last commit:" && git log -1
- echo "GIT Describe:" && git describe
- echo "packaging/version:" && cat packaging/version
- .travis/generate_changelog_and_tag_release.sh
- after_failure: post_message "TRAVIS_MESSAGE" "<!here> Packaging for release failed"
+ after_failure: post_message "TRAVIS_MESSAGE" "<!here> Changelog generation and tag of release, failed"
git:
depth: false
-
- - name: Run labeler on github issues
- script: .travis/labeler.sh # labeler should be replaced with GitHub Actions when they hit GA
+ if: commit_message =~ /\[netdata (release candidate|(major|minor|patch) release)\]/ AND tag !~ /(-rc)/ OR (env(GIT_TAG) IS present AND NOT env(GIT_TAG) IS blank)
@@ -411,19 +415,19 @@ jobs:
- if [ -n "${BUILDER_NAME}" ]; then rm -rf /home/${BUILDER_NAME}/* && echo "Cleared /home/${BUILDER_NAME} directory" || echo "Failed to clean /home/${BUILDER_NAME} directory"; fi;
- if [ -d "${PACKAGES_DIRECTORY}" ]; then rm -rf "${PACKAGES_DIRECTORY}"; fi;
- name: "Build & Publish RPM package for Enterprise Linux 7"
+ name: "Build & Publish RPM package for Enterprise Linux 6"
<<: *RPM_TEMPLATE
- if: commit_message =~ /\[Package (amd64|arm64) RPM( Enterprise Linux)?\]/
+ if: commit_message =~ /\[Package (amd64|arm64|i386) RPM( Enterprise Linux)?\]/
env:
- - BUILDER_NAME="builder" BUILD_DISTRO="centos" BUILD_RELEASE="7" BUILD_STRING="el/7"
+ - BUILDER_NAME="builder" BUILD_DISTRO="centos" BUILD_RELEASE="6" BUILD_STRING="el/6"
- PACKAGE_TYPE="rpm" REPO_TOOL="yum"
- ALLOW_SOFT_FAILURE_HERE=true
- - name: "Build & Publish RPM package for Enterprise Linux 6"
+ - name: "Build & Publish RPM package for Enterprise Linux 7"
<<: *RPM_TEMPLATE
- if: commit_message =~ /\[Package (amd64|arm64|i386) RPM( Enterprise Linux)?\]/
+ if: commit_message =~ /\[Package (amd64|arm64) RPM( Enterprise Linux)?\]/
env:
- - BUILDER_NAME="builder" BUILD_DISTRO="centos" BUILD_RELEASE="6" BUILD_STRING="el/6"
+ - BUILDER_NAME="builder" BUILD_DISTRO="centos" BUILD_RELEASE="7" BUILD_STRING="el/7"
- PACKAGE_TYPE="rpm" REPO_TOOL="yum"
- ALLOW_SOFT_FAILURE_HERE=true