Skip to content

Instantly share code, notes, and snippets.

View alexmaccabi's full-sized avatar

Alex alexmaccabi

  • unibeam.com
  • Interwebz
View GitHub Profile
@mika
mika / jenkins-job-builders.org
Created March 25, 2013 13:34
Jenkins Job creators + editors
@ferventcoder
ferventcoder / DefaultJenkinsEmail
Last active October 29, 2021 14:09
Jenkins Email-ext (Editable Email Notifications)
Subject: Jenkins ${BUILD_STATUS} [#${BUILD_NUMBER}] - ${PROJECT_NAME}
Content Type: Plain Text (text/plain)
Trigger for matrix projects: Trigger for each configuration
Choose "Advanced", "Add a Trigger" and choose the following triggers:
Fixed, Failure, Unstable, Still Failing, Still Unstable
Ensure that "Send To Recipient List" is checked for all of these at the very least.
Fixed is the only trigger you will need to expand to change the Content.
#!/bin/bash
# Check if a value exists in an array
# @param $1 mixed Needle
# @param $2 array Haystack
# @return Success (0) if value exists, Failure (1) otherwise
# Usage: in_array "$needle" "${haystack[@]}"
# See: http://fvue.nl/wiki/Bash:_Check_if_array_element_exists
in_array() {
local hay needle=$1