Add workaround for broken git repo polling by Jenkins 56/94756/2
authorArtem Naluzhnyy <A.Naluzhnyy@samsung.com>
Mon, 2 Sep 2019 12:27:36 +0000 (14:27 +0200)
committerArtem Naluzhnyy <a.naluzhnyy@samsung.com>
Tue, 3 Sep 2019 09:43:32 +0000 (09:43 +0000)
commitdcc213dedc51a82832f90d644f14b28a3e55aa18
tree1f5f90bb2013b954a5a7af3197f73e451324699c
parent5b0faffcb99bb520786c45d9f58d83a094dcf7b1
Add workaround for broken git repo polling by Jenkins

To save our Jenkins lab resources and Coverity Scan submission quota we
can run the scan if there were recent commits only.

At the moment the following JJB configuration does not work properly for
ONAP repositories:
  triggers:
    - pollscm:
        cron: '@daily'

As a workaround a new job build parameter is introduced -
'max-git-repo-age-hours'. If set to non-zero run the code scan only if
there were no git repository commits 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).

Issue-ID: CIMAN-260
Signed-off-by: Artem Naluzhnyy <A.Naluzhnyy@samsung.com>
Change-Id: I82ce092e9b8bb423e9db8b3958d6cfa3b527b33b
jjb/ci-management/ci-management-coverity.yaml
shell/maven-coverity.sh