[ONOS-7346] ver.b
Change-Id: I330e0f197c2a3a213e5e9734b0175ad302b71dfc
diff --git a/jjb/OnosSystemTest/onos-test-freestyle.yaml b/jjb/OnosSystemTest/onos-test-freestyle.yaml
new file mode 100644
index 0000000..6b061fc
--- /dev/null
+++ b/jjb/OnosSystemTest/onos-test-freestyle.yaml
@@ -0,0 +1,179 @@
+---
+# ONOS System Test Pipeline jobs
+
+# TODO: Change all the job names in Jenkins Pipeline script.
+
+- 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'
+
+- 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'
+
+# cleanup_stations - TDOO: need to add bash script.
+- 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
+
+#TODO LIST : DELTA -> perhaps change into pipeline?? , CHO_jobs, Check_style, Personal stations : necessary?
+
+- 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'