| --- |
| # ONOS System Test Pipeline jobs |
| |
| |
| - test-free-job-boiler-plate: &test-free-job-boiler-plate |
| name: test-free-job-boiler-plate |
| |
| project-type: freestyle |
| |
| - init-station-plate: &init-station-plate |
| name: init-station-plate |
| station-type: |
| - 'VM' |
| - 'BM' |
| |
| - job-free-version-plate: &job-free-version-plate |
| name: job-free-version-plate |
| version: |
| - '1.11' |
| - '1.12' |
| - 'master' |
| - 'manually' |
| |
| - test-free-init-procedure-plate: &test-free-init-procedure-plate |
| name: test-free-init-procedure-plate |
| project: OnosSystemTest |
| stream: 'master' |
| |
| - inject-env-variable-plate: &inject-env-variable-plate |
| name: inject-env-variable-plate |
| wrappers: |
| - inject: |
| properties-file: '/var/jenkins/TestONOS.property' |
| script-content: | |
| echo "ONOSBranch=$ONOSBranch" > /var/jenkins/TestONOS.property |
| echo "TestONBranch=$TestONBranch" >> /var/jenkins/TestONOS.property |
| echo "ONOSTag=$ONOSTag" >> /var/jenkins/TestONOS.property |
| echo "WikiPrefix=$WikiPrefix" >> /var/jenkins/TestONOS.property |
| override-build-parameters: true |
| |
| # post_Job |
| - job-template: |
| name: postjob-{station-type} |
| |
| <<: *test-free-job-boiler-plate |
| |
| properties: |
| |
| - build-discarder: |
| num-to-keep: 1 |
| |
| parameters: |
| |
| - lf-infra-parameters: |
| project: '{project}' |
| branch: '{stream}' |
| stream: '{stream}' |
| lftools-version: '{lftools-version}' |
| |
| node: 'TestStation-{station-type}s' |
| |
| publishers: |
| |
| - image-gallery: |
| - gallery-type: archived-images-gallery |
| title: 'Test result' |
| includes: '*.jpg' |
| |
| - archive: |
| artifacts: '*.jpg' |
| |
| - job-template: |
| name: test-station-log-cleanup-VM |
| |
| <<: *test-free-job-boiler-plate |
| <<: *inject-env-variable-plate |
| properties: |
| |
| - build-discarder: |
| num-to-keep: 30 |
| |
| parameters: |
| |
| - string: |
| name: 'DAYS_OLD' |
| default: '15' |
| |
| - lf-infra-parameters: |
| project: '{project}' |
| branch: '{stream}' |
| stream: '{stream}' |
| lftools-version: '{lftools-version}' |
| |
| node: 'TestStation-VMs' |
| |
| # triggers: |
| # - timed: '01 08 1,15 * *' |
| builders: |
| |
| - shell: !include-raw-escape: vm-bm-clean-up.sh |
| |
| - job-template: |
| name: test-station-log-cleanup-BM |
| |
| <<: *test-free-job-boiler-plate |
| <<: *inject-env-variable-plate |
| properties: |
| |
| - build-discarder: |
| num-to-keep: 30 |
| |
| parameters: |
| |
| - string: |
| name: 'DAYS_OLD' |
| default: '30' |
| |
| - lf-infra-parameters: |
| project: '{project}' |
| branch: '{stream}' |
| stream: '{stream}' |
| lftools-version: '{lftools-version}' |
| |
| node: 'TestStation-BMs' |
| |
| # triggers: |
| # - timed: '01 08 1 * *' |
| |
| builders: |
| |
| - shell: !include-raw-escape: vm-bm-clean-up.sh |
| |
| - job-template: |
| name: test-station-log-cleanup-CHO |
| |
| <<: *test-free-job-boiler-plate |
| <<: *inject-env-variable-plate |
| properties: |
| |
| - build-discarder: |
| num-to-keep: 15 |
| |
| parameters: |
| |
| - string: |
| name: 'DAYS_OLD' |
| default: '15' |
| |
| - lf-infra-parameters: |
| project: '{project}' |
| branch: '{stream}' |
| stream: '{stream}' |
| lftools-version: '{lftools-version}' |
| |
| node: 'TestStation-CHOs' |
| |
| # triggers: |
| # - timed: '@daily' |
| builders: |
| |
| - shell: !include-raw-escape: cho-clean-up.sh |
| |
| - job-template: |
| name: QA-check-style |
| |
| <<: *test-free-job-boiler-plate |
| properties: |
| |
| - build-discarder: |
| num-to-keep: 100 |
| |
| parameters: |
| |
| - string: |
| name: 'GERRIT_CHANGE_NUMBER' |
| default: '' |
| description: '5-digit number that corresponds to the patch set change on Gerrit.' |
| |
| - lf-infra-parameters: |
| project: '{project}' |
| branch: '{stream}' |
| stream: '{stream}' |
| lftools-version: '{lftools-version}' |
| |
| concurrent: true |
| |
| node: 'TestStation-Jeremys' |
| |
| triggers: |
| - gerrit: |
| server-name: 'OnosSystemTest Project Gerrit' |
| trigger-on: |
| - patchset-created-event: |
| exclude-drafts: false |
| exclude-trivial-rebase: false |
| exclude-no-code-change: false |
| - draft-published-event |
| - comment-added-contains-event: |
| comment-contains-value: '(?i)^.*recheck$' |
| projects: |
| - project-compare-type: PLAIN |
| project-pattern: '{project}' |
| branches: |
| - branch-compare-type: ANT |
| branch-pattern: '**/master' |
| - branch-compare-type: ANT |
| branch-pattern: '**/onos-1.[11-20]' |
| wrappers: |
| - lf-infra-wrappers: |
| build-timeout: 1800 |
| jenkins-ssh-credential: '{jenkins-ssh-credential}' |
| |
| builders: |
| |
| - shell: !include-raw-escape: check-style.sh |
| |
| publishers: |
| - warnings: |
| workspace-file-scanners: |
| - file-pattern: pep8Result.txt |
| scanner: Pep8 |
| |
| - job-template: |
| name: delta-nightly |
| |
| <<: *test-free-job-boiler-plate |
| properties: |
| |
| - build-discarder: |
| num-to-keep: 30 |
| |
| parameters: |
| |
| - string: |
| name: 'NIGHTLY_FILE_NAME' |
| default: '' |
| description: | |
| Name of ONOS nightly build file |
| will be set to the latest file if not specified here |
| |
| - string: |
| name: 'ONOS_VERSION' |
| default: '1.11.0' |
| description: 'Version number in ONOS nightly build file' |
| |
| - string: |
| name: 'DELTA_PATH' |
| default: '/home/sdn' |
| description: 'Path of DELTA project' |
| |
| - string: |
| name: 'WIKI_PREFIX' |
| default: 'master' |
| |
| - bool: |
| name: 'CLEANUP' |
| default: true |
| |
| - lf-infra-parameters: |
| project: '{project}' |
| branch: '{stream}' |
| stream: '{stream}' |
| lftools-version: '{lftools-version}' |
| |
| node: 'TestStation-BMs' |
| |
| wrappers: |
| - inject: |
| properties-file: '/var/jenkins/TestONOS.property' |
| |
| builders: |
| |
| - shell: !include-raw-escape: delta-script.sh |
| |
| publishers: |
| - plot: |
| - title: 'DELTA Test Results for master' |
| group: 'DELTA-nightly' |
| yaxis: 'Number of test cases' |
| style: line |
| series: |
| - file: 'DELTA-nightly.csv' |
| format: 'csv' |
| |
| # Todo : add confluence ( use pipeline for post build ..? ) |
| |
| - job-template: |
| name: init-CHO |
| |
| <<: *test-free-job-boiler-plate |
| properties: |
| |
| - build-discarder: |
| num-to-keep: 30 |
| |
| parameters: |
| |
| - string: |
| name: 'ONOSBranch' |
| default: 'master' |
| description: | |
| set onos branch to test. default to "master", |
| but can also be set at "onos-1.2", etc. |
| This parameter is also use to trigger where the test results to be posted |
| |
| - string: |
| name: 'ONOSJVMHeap' |
| default: "\"${{JAVA_OPTS:--Xms8G -Xmx8G}}\"" |
| description: 'onos cell jvm heap size setting' |
| |
| - string: |
| name: 'TestONBranch' |
| default: 'master' |
| description: 'sets TestON branch' |
| |
| - string: |
| name: 'ONOSTag' |
| default: '' |
| |
| - lf-infra-parameters: |
| project: '{project}' |
| branch: '{stream}' |
| stream: '{stream}' |
| lftools-version: '{lftools-version}' |
| |
| node: 'TestStation-CHOs' |
| |
| wrappers: |
| - inject: |
| properties-file: '/var/lib/jenkins/TestONOS.property' |
| script-content: | |
| echo "ONOSBranch=$ONOSBranch" > /var/lib/jenkins/TestONOS.property |
| echo "TestONBranch=$TestONBranch" >> /var/lib/jenkins/TestONOS.property |
| echo "ONOSTag=$ONOSTag" >> /var/lib/jenkins/TestONOS.property |
| |
| override-build-parameters: true |
| |
| builders: |
| |
| - shell: !include-raw-escape: cho-init.sh |
| |
| - job-template: |
| name: running-CHO |
| |
| <<: *test-free-job-boiler-plate |
| properties: |
| |
| - build-discarder: |
| num-to-keep: 30 |
| |
| parameters: |
| |
| - lf-infra-parameters: |
| project: '{project}' |
| branch: '{stream}' |
| stream: '{stream}' |
| lftools-version: '{lftools-version}' |
| |
| node: 'TestStation-CHOs' |
| triggers: |
| - reverse: |
| jobs: 'init-CHO' |
| result: 'failure' |
| |
| builders: |
| |
| - shell: !include-raw-escape: running-cho.sh |
| |
| - job-template: |
| name: post-CHO-master |
| |
| <<: *test-free-job-boiler-plate |
| properties: |
| - lf-infra-properties: |
| project: '{project}' |
| build-days-to-keep: 7 |
| |
| parameters: |
| |
| - lf-infra-parameters: |
| project: '{project}' |
| branch: '{stream}' |
| stream: '{stream}' |
| lftools-version: '{lftools-version}' |
| |
| node: 'TestStation-CHOs' |
| # triggers: |
| # - timed: 'H/60 * * * *' |
| wrappers: |
| - inject: |
| properties-file: '/var/lib/jenkins/TestONOS.property' |
| builders: |
| |
| - shell: !include-raw-escape: cho-post.sh |
| publishers: |
| - plot: |
| - title: 'Network, Application and ONOS Events (per hour)' |
| group: 'CHOTestMonkey' |
| num-builds: '72' |
| yaxis: 'Number of Events' |
| style: line |
| logarithmic-yaxis: true |
| series: |
| - file: 'event.csv' |
| format: 'csv' |
| - title: 'Failed Checks (per hour)' |
| group: 'CHOTestMonkey' |
| num-builds: '72' |
| yaxis: 'Number of Failed Checks' |
| style: line |
| logarithmic-yaxis: true |
| series: |
| - file: 'failure.csv' |
| format: 'csv' |
| - title: 'Warnings, Errors and Exceptions from Logs (per hour)' |
| group: 'CHOTestMonkey' |
| num-builds: '72' |
| yaxis: 'Number of Warnings or Errors' |
| style: line |
| logarithmic-yaxis: true |
| series: |
| - file: 'error.csv' |
| format: 'csv' |
| |
| - job-template: |
| name: 'SR-log-{version}' |
| |
| <<: *test-free-job-boiler-plate |
| properties: |
| |
| - build-discarder: |
| num-to-keep: 30 |
| |
| parameters: |
| |
| - lf-infra-parameters: |
| project: '{project}' |
| branch: '{stream}' |
| stream: '{stream}' |
| lftools-version: '{lftools-version}' |
| |
| node: 'TestStation-VMs' |
| publishers: |
| |
| - archive: |
| artifacts: '*' |
| |
| - job-template: |
| name: test-HA |
| |
| <<: *test-free-job-boiler-plate |
| properties: |
| |
| - build-discarder: |
| |
| days-to-keep: 5 |
| num-to-keep: 100 |
| |
| parameters: |
| |
| - string: |
| name: 'TEST_NAME' |
| default: 'HAbackupRecover' |
| description: 'The name of the TestON test suite' |
| |
| - lf-infra-parameters: |
| project: '{project}' |
| branch: '{stream}' |
| stream: '{stream}' |
| lftools-version: '{lftools-version}' |
| |
| node: 'TestStation-Jons' |
| triggers: |
| - reverse: |
| jobs: 'test-HA' |
| result: 'failure' |
| |
| builders: |
| |
| - shell: !include-raw-escape: test-ha.sh |
| |
| publishers: |
| - plot: |
| - title: 'Test job results' |
| group: 'Test-HA' |
| yaxis: 'Number of test cases' |
| style: line |
| series: |
| - file: 'results.csv' |
| format: 'csv' |
| |
| - title: 'Timers' |
| group: 'Test-HA' |
| yaxis: 'Time in seconds' |
| style: line |
| series: |
| - file: 'Timers.csv' |
| format: 'csv' |
| |
| - post-tasks: |
| - escalate-status: true |
| script: | |
| if [ -e ${{WORKSPACE}}/${{TEST_NAME##*/}}Wiki.txt ] && ! grep -q "FAIL" ${{WORKSPACE}}/${{TEST_NAME##*/}}Wiki.txt |
| then |
| exit 0 |
| else |
| exit 1 |
| fi |
| |
| - project: |
| name: post-result-jobs |
| project-name: post-result-jobs |
| |
| <<: *test-free-init-procedure-plate |
| <<: *init-station-plate |
| jobs: |
| - 'postjob-{station-type}' |
| |
| - project: |
| name: cleanup-jobs |
| project-name: cleanup-jobs |
| |
| <<: *test-free-init-procedure-plate |
| <<: *init-station-plate |
| jobs: |
| - 'test-station-log-cleanup-VM' |
| - 'test-station-log-cleanup-BM' |
| - 'test-station-log-cleanup-CHO' |
| |
| - project: |
| name: check-style |
| project-name: check-style |
| |
| <<: *test-free-init-procedure-plate |
| jobs: |
| - 'QA-check-style' |
| |
| - project: |
| name: delta-test |
| project-name: delta-test |
| |
| <<: *test-free-init-procedure-plate |
| jobs: |
| - 'delta-nightly' |
| |
| - project: |
| name: cho-tests |
| project-name: cho-tests |
| |
| <<: *test-free-init-procedure-plate |
| jobs: |
| - 'init-CHO' |
| - 'running-CHO' |
| - 'post-CHO-master' |
| |
| |
| - project: |
| name: log-pipeline |
| |
| <<: *job-free-version-plate |
| |
| project-name: 'log-pipeline' |
| |
| <<: *test-free-init-procedure-plate |
| |
| jobs: |
| - 'SR-log-{version}' |
| |
| - project: |
| name: personnel-station |
| |
| project-name: 'log-pipeline' |
| |
| <<: *test-free-init-procedure-plate |
| |
| jobs: |
| - 'test-HA' |