Skip to content

Commit

Permalink
stop spamming devs with inappropriate promote job failures
Browse files Browse the repository at this point in the history
  • Loading branch information
seandst committed Jun 20, 2016
1 parent b74db73 commit dd66931
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion ci/jobs/build-automation.yaml
Expand Up @@ -125,4 +125,5 @@
manager.build.getBuiltOn().toComputer().setTemporarilyOffline(true)
if(manager.logContains(".*Promotion blocked.*")) {{ manager.buildUnstable() }}
- irc-notify-all-summary
- email-notify-owners
# - email-notify-owners
# don't notify owners until #2022 is fixed
12 changes: 8 additions & 4 deletions ci/promote-build.py
Expand Up @@ -5,8 +5,8 @@
decision is made to promote the build, copy the built packages from their staging location to
their tested location, as determined by the release config named on the command line.
If promotion is blocked for any reason, "Promotion blocked" should be printed to stdout.
Jenkins will use that text to differentiate job failures (red ball/failure) from promotion
If promotion is blocked for any reason, "Promotion blocked" will be printed to stdout.
Jenkins can use that text to differentiate job failures (red ball/failure) from promotion
criteria no being met (yellow ball/unstable). This makes it easy for folks looking at the
job to know if the job itself worked and decided not to promote a build, or if the job is
broken and needs developer attention.
Expand All @@ -31,7 +31,8 @@

def main():
"""Parse arguments and return an exit code (e.g. 0 for success, >=1 for failure)"""
parser = argparse.ArgumentParser()
parser = argparse.ArgumentParser(
description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument('config', help='The name of the release config file to load')
parser.add_argument('--job-prefix', action='append', dest='prefixes',
help='Prefix of jobs to wait to finish and succeed before promoting, '
Expand All @@ -57,7 +58,10 @@ def main():

if not promote:
print "Promotion blocked by check function, exiting now."
return 1
# Returning 0 here, since this is a "normal" script exit. Jenkins scripting
# can be used to parse the output and change the build to Unstable, if desired,
# based on the printing of this message, as mentioned in the script's docstring.
return 0

# Rsync the repos from the source dir to the target dir
# source dir trailing slash is needed: it ensures that the *contents* of the
Expand Down

0 comments on commit dd66931

Please sign in to comment.