Browse Source

decouple nightly cron jobs from packaging stage (#4559)

* decouple nightly cron jobs from packaging stage

* do not fail when there is no new changelog
Paweł Krupa 6 years ago
parent
commit
839d148857
2 changed files with 9 additions and 10 deletions
  1. 8 9
      .travis.yml
  2. 1 1
      .travis/generate_changelog.sh

+ 8 - 9
.travis.yml

@@ -8,7 +8,9 @@ stages:
 - test
 - build
 - name: packaging
-  if: branch = master AND type != pull_request
+  if: branch = master AND type != pull_request AND type != cron
+- name: nightlies
+  if: branch = master AND type = cron
 
 jobs:
   include:
@@ -47,22 +49,19 @@ jobs:
     script: ".travis/releaser.sh"
     git:
       depth: false
-    if: type != cron
-  - name: Nightly tarball and self-extractor build
+
+  - stage: nightlies
+    name: tarball and self-extractor build
     install: sudo apt-get install -y gnupg libcap2-bin zlib1g-dev uuid-dev fakeroot
     script: ".travis/firehol_create_artifacts.sh"
-    if: type = cron
-  - name: Nightly docker images
+  - name: docker images
     install: sudo apt update -y && sudo apt install -y --only-upgrade docker-ce && docker info
     script: "docker/build.sh"
     env: REPOSITORY="netdata/netdata"
-    if: type = cron
-  - name: Nightly changelog generation
+  - name: changelog generation
     script: ".travis/generate_changelog.sh"
-    if: type = cron
   - name: labeler # This job should be replaced with GitHub Actions when they hit GA
     script: ".travis/labeler.sh"
-    if: type = cron
 
 notifications:
   webhooks: https://app.fossa.io/hooks/travisci

+ 1 - 1
.travis/generate_changelog.sh

@@ -32,5 +32,5 @@ docker run -it -v "$(pwd)":/project markmandel/github-changelog-generator:latest
 
 echo "--- Uploading changelog ---"
 git add CHANGELOG.md
-git commit -m '[ci skip] Automatic changelog update'
+git commit -m '[ci skip] Automatic changelog update' || exit 0
 git push "https://${GITHUB_TOKEN}:@$(git config --get remote.origin.url | sed -e 's/^https:\/\///')"