Add an environment variable check to allow disabling nightlies. (#7765)

This adds a check to the nightly build stages to allow skipping them if
a specific environment variable is not set by Travis.

This allows us to disable nightlies by removing the environment variable
instead of needing to remove the cron job itself, thus ensuring that
nightlies keep happening at the same time each day regardless.

The specific variable is named `RUN_NIGHTLY`, and must be set to 'yes'
to enable nightly builds.
This commit is contained in:
Austin S. Hemmelgarn 2020-01-23 08:25:11 -05:00 committed by GitHub
parent 352c3941f5
commit cb38b91c28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -47,16 +47,16 @@ stages:
- name: Build process
- name: Artifacts validation
- name: Artifacts validation on bare OS, stable to current lifecycle checks
if: branch = master AND (type = pull_request OR type = cron)
if: branch = master AND (type = pull_request OR (type = cron AND env(RUN_NIGHTLY) = yes))
# Nightly operations
- name: Nightly operations
if: branch = master AND type = cron
if: branch = master AND type = cron AND env(RUN_NIGHTLY) = yes
- name: Nightly release
if: branch = master AND type = cron
if: branch = master AND type = cron AND env(RUN_NIGHTLY) = yes
- name: Trigger deb and rpm package build (nightly release)
if: branch = master AND type = cron
if: branch = master AND type = cron AND env(RUN_NIGHTLY) = yes
# Scheduled releases
- name: Support activities on main branch