From 28125ce75037d1b5221dce8b40d69aa5458341cf Mon Sep 17 00:00:00 2001 From: Vratko Polak Date: Thu, 9 Jan 2020 13:00:43 +0100 Subject: [PATCH] Order macros alphabetically + Rename csit-vpp and vpp-csit macros to similar naming convention. Change-Id: I042db66cf52e19f08a60854e8672146a0d6a0fc0 Signed-off-by: Vratko Polak --- jjb/global-macros.yaml | 499 +++++++++++++++++++++++++------------------------ 1 file changed, 255 insertions(+), 244 deletions(-) diff --git a/jjb/global-macros.yaml b/jjb/global-macros.yaml index c4ee66cb4..3d9c102ea 100644 --- a/jjb/global-macros.yaml +++ b/jjb/global-macros.yaml @@ -12,180 +12,183 @@ # limitations under the License. --- -# Global macros +# Global macros. #### PARAMETERS +# Keep 'parameter' entries ordered alphabetically, please. - parameter: - name: project-parameter + name: arch-parameter parameters: - string: - name: PROJECT - default: '{project}' - # yamllint disable-line rule:line-length - description: "JJB configured PROJECT parameter to identify a Gerrit project" + name: ARCH + default: '{arch}' + description: "Architecture parameter" - parameter: - name: gerrit-parameter + name: compiler-parameter parameters: - string: - name: GERRIT_BRANCH - default: '{branch}' - description: "JJB configured GERRIT_BRANCH parameter" + name: CC + default: '{cc}' + description: "CC parameter, can be gnu or clang" - parameter: - name: gerrit-project-parameter + name: csit-fail-on-crc-mismatch-parameter parameters: - string: - name: GERRIT_PROJECT - default: '{project}' - description: "GERRIT_PROJECT parameter if not given by trigger" + name: FDIO_CSIT_FAIL_ON_CRC_MISMATCH + default: '{fail-on-crc-mismatch}' + description: "If true, CRC is checked, else compatibility is tested." - parameter: - name: os-parameter + name: csit-perf-trial-duration-parameter parameters: - string: - name: OS - default: '{os}' - description: "OS parameter" + name: CSIT_PERF_TRIAL_DURATION + default: "{csit-perf-trial-duration}" + description: "Duration of a trial measurement in BMRR tests." - parameter: - name: gerrit-refspec-parameter + name: csit-perf-trial-multiplicity-parameter parameters: - string: - name: GERRIT_REFSPEC - default: '{refspec}' - description: "GERRIT_REFSPEC parameter not given by trigger" + name: CSIT_PERF_TRIAL_MULTIPLICITY + default: "{csit-perf-trial-multiplicity}" + description: "Number of subsamples for BMRR tests." - parameter: - name: maven-project-parameter + name: gerrit-csit-refspec-parameter parameters: - string: - name: MAVEN_SELECTOR - default: '{maven}' - description: 'Maven selector to be used by shell scripts' + name: CSIT_REF + default: '' + # yamllint disable-line rule:line-length + description: "GERRIT_REFSPEC parameter to override separately cloned CSIT repository, leave empty for autodetection / no override." - parameter: - name: maven-exec + name: gerrit-event-comment-text-parameter parameters: - string: - name: MVN + name: GERRIT_EVENT_COMMENT_TEXT + default: '' # yamllint disable-line rule:line-length - default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{maven-version}/bin/mvn' - description: 'Maven selector to be used by shell scripts' + description: "GERRIT_EVENT_COMMENT_TEXT parameter not given by trigger" - parameter: - name: repo-name-parameter + name: gerrit-event-type-parameter parameters: - string: - name: REPO_NAME - default: '{repo-name}' - description: 'Name of repo to which to publish packaging' + name: GERRIT_EVENT_TYPE + default: '' + description: "GERRIT_EVENT_TYPE parameter not given by trigger" - parameter: - name: compiler-parameter + name: gerrit-parameter parameters: - string: - name: CC - default: '{cc}' - description: "CC parameter, can be gnu or clang" + name: GERRIT_BRANCH + default: '{branch}' + description: "JJB configured GERRIT_BRANCH parameter" - parameter: - name: is-csit-vpp-job-parameter + name: gerrit-project-parameter parameters: - string: - name: IS_CSIT_VPP_JOB - default: '{is-csit-vpp-job}' - description: "Parameter is True if this is a CSIT vpp job." + name: GERRIT_PROJECT + default: '{project}' + description: "GERRIT_PROJECT parameter if not given by trigger" - parameter: - name: stream-parameter + name: gerrit-refspec-parameter parameters: - string: - name: STREAM - default: '{stream}' - description: "Stream job parameter to be used in shell scripts." + name: GERRIT_REFSPEC + default: '{refspec}' + description: "GERRIT_REFSPEC parameter not given by trigger" - parameter: - name: topo-parameter + name: is-csit-vpp-job-parameter parameters: - string: - name: TOPO - default: '{topo}' - description: "Topology parameter" + name: IS_CSIT_VPP_JOB + default: '{is-csit-vpp-job}' + description: "Parameter is True if this is a CSIT vpp job." - parameter: - name: arch-parameter + name: maven-exec parameters: - string: - name: ARCH - default: '{arch}' - description: "Architecture parameter" + name: MVN + # yamllint disable-line rule:line-length + default: '/w/tools/hudson.tasks.Maven_MavenInstallation/{maven-version}/bin/mvn' + description: 'Maven selector to be used by shell scripts' - parameter: - name: csit-fail-on-crc-mismatch-parameter + name: maven-project-parameter parameters: - string: - name: FDIO_CSIT_FAIL_ON_CRC_MISMATCH - default: '{fail-on-crc-mismatch}' - description: "If true, CRC is checked, else compatibility is tested." + name: MAVEN_SELECTOR + default: '{maven}' + description: 'Maven selector to be used by shell scripts' - parameter: - name: gerrit-event-type-parameter + name: os-parameter parameters: - string: - name: GERRIT_EVENT_TYPE - default: '' - description: "GERRIT_EVENT_TYPE parameter not given by trigger" + name: OS + default: '{os}' + description: "OS parameter" - parameter: - name: gerrit-event-comment-text-parameter + name: project-parameter parameters: - string: - name: GERRIT_EVENT_COMMENT_TEXT - default: '' + name: PROJECT + default: '{project}' # yamllint disable-line rule:line-length - description: "GERRIT_EVENT_COMMENT_TEXT parameter not given by trigger" + description: "JJB configured PROJECT parameter to identify a Gerrit project" - parameter: - name: gerrit-csit-refspec-parameter + name: repo-name-parameter parameters: - string: - name: CSIT_REF - default: '' - # yamllint disable-line rule:line-length - description: "GERRIT_REFSPEC parameter to override separately cloned CSIT repository, leave empty for autodetection / no override." + name: REPO_NAME + default: '{repo-name}' + description: 'Name of repo to which to publish packaging' - parameter: - name: csit-perf-trial-duration-parameter + name: stream-parameter parameters: - string: - name: CSIT_PERF_TRIAL_DURATION - default: "{csit-perf-trial-duration}" - description: "Duration of a trial measurement in BMRR tests." + name: STREAM + default: '{stream}' + description: "Stream job parameter to be used in shell scripts." - parameter: - name: csit-perf-trial-multiplicity-parameter + name: topo-parameter parameters: - string: - name: CSIT_PERF_TRIAL_MULTIPLICITY - default: "{csit-perf-trial-multiplicity}" - description: "Number of subsamples for BMRR tests." + name: TOPO + default: '{topo}' + description: "Topology parameter" +# [end] Keep 'parameter' entries ordered alphabetically, please. -##### SCMS +#### SCMS +# Keep 'scm' entries ordered alphabetically, please. - scm: - name: git-scm + name: gerrit-trigger-scm scm: - git: credentials-id: '{credentials-id}' url: '$GIT_BASE' - refspec: '' + refspec: '{refspec}' branches: - - 'origin/{branch}' + - 'origin/$GERRIT_BRANCH' skip-tag: true - wipe-workspace: true + choosing-strategy: '{choosing-strategy}' - scm: - name: gerrit-trigger-scm + name: gerrit-trigger-scm-recursive scm: - git: credentials-id: '{credentials-id}' @@ -195,22 +198,24 @@ - 'origin/$GERRIT_BRANCH' skip-tag: true choosing-strategy: '{choosing-strategy}' + submodule: + recursive: '{submodule-recursive}' - scm: - name: gerrit-trigger-scm-recursive + name: git-scm scm: - git: credentials-id: '{credentials-id}' url: '$GIT_BASE' - refspec: '{refspec}' + refspec: '' branches: - - 'origin/$GERRIT_BRANCH' + - 'origin/{branch}' skip-tag: true - choosing-strategy: '{choosing-strategy}' - submodule: - recursive: '{submodule-recursive}' + wipe-workspace: true +# [end] Keep 'scm' entries ordered alphabetically, please. -###### WRAPPERS +#### WRAPPERS +# Keep 'wrapper' entries ordered alphabetically, please. - wrapper: name: build-timeout wrappers: @@ -220,12 +225,14 @@ fail: true - wrapper: - # This wrapper is used for all jobs that require no-activity timeouts - name: fdio-infra-wrappers-non-activity-timeout + # This wrapper is required for all jobs as it configures the wrappers + # needed by the fd.io infra. + name: fdio-infra-wrappers wrappers: - timeout: - type: no-activity + type: absolute timeout: '{build-timeout}' + timeout-var: 'BUILD_TIMEOUT' fail: true - timestamps - ssh-agent-credentials: @@ -237,14 +244,12 @@ single-use: true - wrapper: - # This wrapper is required for all jobs as it configures the wrappers - # needed by the fd.io infra. - name: fdio-infra-wrappers + # This wrapper is used for all jobs that require no-activity timeouts + name: fdio-infra-wrappers-non-activity-timeout wrappers: - timeout: - type: absolute + type: no-activity timeout: '{build-timeout}' - timeout-var: 'BUILD_TIMEOUT' fail: true - timestamps - ssh-agent-credentials: @@ -254,23 +259,20 @@ single-use: true - openstack: single-use: true +# [end] Keep 'wrapper' entries ordered alphabetically, please. -###### TRIGGERS +#### TRIGGERS +# Keep 'trigger' entries ordered alphabetically, please. - trigger: - name: gerrit-trigger-patch-submitted + name: gerrit-trigger-checkstyle + # Comes from VPP, some verify jobs wait for checkstyle to pass. + # This macro is to be used for such verify jobs which are voting. triggers: - gerrit: server-name: 'Primary' trigger-on: - - patchset-created-event: - exclude-drafts: 'true' - exclude-trivial-rebase: 'false' - exclude-no-code-change: 'false' - - draft-published-event - - comment-added-contains-event: - comment-contains-value: 'recheck' - comment-added-contains-event: - comment-contains-value: 'reverify' + comment-contains-value: 'checkstyle_success' projects: - project-compare-type: 'ANT' project-pattern: '{name}' @@ -279,46 +281,57 @@ branch-pattern: '**/{branch}' - trigger: - name: gerrit-trigger-trivial-patch-submitted + name: gerrit-trigger-checkstyle-nonvoting + # Comes from VPP, some verify jobs wait for checkstyle to pass. + # This macro is to be used for such verify jobs which are non-voting. triggers: - gerrit: server-name: 'Primary' trigger-on: - - patchset-created-event: - exclude-drafts: 'true' - exclude-trivial-rebase: 'false' - exclude-no-code-change: 'true' - - draft-published-event - comment-added-contains-event: - comment-contains-value: 'recheck' - - comment-added-contains-event: - comment-contains-value: 'reverify' + comment-contains-value: 'checkstyle_success' projects: - project-compare-type: 'ANT' project-pattern: '{name}' branches: - branch-compare-type: 'ANT' branch-pattern: '**/{branch}' + skip-vote: + successful: true + failed: true + unstable: true + notbuilt: true + override-votes: true + gerrit-build-successful-verified-value: 1 + gerrit-build-failed-verified-value: 1 + gerrit-build-unstable-verified-value: 1 + gerrit-build-notbuilt-verified-value: 1 - trigger: - name: gerrit-trigger-os-trivial-patch-submitted + name: gerrit-trigger-csit-perftest + # Comes from VPP, for jobs that do performance testing using CSIT code. triggers: - gerrit: server-name: 'Primary' trigger-on: - comment-added-contains-event: - comment-contains-value: 'os-check' - - comment-added-contains-event: - comment-contains-value: 'os-verify' + comment-contains-value: 'perftest-{node-arch}' projects: - project-compare-type: 'ANT' project-pattern: '{name}' branches: - branch-compare-type: 'ANT' branch-pattern: '**/{branch}' + skip-vote: + successful: true + failed: true + unstable: true + notbuilt: true - trigger: - name: gerrit-trigger-trivial-patch-submitted-skip-vote + name: gerrit-trigger-csit-vpp-devicetest-full + # Comes from CSIT, for automatic jobs running "device" tests with VPP builds. + # The job acts as an automatic verify job for CSIT contributions. triggers: - gerrit: server-name: 'Primary' @@ -326,23 +339,47 @@ - patchset-created-event: exclude-drafts: 'true' exclude-trivial-rebase: 'false' - exclude-no-code-change: 'true' + exclude-no-code-change: 'false' - draft-published-event - comment-added-contains-event: comment-contains-value: 'recheck' - comment-added-contains-event: comment-contains-value: 'reverify' + - comment-added-contains-event: + comment-contains-value: 'csit-devicetest' projects: - project-compare-type: 'ANT' - project-pattern: '{name}' + project-pattern: '{project}' branches: - branch-compare-type: 'ANT' branch-pattern: '**/{branch}' skip-vote: - successful: true - failed: true - unstable: true - notbuilt: true + successful: '{skip-vote}' + failed: '{skip-vote}' + unstable: '{skip-vote}' + notbuilt: '{skip-vote}' + +- trigger: + name: gerrit-trigger-csit-vpp-devicetest-manual + # Comes from CSIT, for manual jobs running "device" tests with VPP builds. + # The job acts as a manual (optional) verify job for CSIT contributions. + triggers: + - gerrit: + server-name: 'Primary' + trigger-on: + - comment-added-contains-event: + comment-contains-value: 'csit-devicetest' + projects: + - project-compare-type: 'ANT' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + skip-vote: + successful: '{skip-vote}' + failed: '{skip-vote}' + unstable: '{skip-vote}' + notbuilt: '{skip-vote}' - trigger: name: gerrit-trigger-manually-triggered @@ -388,6 +425,28 @@ gerrit-build-unstable-codereview-value: 0 gerrit-build-notbuilt-codereview-value: 0 +- trigger: + name: gerrit-trigger-patch-submitted + triggers: + - gerrit: + server-name: 'Primary' + trigger-on: + - patchset-created-event: + exclude-drafts: 'true' + exclude-trivial-rebase: 'false' + exclude-no-code-change: 'false' + - draft-published-event + - comment-added-contains-event: + comment-contains-value: 'recheck' + - comment-added-contains-event: + comment-contains-value: 'reverify' + projects: + - project-compare-type: 'ANT' + project-pattern: '{name}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + - trigger: name: gerrit-trigger-os-patch-merged triggers: @@ -417,15 +476,15 @@ gerrit-build-notbuilt-codereview-value: 0 - trigger: - # Comes from VPP, some verify jobs wait for checkstyle to pass. - # This macro is to be used for such verify jobs which are voting. - name: gerrit-trigger-checkstyle + name: gerrit-trigger-os-trivial-patch-submitted triggers: - gerrit: server-name: 'Primary' trigger-on: - comment-added-contains-event: - comment-contains-value: 'checkstyle_success' + comment-contains-value: 'os-check' + - comment-added-contains-event: + comment-contains-value: 'os-verify' projects: - project-compare-type: 'ANT' project-pattern: '{name}' @@ -434,41 +493,42 @@ branch-pattern: '**/{branch}' - trigger: - # Comes from VPP, some verify jobs wait for checkstyle to pass. - # This macro is to be used for such verify jobs which are non-voting. - name: gerrit-trigger-checkstyle-nonvoting + name: gerrit-trigger-trivial-patch-submitted triggers: - gerrit: server-name: 'Primary' trigger-on: + - patchset-created-event: + exclude-drafts: 'true' + exclude-trivial-rebase: 'false' + exclude-no-code-change: 'true' + - draft-published-event - comment-added-contains-event: - comment-contains-value: 'checkstyle_success' + comment-contains-value: 'recheck' + - comment-added-contains-event: + comment-contains-value: 'reverify' projects: - project-compare-type: 'ANT' project-pattern: '{name}' branches: - branch-compare-type: 'ANT' branch-pattern: '**/{branch}' - skip-vote: - successful: true - failed: true - unstable: true - notbuilt: true - override-votes: true - gerrit-build-successful-verified-value: 1 - gerrit-build-failed-verified-value: 1 - gerrit-build-unstable-verified-value: 1 - gerrit-build-notbuilt-verified-value: 1 - trigger: - # Comes from VPP, for jobs that do performance testing using CSIT code. - name: gerrit-trigger-csit-perftest + name: gerrit-trigger-trivial-patch-submitted-skip-vote triggers: - gerrit: server-name: 'Primary' trigger-on: + - patchset-created-event: + exclude-drafts: 'true' + exclude-trivial-rebase: 'false' + exclude-no-code-change: 'true' + - draft-published-event - comment-added-contains-event: - comment-contains-value: 'perftest-{node-arch}' + comment-contains-value: 'recheck' + - comment-added-contains-event: + comment-contains-value: 'reverify' projects: - project-compare-type: 'ANT' project-pattern: '{name}' @@ -482,9 +542,9 @@ notbuilt: true - trigger: + name: gerrit-trigger-vpp-csit-devicetest-full # Comes from VPP, for automated jobs running "device" tests with CSIT code. # The job acts as an automatic verify job for VPP contributions. - name: gerrit-trigger-vpp-csit-devicetest-full triggers: - gerrit: server-name: 'Primary' @@ -506,9 +566,9 @@ notbuilt: '{skip-vote}' - trigger: + name: gerrit-trigger-vpp-csit-devicetest-manual # Comes from VPP, for manual jobs running "device" tests with CSIT code. # The job acts as a manual (optional) verify job for VPP contributions. - name: gerrit-trigger-vpp-csit-devicetest-manual triggers: - gerrit: server-name: 'Primary' @@ -526,61 +586,10 @@ failed: '{skip-vote}' unstable: '{skip-vote}' notbuilt: '{skip-vote}' +# [end] Keep 'trigger' entries ordered alphabetically, please. -- trigger: - # Comes from CSIT, for automatic jobs running "device" tests with VPP builds. - # The job acts as an automatic verify job for CSIT contributions. - name: gerrit-trigger-csit-vpp-devicetest-full - triggers: - - gerrit: - server-name: 'Primary' - trigger-on: - - patchset-created-event: - exclude-drafts: 'true' - exclude-trivial-rebase: 'false' - exclude-no-code-change: 'false' - - draft-published-event - - comment-added-contains-event: - comment-contains-value: 'recheck' - - comment-added-contains-event: - comment-contains-value: 'reverify' - - comment-added-contains-event: - comment-contains-value: 'csit-devicetest' - projects: - - project-compare-type: 'ANT' - project-pattern: '{project}' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - skip-vote: - successful: '{skip-vote}' - failed: '{skip-vote}' - unstable: '{skip-vote}' - notbuilt: '{skip-vote}' - -- trigger: - # Comes from CSIT, for manual jobs running "device" tests with VPP builds. - # The job acts as a manual (optional) verify job for CSIT contributions. - name: gerrit-trigger-csit-vpp-devicetest-manual - triggers: - - gerrit: - server-name: 'Primary' - trigger-on: - - comment-added-contains-event: - comment-contains-value: 'csit-devicetest' - projects: - - project-compare-type: 'ANT' - project-pattern: '{project}' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - skip-vote: - successful: '{skip-vote}' - failed: '{skip-vote}' - unstable: '{skip-vote}' - notbuilt: '{skip-vote}' - -# Publishers +#### PUBLISHERS +# Keep 'publisher' entries ordered alphabetically, please. - publisher: name: archive-artifacts publishers: @@ -609,31 +618,6 @@ - developers - recipients -- publisher: - name: jacoco-report - publishers: - - jacoco: - exec-pattern: '**/**.exec' - class-pattern: '**/classes' - source-pattern: '**/src/main/java' - # yamllint disable-line rule:line-length - exclusion-pattern: '**/gen**,**/generated-sources/**,**/yang-gen**,**/pax/**' - status-update: true - targets: - - branch: - healthy: 10 - unhealthy: 20 - - method: - healthy: 50 - unhealthy: 40 - -- publisher: - name: robot-report - publishers: - - robot: - output-path: '{output-path}' - other-files: '' - - publisher: name: fdio-infra-shiplogs # To archive things, the job will need to create an "archives" directory in @@ -671,29 +655,46 @@ - workspace-cleanup: fail-build: false +- publisher: + name: jacoco-report + publishers: + - jacoco: + exec-pattern: '**/**.exec' + class-pattern: '**/classes' + source-pattern: '**/src/main/java' + # yamllint disable-line rule:line-length + exclusion-pattern: '**/gen**,**/generated-sources/**,**/yang-gen**,**/pax/**' + status-update: true + targets: + - branch: + healthy: 10 + unhealthy: 20 + - method: + healthy: 50 + unhealthy: 40 + - publisher: name: retry-build-on-builder-error publishers: - naginator: max-failed-builds: 1 -###### BUILDERS +- publisher: + name: robot-report + publishers: + - robot: + output-path: '{output-path}' + other-files: '' +# [end] Keep 'publisher' entries ordered alphabetically, please. + +#### BUILDERS +# Keep 'builder' entries ordered alphabetically, please. - builder: name: ci-management-check-unicode builders: - shell: | $WORKSPACE/scripts/check-unicode.sh jjb/ -- builder: - name: provide-maven-settings - builders: - - config-file-provider: - files: - - file-id: '{global-settings-file}' - variable: 'GLOBAL_SETTINGS_FILE' - - file-id: '{settings-file}' - variable: 'SETTINGS_FILE' - - property: name: fdio-infra-properties properties: @@ -701,7 +702,6 @@ days-to-keep: '{build-days-to-keep}' num-to-keep: '{build-num-to-keep}' - - builder: name: packer-validate builders: @@ -751,3 +751,14 @@ packer.io build -var-file=$CLOUDENV \ -var-file=../packer/vars/{platform}.json \ ../packer/templates/{template}.json + +- builder: + name: provide-maven-settings + builders: + - config-file-provider: + files: + - file-id: '{global-settings-file}' + variable: 'GLOBAL_SETTINGS_FILE' + - file-id: '{settings-file}' + variable: 'SETTINGS_FILE' +# [end] Keep 'builder' entries ordered alphabetically, please. -- 2.16.6