diff --git a/.travis.yml b/.travis.yml index bf27016583..823ce91fc2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,40 +1,79 @@ # Control file for the Travis autobuilder # http://about.travis-ci.org/docs/user/build-configuration/ language: c compiler: - gcc +env: + global: + + # -- BEGIN Coverity Scan ENV + # Your normal Travis CI build command + # Normally this would be in the script: tag of .travis.yml, instead place it here + - STANDARD_BUILD_COMMAND="make" + + # Pre-configuration steps that should not be analyzed + # i.e. "./configure" + - COVERITY_SCAN_BUILD_COMMAND_PREPEND="" + + # The build command with all of the arguments that you would apply to a manual `cov-build` + - COVERITY_SCAN_BUILD_COMMAND="make" + + - PROJECT_NAME="ClusterLabs/pacemaker" + + # Email address for notifications related to this build + - OWNER_EMAIL="andrew@beekhof.net" + + # Regular expression selects on which branches to run analysis + # Be aware of quotas. Do not run on every branch/commit + - COVERITY_SCAN_BRANCH_PATTERN="coverity_scan" + + # COVERITY_SCAN_TOKEN via "travis encrypt" using the repo's public key + - secure: "qnrF7L8RejLUY7URdNe7XP4Hu4R55C0tvAuMRg4EjVtelOpw+nIgA7BLiX19q/70VjFuKcGnMhW28TdYl0uwMMdWKKxmwTim04Sy3UfOE2BPeuQOBphr+8s9gd0U1MO8j2dZ84A40t5Mkk946wWZwT0okpjOr/PfBOZkU3o87FM=" + + - COVERITY_SCAN_BUILD_URL="https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh" + - COVERITY_SCAN_BUILD="curl -s $COVERITY_SCAN_BUILD_URL | bash" + + # -- END Coverity Scan ENV + + # http://docs.travis-ci.com/user/build-configuration/#The-Build-Matrix + matrix: + - COVERITY_SCAN=0 + - COVERITY_SCAN=1 + # sudo add-apt-repository ppa:hotot-team before_install: - sudo bash -c 'echo "deb http://archive.ubuntu.com/ubuntu/ raring universe" >> /etc/apt/sources.list' - sudo apt-get update -qq install: - sudo apt-get install -qq automake autoconf chrpath libglib2.0-dev perl net-tools python libtool libxml2-dev bison flex uuid-dev libbz2-dev zlib1g-dev libltdl3-dev libgnutls-dev python-central python-dev libpam0g-dev libncurses5-dev libcorosync-dev libxslt1-dev libdbus-1-dev - sudo apt-get install -qq cluster-glue-dev heartbeat-dev libheartbeat2-dev - sudo apt-get install -qq libqb-dev/raring before_script: - ./autogen.sh - ./configure -script: make +script: +- if test ${COVERITY_SCAN} = 0; then "${STANDARD_BUILD_COMMAND}"; fi +- if test ${COVERITY_SCAN} = 1; then eval "${COVERITY_SCAN_BUILD}"; fi #after_script: after_success: - - ./BasicSanity.sh -V +- if test ${COVERITY_SCAN} = 0; then ./BasicSanity.sh -V; fi after_failure: - lsb_release -a - sudo cat /etc/apt/sources.list notifications: irc: "irc.freenode.org#pcmk" email: recipients: - andrew@beekhof.net # whitelist branches: only: - master