From dcc213dedc51a82832f90d644f14b28a3e55aa18 Mon Sep 17 00:00:00 2001 From: Artem Naluzhnyy Date: Mon, 2 Sep 2019 14:27:36 +0200 Subject: 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 Change-Id: I82ce092e9b8bb423e9db8b3958d6cfa3b527b33b --- jjb/ci-management/ci-management-coverity.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'jjb') diff --git a/jjb/ci-management/ci-management-coverity.yaml b/jjb/ci-management/ci-management-coverity.yaml index fadea8882..6003bf24e 100644 --- a/jjb/ci-management/ci-management-coverity.yaml +++ b/jjb/ci-management/ci-management-coverity.yaml @@ -41,6 +41,7 @@ coverity-user-email: '' coverity-search-paths: '' coverity-search-exclude-regexs: '' + max-git-repo-age-hours: 0 stream: master submodule-recursive: true submodule-timeout: 10 @@ -101,6 +102,14 @@ name: DRY_RUN default: '{dry-run}' description: Do not submit results to Coverity Scan server at the end of the build. + - string: + name: 'MAX_GIT_REPO_AGE_HOURS' + default: '{max-git-repo-age-hours}' + description: > + 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) triggers: - timed: '{obj:cron}' -- cgit