From ccf3f2391b0f09d7b51bf65bd8109b62aa33852d Mon Sep 17 00:00:00 2001 From: Andrew Grimberg Date: Wed, 3 May 2023 09:37:46 -0700 Subject: Refactor: Cleanup for pre-commit Change-Id: Iae33b5bd575ba40f4ecdceea4443aa4dc8b4a6cd Issue-ID: CIMAN-33 Signed-off-by: Andrew Grimberg --- jjb/ci-management/ci-management-coverity.yaml | 278 +++++++++++------------ jjb/ci-management/ci-management-packer-jobs.yaml | 164 ++++++------- jjb/ci-management/ci-management-views.yaml | 224 +++++++++--------- jjb/ci-management/ci-management.yaml | 108 ++++----- 4 files changed, 387 insertions(+), 387 deletions(-) (limited to 'jjb/ci-management') diff --git a/jjb/ci-management/ci-management-coverity.yaml b/jjb/ci-management/ci-management-coverity.yaml index c9a8f5e28..ff822ba9b 100644 --- a/jjb/ci-management/ci-management-coverity.yaml +++ b/jjb/ci-management/ci-management-coverity.yaml @@ -2,152 +2,152 @@ # Coverity Scan static analysis - job-template: - name: '{project-name}-coverity' - id: onap-gerrit-maven-coverity - description: > -
-

How to access Coverity Scan static analysis results

-
    -
  1. Visit Coverity Scan - project page.
  2. -
  3. If you have not been added to the project on Coverity Scan service yet: + name: "{project-name}-coverity" + id: onap-gerrit-maven-coverity + description: > +
    +

    How to access Coverity Scan static analysis results

      -
    1. Click on - Add me to project.
    2. -
    3. Wait till the project administrators grant you appropriate permissions.
    4. +
    5. Visit Coverity Scan + project page.
    6. +
    7. If you have not been added to the project on Coverity Scan service yet: +
        +
      1. Click on + Add me to project.
      2. +
      3. Wait till the project administrators grant you appropriate permissions.
      4. +
      +
    8. Click on + View Defects.
    -
  4. Click on - View Defects.
  5. -
-

Please note that processing data takes some time. You will get an email when it's done.

-

See more Coverity Scan HOWTOs on ONAP Developer Wiki.

-
+

Please note that processing data takes some time. You will get an email when it's done.

+

See more Coverity Scan HOWTOs on ONAP Developer Wiki.

+
- project-type: freestyle - node: '{build-node}' - branch: master - build-days-to-keep: 7 - build-timeout: 240 - cron: '@daily' - disabled: false - dry-run: false - git-url: '$GIT_URL/$PROJECT' - java-version: openjdk8 - mvn-global-settings: global-settings - mvn-opts: '' - mvn-params: '' - mvn-version: mvn35 - coverity-project-name: '' - coverity-token: '' - coverity-user-email: '' - coverity-search-paths: '' - coverity-search-exclude-regexs: '' - max-git-repo-age-hours: 0 - stream: master - submodule-recursive: true - submodule-timeout: 10 - submodule-disable: false - archive-artifacts: > - cov-int/BUILD.metrics.xml - cov-int/build-log.txt - cov-int/build-timings.txt - cov-int/cov-import-scm-timings.txt - cov-int/coverity-scan-analysed-files.txt - cov-int/scm-untracked-files.txt - cov-int/failed_jsp/* - cov-int/java-security-da-input.dat - cov-int/java-security-da-whitelist.dat - cov-int/jsp-compilation-log.txt - cov-int/jsp-debug-log.txt - cov-int/security.log + project-type: freestyle + node: "{build-node}" + branch: master + build-days-to-keep: 7 + build-timeout: 240 + cron: "@daily" + disabled: false + dry-run: false + git-url: "$GIT_URL/$PROJECT" + java-version: openjdk8 + mvn-global-settings: global-settings + mvn-opts: "" + mvn-params: "" + mvn-version: mvn35 + coverity-project-name: "" + coverity-token: "" + coverity-user-email: "" + coverity-search-paths: "" + coverity-search-exclude-regexs: "" + max-git-repo-age-hours: 0 + stream: master + submodule-recursive: true + submodule-timeout: 10 + submodule-disable: false + archive-artifacts: > + cov-int/BUILD.metrics.xml + cov-int/build-log.txt + cov-int/build-timings.txt + cov-int/cov-import-scm-timings.txt + cov-int/coverity-scan-analysed-files.txt + cov-int/scm-untracked-files.txt + cov-int/failed_jsp/* + cov-int/java-security-da-input.dat + cov-int/java-security-da-whitelist.dat + cov-int/jsp-compilation-log.txt + cov-int/jsp-debug-log.txt + cov-int/security.log - properties: - - lf-infra-properties: - build-days-to-keep: '{build-days-to-keep}' + properties: + - lf-infra-properties: + build-days-to-keep: "{build-days-to-keep}" - parameters: - - lf-infra-parameters: - project: '{project}' - branch: '{branch}' - stream: '{stream}' - - lf-infra-maven-parameters: - mvn-opts: '{mvn-opts}' - mvn-params: '{mvn-params}' - mvn-version: '{mvn-version}' - - string: - name: ARCHIVE_ARTIFACTS - default: '{archive-artifacts}' - description: Artifacts to archive to the logs server. - - string: - name: SEARCH_PATHS - default: '{coverity-search-paths}' - description: > - Additional directories to search for files to analyse by Coverity - Scan service (space separated). - - string: - name: SEARCH_EXCLUDE_REGEXS - default: '{coverity-search-exclude-regexs}' - description: > - File path patterns to exclude from analysis by Coverity Scan - service (e.g. 3rd-party or auto-generated sources, space - separated). - - string: - name: COVERITY_USER_EMAIL - default: '{coverity-user-email}' - description: > - E-mail address to receive analysis status report after submittion. - It must be a registered user on Coverity Scan service added as a - member to appropriate Coverity Scan project with "Maintainer/Owner" - role. - - bool: - 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) + parameters: + - lf-infra-parameters: + project: "{project}" + branch: "{branch}" + stream: "{stream}" + - lf-infra-maven-parameters: + mvn-opts: "{mvn-opts}" + mvn-params: "{mvn-params}" + mvn-version: "{mvn-version}" + - string: + name: ARCHIVE_ARTIFACTS + default: "{archive-artifacts}" + description: Artifacts to archive to the logs server. + - string: + name: SEARCH_PATHS + default: "{coverity-search-paths}" + description: > + Additional directories to search for files to analyse by Coverity + Scan service (space separated). + - string: + name: SEARCH_EXCLUDE_REGEXS + default: "{coverity-search-exclude-regexs}" + description: > + File path patterns to exclude from analysis by Coverity Scan + service (e.g. 3rd-party or auto-generated sources, space + separated). + - string: + name: COVERITY_USER_EMAIL + default: "{coverity-user-email}" + description: > + E-mail address to receive analysis status report after submittion. + It must be a registered user on Coverity Scan service added as a + member to appropriate Coverity Scan project with "Maintainer/Owner" + role. + - bool: + 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}' + triggers: + - timed: "{obj:cron}" - wrappers: - - lf-infra-wrappers: - build-timeout: '{build-timeout}' - jenkins-ssh-credential: '{jenkins-ssh-credential}' + wrappers: + - lf-infra-wrappers: + build-timeout: "{build-timeout}" + jenkins-ssh-credential: "{jenkins-ssh-credential}" - builders: - - lf-infra-pre-build - - lf-maven-install: - mvn-version: '{mvn-version}' - - lf-update-java-alternatives: - java-version: '{java-version}' - - lf-provide-maven-settings: - global-settings-file: global-settings - settings-file: '{mvn-settings}' - - inject: - properties-content: | - COVERITY_PROJECT_NAME={coverity-project-name} - COVERITY_TOKEN={coverity-token} - - shell: !include-raw-escape: - - ../../global-jjb/shell/common-variables.sh - - ../../shell/maven-coverity.sh - - lf-provide-maven-settings-cleanup + builders: + - lf-infra-pre-build + - lf-maven-install: + mvn-version: "{mvn-version}" + - lf-update-java-alternatives: + java-version: "{java-version}" + - lf-provide-maven-settings: + global-settings-file: global-settings + settings-file: "{mvn-settings}" + - inject: + properties-content: | + COVERITY_PROJECT_NAME={coverity-project-name} + COVERITY_TOKEN={coverity-token} + - shell: !include-raw-escape: + - ../../global-jjb/shell/common-variables.sh + - ../../shell/maven-coverity.sh + - lf-provide-maven-settings-cleanup - publishers: - - lf-infra-publish + publishers: + - lf-infra-publish - scm: - - lf-infra-gerrit-scm: - jenkins-ssh-credential: '{jenkins-ssh-credential}' - git-url: '{git-url}' - refspec: $GERRIT_REFSPEC - branch: $GERRIT_BRANCH - submodule-recursive: '{submodule-recursive}' - submodule-timeout: '{submodule-timeout}' - submodule-disable: '{submodule-disable}' - choosing-strategy: default + scm: + - lf-infra-gerrit-scm: + jenkins-ssh-credential: "{jenkins-ssh-credential}" + git-url: "{git-url}" + refspec: $GERRIT_REFSPEC + branch: $GERRIT_BRANCH + submodule-recursive: "{submodule-recursive}" + submodule-timeout: "{submodule-timeout}" + submodule-disable: "{submodule-disable}" + choosing-strategy: default diff --git a/jjb/ci-management/ci-management-packer-jobs.yaml b/jjb/ci-management/ci-management-packer-jobs.yaml index ab6543feb..aa367dfa6 100644 --- a/jjb/ci-management/ci-management-packer-jobs.yaml +++ b/jjb/ci-management/ci-management-packer-jobs.yaml @@ -1,98 +1,98 @@ --- - project: - name: packer-builder-jobs - jobs: - - gerrit-packer-merge - - gerrit-packer-verify-build - - project: ci-management - project-name: ci-management - branch: master - archive-artifacts: '**/*.log' - - build-node: centos8-builder-2c-1g - build-timeout: 90 - - platforms: - - centos-cs-8 - - ubuntu-18.04 - - ubuntu-20.04 - templates: builder - update-cloud-image: true + name: packer-builder-jobs + jobs: + - gerrit-packer-merge + - gerrit-packer-verify-build + + project: ci-management + project-name: ci-management + branch: master + archive-artifacts: "**/*.log" + + build-node: centos8-builder-2c-1g + build-timeout: 90 + + platforms: + - centos-cs-8 + - ubuntu-18.04 + - ubuntu-20.04 + templates: builder + update-cloud-image: true - project: - name: packer-docker-jobs - jobs: - - gerrit-packer-merge - - gerrit-packer-verify-build - - project: ci-management - project-name: ci-management - branch: master - archive-artifacts: '**/*.log' - - build-node: centos8-builder-2c-1g - build-timeout: 90 - - platforms: - - centos-7 - - centos-cs-8 - - ubuntu-18.04 - - ubuntu-20.04 - templates: docker - update-cloud-image: true + name: packer-docker-jobs + jobs: + - gerrit-packer-merge + - gerrit-packer-verify-build + + project: ci-management + project-name: ci-management + branch: master + archive-artifacts: "**/*.log" + + build-node: centos8-builder-2c-1g + build-timeout: 90 + + platforms: + - centos-7 + - centos-cs-8 + - ubuntu-18.04 + - ubuntu-20.04 + templates: docker + update-cloud-image: true - project: - name: packer-memcached-jobs - jobs: - - gerrit-packer-merge - - gerrit-packer-verify-build + name: packer-memcached-jobs + jobs: + - gerrit-packer-merge + - gerrit-packer-verify-build - project: ci-management - project-name: ci-management - branch: master - archive-artifacts: '**/*.log' + project: ci-management + project-name: ci-management + branch: master + archive-artifacts: "**/*.log" - build-node: centos8-builder-2c-1g - build-timeout: 90 + build-node: centos8-builder-2c-1g + build-timeout: 90 - platforms: - - ubuntu-20.04 - templates: memcached - update-cloud-image: true + platforms: + - ubuntu-20.04 + templates: memcached + update-cloud-image: true - project: - name: packer-redis-jobs - jobs: - - gerrit-packer-merge - - gerrit-packer-verify-build + name: packer-redis-jobs + jobs: + - gerrit-packer-merge + - gerrit-packer-verify-build - project: ci-management - project-name: ci-management - branch: master - archive-artifacts: '**/*.log' + project: ci-management + project-name: ci-management + branch: master + archive-artifacts: "**/*.log" - build-node: centos8-builder-2c-1g + build-node: centos8-builder-2c-1g - platforms: - - centos-cs-8 - templates: redis - update-cloud-image: true + platforms: + - centos-cs-8 + templates: redis + update-cloud-image: true - project: - name: packer-helm-jobs - jobs: - - gerrit-packer-merge - - gerrit-packer-verify-build - - project: ci-management - project-name: ci-management - branch: master - archive-artifacts: '**/*.log' - - build-node: centos8-builder-2c-1g - - platforms: - - ubuntu-20.04 - templates: helm - update-cloud-image: true + name: packer-helm-jobs + jobs: + - gerrit-packer-merge + - gerrit-packer-verify-build + + project: ci-management + project-name: ci-management + branch: master + archive-artifacts: "**/*.log" + + build-node: centos8-builder-2c-1g + + platforms: + - ubuntu-20.04 + templates: helm + update-cloud-image: true diff --git a/jjb/ci-management/ci-management-views.yaml b/jjb/ci-management/ci-management-views.yaml index 8986c694e..6ba346007 100644 --- a/jjb/ci-management/ci-management-views.yaml +++ b/jjb/ci-management/ci-management-views.yaml @@ -1,140 +1,140 @@ --- - _releng_view: &releng_view_common - name: releng-view-common - view-type: list - filter-executors: false - filter-queue: false - columns: - - status - - weather - - job - - last-success - - last-failure - - last-duration - - build-button - - jacoco - - find-bugs - - robot-list - recurse: false + name: releng-view-common + view-type: list + filter-executors: false + filter-queue: false + columns: + - status + - weather + - job + - last-success + - last-failure + - last-duration + - build-button + - jacoco + - find-bugs + - robot-list + recurse: false - project: - name: '00-Empty View' - views: - - common-view - view-name: '00-Empty View' - view-description: > - Empty job view. This is used as the default landing view to keep the - Jenkins UI responding better while a) under high load and b) when there - are a lot of jobs defined in the system - view-regex: '' + name: "00-Empty View" + views: + - common-view + view-name: "00-Empty View" + view-description: > + Empty job view. This is used as the default landing view to keep the + Jenkins UI responding better while a) under high load and b) when there + are a lot of jobs defined in the system + view-regex: "" - view: - name: 01-Recent - regex: '.*' - description: 'List of most recent jobs' - job-filters: - most-recent: - max-to-include: 25 - check-start-time: true - <<: *releng_view_common + name: 01-Recent + regex: ".*" + description: "List of most recent jobs" + job-filters: + most-recent: + max-to-include: 25 + check-start-time: true + <<: *releng_view_common - project: - name: All-Sonar - views: - - common-view - view-name: All-Sonar - view-regex: '^(?=.*-sonar)(?!.*-no-sonar).*' - view-description: 'List of Sonar jobs' + name: All-Sonar + views: + - common-view + view-name: All-Sonar + view-regex: "^(?=.*-sonar)(?!.*-no-sonar).*" + view-description: "List of Sonar jobs" - project: - name: All-Coverity - views: - - common-view - view-name: All-Coverity - view-regex: '.*-coverity' - view-description: > -

List of Coverity Scan static code analysis jobs

-

See how to add your component to Coverity Scan - on ONAP Developer Wiki.

+ name: All-Coverity + views: + - common-view + view-name: All-Coverity + view-regex: ".*-coverity" + view-description: > +

List of Coverity Scan static code analysis jobs

+

See how to add your component to Coverity Scan + on ONAP Developer Wiki.

- view: - name: CLM - description: 'List of CLM jobs' - regex: '.*-clm-.*' - view-type: list - filter-executors: false - filter-queue: false - columns: - - status - - weather - - job - - last-success - - last-failure - - last-duration - - build-button - - policy-violations - recurse: false + name: CLM + description: "List of CLM jobs" + regex: ".*-clm-.*" + view-type: list + filter-executors: false + filter-queue: false + columns: + - status + - weather + - job + - last-success + - last-failure + - last-duration + - build-button + - policy-violations + recurse: false - project: - name: CSIT - views: - - csit-view - view-name: CSIT - view-description: 'List of CSIT jobs' - view-regex: '^(?=.*-csit-.*)(?!.*-verify-csit.*).*' + name: CSIT + views: + - csit-view + view-name: CSIT + view-description: "List of CSIT jobs" + view-regex: "^(?=.*-csit-.*)(?!.*-verify-csit.*).*" - project: - name: CSIT-Verify - views: - - csit-view - view-name: CSIT-Verify - view-description: 'List of CSIT Verify jobs' - view-regex: '^.*-verify-csit.*' + name: CSIT-Verify + views: + - csit-view + view-name: CSIT-Verify + view-description: "List of CSIT Verify jobs" + view-regex: "^.*-verify-csit.*" - view: - name: Daily-Jobs - views: - - common-view - view-name: Daily-Jobs - view-description: 'List of Daily Jobs' - view-regex: '.*-daily' + name: Daily-Jobs + views: + - common-view + view-name: Daily-Jobs + view-description: "List of Daily Jobs" + view-regex: ".*-daily" - view: - name: External-Labs - views: - - common-view - view-name: External-Labs - view-description: 'List of External Labs jobs' - view-regex: '^lab-.*' + name: External-Labs + views: + - common-view + view-name: External-Labs + view-description: "List of External Labs jobs" + view-regex: "^lab-.*" - project: - name: Merge-Jobs - views: - - common-view - view-name: Merge-Jobs - view-description: 'List of Merge jobs' - view-regex: '.*-merge-.*' + name: Merge-Jobs + views: + - common-view + view-name: Merge-Jobs + view-description: "List of Merge jobs" + view-regex: ".*-merge-.*" - project: - name: Thirdparty - views: - - common-view - view-name: Thirdparty - view-description: 'List of Nexus Thirdparty dependencies jobs' - view-regex: '.*-thirdparty-.*' + name: Thirdparty + views: + - common-view + view-name: Thirdparty + view-description: "List of Nexus Thirdparty dependencies jobs" + view-regex: ".*-thirdparty-.*" - project: - name: Verify-Jobs - views: - - common-view - view-name: Verify-Jobs - view-description: 'List of Verify jobs' - view-regex: '^.*-verify-.*' + name: Verify-Jobs + views: + - common-view + view-name: Verify-Jobs + view-description: "List of Verify jobs" + view-regex: "^.*-verify-.*" - project: - name: Release-Jobs - views: - - common-view - view-name: Release-Jobs - view-description: 'List of Release Merge jobs' - view-regex: '.*release-merge.*' + name: Release-Jobs + views: + - common-view + view-name: Release-Jobs + view-description: "List of Release Merge jobs" + view-regex: ".*release-merge.*" diff --git a/jjb/ci-management/ci-management.yaml b/jjb/ci-management/ci-management.yaml index 863e1de17..5fb7aa2a8 100644 --- a/jjb/ci-management/ci-management.yaml +++ b/jjb/ci-management/ci-management.yaml @@ -1,70 +1,70 @@ --- - project: - name: ci-management-project-view - project-name: ci-management - views: - - project-view + name: ci-management-project-view + project-name: ci-management + views: + - project-view - project: - name: ci-management-info - project-name: ci-management - jobs: - - gerrit-info-yaml-verify - build-node: centos8-builder-2c-1g - project: ci-management - branch: master + name: ci-management-info + project-name: ci-management + jobs: + - gerrit-info-yaml-verify + build-node: centos8-builder-2c-1g + project: ci-management + branch: master - project: - name: ci-management-jobs - jobs: - - gerrit-jenkins-cfg-verify - - gerrit-jenkins-sandbox-cleanup - - gerrit-jjb-deploy-job - - gerrit-jjb-merge - - gerrit-jjb-verify - - gerrit-packer-verify + name: ci-management-jobs + jobs: + - gerrit-jenkins-cfg-verify + - gerrit-jenkins-sandbox-cleanup + - gerrit-jjb-deploy-job + - gerrit-jjb-merge + - gerrit-jjb-verify + - gerrit-packer-verify - project: 'ci-management' - project-name: 'ci-management' - archive-artifacts: '**/*.log' - branch: 'master' - build-timeout: '60' - build-node: 'centos8-builder-2c-1g' - jjb-version: 4.1.0 - # configure the gerrit-jjb-verify job - build-node-label-check: true - build-node-label-list: "" + project: "ci-management" + project-name: "ci-management" + archive-artifacts: "**/*.log" + branch: "master" + build-timeout: "60" + build-node: "centos8-builder-2c-1g" + jjb-version: 4.1.0 + # configure the gerrit-jjb-verify job + build-node-label-check: true + build-node-label-list: "" - project: - name: builder-openstack - jobs: - - gerrit-openstack-cron + name: builder-openstack + jobs: + - gerrit-openstack-cron - project: ci-management - project-name: ci-management - build-node: centos8-builder-2c-1g + project: ci-management + project-name: ci-management + build-node: centos8-builder-2c-1g - jenkins-urls: > - https://jenkins.onap.org - https://jenkins.onap.org/sandbox - openstack-cloud: vex + jenkins-urls: > + https://jenkins.onap.org + https://jenkins.onap.org/sandbox + openstack-cloud: vex - project: - name: openstack-update-cloud-images - jobs: - - gerrit-openstack-update-cloud-image + name: openstack-update-cloud-images + jobs: + - gerrit-openstack-update-cloud-image - project: ci-management - project-name: ci-management - branch: master - archive-artifacts: '**/*.log' - jenkins-ssh-credential: onap-jenkins-ssh + project: ci-management + project-name: ci-management + branch: master + archive-artifacts: "**/*.log" + jenkins-ssh-credential: onap-jenkins-ssh - build-node: centos8-builder-2c-1g - # update-cloud-image: true - build-timeout: 10 + build-node: centos8-builder-2c-1g + # update-cloud-image: true + build-timeout: 10 - gerrit-user: "jenkins-$SILO" - gerrit-host: "gerrit.onap.org" - gerrit-topic: "update-cloud-image" - reviewers-email: "onap-jobbuilder@jenkins.onap.org" + gerrit-user: "jenkins-$SILO" + gerrit-host: "gerrit.onap.org" + gerrit-topic: "update-cloud-image" + reviewers-email: "onap-jobbuilder@jenkins.onap.org" -- cgit 1.2.3-korg