#!/bin/bash

# Copyright 2019 Samsung Electronics Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -Eeuxo pipefail
PS4='+['$(readlink -f "$0")' ${FUNCNAME[0]%main}#$LINENO] '

echo '---> maven-coverity.sh'

SUBMISSION_ATTEMPTS=5
SUBMISSION_INITIAL_REST_INTERVAL=30 # seconds, will be doubled after each attempt

#-----------------------------------------------------------------------------
# Check for git repo changes within the last $MAX_GIT_REPO_AGE_HOURS hours
#
# It makes sense to set the value twice the 'cron' interval for the job (e.g.
# if 'cron: @daily', then MAX_GIT_REPO_AGE_HOURS=48)

if ! [[ "${MAX_GIT_REPO_AGE_HOURS:=0}" =~ ^[0-9]+$ ]]; then
  echo '[ERROR] MAX_GIT_REPO_AGE_HOURS must be non-negative integer.' \
    >&2
  exit 1
fi

if [ ${MAX_GIT_REPO_AGE_HOURS:=0} -ne 0 ]; then
  LAST_COMMIT_AGE=$(( $(date +%s) - $(git log -1 --pretty=format:%ct) ))

  if [ $LAST_COMMIT_AGE -le $(( MAX_GIT_REPO_AGE_HOURS *60*60 )) ]; then
    echo '[NOTICE] Git repository did not have any commits last' \
      "${MAX_GIT_REPO_AGE_HOURS} hours - no need to re-analyse it." \
      >&2
    exit 0
  fi
fi

#-----------------------------------------------------------------------------
# Process parameters for JS/TS/Python/Ruby/PHP files analysis

if [ -n "${SEARCH_PATHS:=}" ]; then
  for SEARCH_PATH in ${SEARCH_PATHS}; do
    if [ -d "${SEARCH_PATH}" ]; then
      FS_CAPTURE_SEARCH_PARAMS="${FS_CAPTURE_SEARCH_PARAMS:=} --fs-capture-search '${SEARCH_PATH}'"
    else
      echo "[ERROR] '${SEARCH_PATH}' from \$SEARCH_PATHS is not an" \
        "existing directory." \
        >&2
      exit 1
    fi
  done

  for EXCLUDE_REGEX in ${SEARCH_EXCLUDE_REGEXS:=}; do
    EXCLUDE_REGEX=${EXCLUDE_REGEX//\'/\'\\\'\'} # escape single quote "'"
    FS_CAPTURE_SEARCH_PARAMS="${FS_CAPTURE_SEARCH_PARAMS} --fs-capture-search-exclude-regex '${EXCLUDE_REGEX}'"

    # FIXME: a hack to deal with temporary(?) non-functional filter to ignore
    # specific source code parts by Coverity Scan ("--fs-capture-search-exclude-regex"
    # CLI parameter for "cov-build" tool). The hack can be removed when this CLI
    # parameter is fixed on Coverity side.
    FS_CAPTURE_SEARCH_EXCLUDE_HACK_PARAMS="${FS_CAPTURE_SEARCH_EXCLUDE_HACK_PARAMS:=} --tu-pattern 'file('\\''${EXCLUDE_REGEX}'\\'')'"
  done
fi

#-----------------------------------------------------------------------------
# Check if we are allowed to submit results to Coverity Scan service
# and have not exceeded our upload quota limits
# See also: https://scan.coverity.com/faq#frequency

if [ "${DRY_RUN}" != 'true' ]; then
  CURL_OUTPUT=$(
    curl \
      --verbose \
      --silent \
      --show-error \
      --fail \
      --form "project=${COVERITY_PROJECT_NAME}" \
      --form "token=${COVERITY_TOKEN}" \
      'https://scan.coverity.com/api/upload_permitted'
  )

  IS_COVERITY_UPLOAD_PERMITTED=$(
    echo "${CURL_OUTPUT}" \
    | jq '.upload_permitted'
  )
  if [ x"${IS_COVERITY_UPLOAD_PERMITTED}" != x'true' ]; then
    echo "[WARNING] Upload quota reached. Next upload permitted at" \
      $(echo "${CURL_OUTPUT}" | jq '.next_upload_permitted_at') \
      >&2
    exit 1
  fi
fi

#-----------------------------------------------------------------------------
# Get Coverity Scan build tool

curl \
  --verbose \
  --silent \
  --show-error \
  --fail \
  --form "project=${COVERITY_PROJECT_NAME}" \
  --form "token=${COVERITY_TOKEN}" \
  --output '/tmp/coverity_tool.tgz' \
  'https://scan.coverity.com/download/linux64'

curl \
  --verbose \
  --silent \
  --show-error \
  --fail \
  --form "project=${COVERITY_PROJECT_NAME}" \
  --form "token=${COVERITY_TOKEN}" \
  --form 'md5=1' \
  --output '/tmp/coverity_tool.md5' \
  'https://scan.coverity.com/download/linux64'

echo -n ' /tmp/coverity_tool.tgz' >> '/tmp/coverity_tool.md5'
md5sum --check '/tmp/coverity_tool.md5'

tar \
  --extract \
  --gunzip \
  --file='/tmp/coverity_tool.tgz' \
  --directory='/tmp'

COVERITY_BUILD_TOOL_DIRECTORY='/tmp/'$(
  head -1 <( \
    tar \
      --list \
      --gunzip \
      --file='/tmp/coverity_tool.tgz'
  )
)
COVERITY_BINARY_DIRECTORY="${COVERITY_BUILD_TOOL_DIRECTORY}bin"
test -d "${COVERITY_BINARY_DIRECTORY}" \
  || exit 1
export PATH="${PATH}:${COVERITY_BINARY_DIRECTORY}"

rm '/tmp/coverity_tool.tgz'

#-----------------------------------------------------------------------------
# Build

export MAVEN_OPTS

eval cov-build \
  --dir 'cov-int' \
  --append-log \
  ${FS_CAPTURE_SEARCH_PARAMS:=} \
  "${MVN}" clean install \
    --errors \
    --global-settings "${GLOBAL_SETTINGS_FILE}" \
    --settings "${SETTINGS_FILE}" \
    ${MAVEN_OPTIONS:=} \
    ${MAVEN_PARAMS:=}

# FIXME: a hack to deal with temporary(?) non-functional filter to ignore
# specific source code parts by Coverity Scan ("--fs-capture-search-exclude-regex"
# CLI parameter for "cov-build" tool). The hack can be removed when this CLI
# parameter is fixed on Coverity side.
if [ -n "${FS_CAPTURE_SEARCH_EXCLUDE_HACK_PARAMS:=}" ]; then
  eval cov-manage-emit \
    --dir 'cov-int' \
    ${FS_CAPTURE_SEARCH_EXCLUDE_HACK_PARAMS} \
    delete
fi

# Extract git data for analysed files
cov-import-scm \
  --dir 'cov-int' \
  --scm 'git'

# List all analysed files from the project
cov-manage-emit \
  --dir cov-int \
  list \
| grep \
  --invert-match \
  '^Translation unit:$' \
| sed \
  --regexp-extended \
  's!^[[:digit:]]+ -> !!' \
| sort \
> 'cov-int/coverity-scan-analysed-files.txt'

# List all analyzed files that are not tracked by SCM repository
cov-manage-emit \
  --dir cov-int \
  list-scm-unknown \
| sed \
  --regexp-extended \
  's!^[^ ]+ !!' \
| sort \
> 'cov-int/scm-untracked-files.txt'

if [ -s 'cov-int/scm-untracked-files.txt' ]; then
  echo '[WARNING] There are some files analysed but not tracked by SCM repository.' \
    'There might be 3rd-party or auto-generated sources. See details in' \
    '"cov-int/scm-untracked-files.txt" file.' \
    >&2
fi

#-----------------------------------------------------------------------------
# Submit results to Coverity service

if [ "${DRY_RUN}" != 'true' ]; then
  tar \
    --create \
    --gzip \
    --file='results.tgz' \
    'cov-int'

  for (( ATTEMPT=1; ATTEMPT<=SUBMISSION_ATTEMPTS; ATTEMPT++ )); do
    CURL_OUTPUT=$(
      curl \
        --verbose \
        --silent \
        --show-error \
        --fail \
        --write-out '\n%{http_code}' \
        --form "project=${COVERITY_PROJECT_NAME}" \
        --form "email=${COVERITY_USER_EMAIL}" \
        --form "token=${COVERITY_TOKEN}" \
        --form 'file=@results.tgz' \
        --form "version=${GIT_COMMIT:0:7}" \
        --form "description=${GIT_BRANCH}" \
        'https://scan.coverity.com/builds'
    )
    HTTP_RESPONSE_CODE=$(echo -n "${CURL_OUTPUT}" | tail -1)
    test x"${HTTP_RESPONSE_CODE}" = x"200" \
      && break

    sleep "${SUBMISSION_REST_INTERVAL:-$SUBMISSION_INITIAL_REST_INTERVAL}"

    SUBMISSION_REST_INTERVAL=$(( ${SUBMISSION_REST_INTERVAL:-$SUBMISSION_INITIAL_REST_INTERVAL} * 2 ))
  done

  HTTP_RESPONSE=$(echo -n "${CURL_OUTPUT}" | head -n -1 | tr -d '\n')
  if [ x"${HTTP_RESPONSE}" != x"Build successfully submitted." ]; then
    echo "[ERROR] Coverity Scan service responded with '${HTTP_RESPONSE}'" \
      "while 'Build successfully submitted.' expected." \
      >&2
    exit 1
  fi

  echo "[INFO] Build successfully submitted to Coverity Scan server." >&2
fi

#-----------------------------------------------------------------------------
exit 0
