sonar: remove sonar-scan from allow_failures

Signed-off-by: Nicolas Oliver <dario.n.oliver@intel.com>
This commit is contained in:
Nicolas Oliver 2017-08-15 11:43:46 -03:00
parent 9e09f899cf
commit a99e32fc13
2 changed files with 19 additions and 6 deletions

View File

@ -15,7 +15,6 @@ before_install:
jobs:
fast_finish: true
allow_failures:
- env: TARGET=sonar-scan
- env: TARGET=ipk
include:
- &run-with-clang

View File

@ -23,10 +23,24 @@
# - UPM_SRC_DIR - path to upm's git clone in the Docker container.
# Check required environment variables and exit if they are not set
UPM_SRC_DIR=${UPM_SRC_DIR:?value not provided}
SONAR_PROJ_KEY=${SONAR_PROJ_KEY:?value not provided}
SONAR_ORG=${SONAR_ORG:?value not provided}
SONAR_TOKEN=${SONAR_TOKEN:?value not provided}
function check_environment {
VAR_NAME=$1
VAR_VALUE=$2
# Check required parameters
VAR_NAME=${VAR_NAME:?value not provided}
# Chek if variable is set
if [ -z "${VAR_VALUE}" ]; then
echo "Required environment variable ${VAR_NAME} is not defined. Skipping Execution..."
exit 0;
else
echo "Required environment variable ${VAR_NAME} is set."
fi
}
check_environment "UPM_SRC_DIR" ${UPM_SRC_DIR}
check_environment "SONAR_PROJ_KEY" ${SONAR_PROJ_KEY}
check_environment "SONAR_ORG" ${SONAR_ORG}
check_environment "SONAR_TOKEN" ${SONAR_TOKEN}
bw_output_path="${UPM_SRC_DIR}/build/bw-output"
@ -57,7 +71,7 @@ if [ "${TRAVIS_BRANCH}" == "master" -a "${TRAVIS_PULL_REQUEST}" == "false" ]; th
sonar_cmd="${sonar_cmd_base}"
elif [ "${TRAVIS_PULL_REQUEST}" != "false" -a "${TRAVIS_PULL_REQUEST_SLUG}" == "${TRAVIS_REPO_SLUG}" ]; then
# Internal PR - do a preview scan with report to the PR
${GITHUB_TOKEN:?value not provided}
check_environment "GITHUB_TOKEN" ${GITHUB_TOKEN}
echo "Performing internal pull request scan"
sonar_cmd="${sonar_cmd_base} \