blob: 726f803ce80665ed94cd8bf395c6edf09ff374b8 [file] [log] [blame]
---
# 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
- builder:
name: clean-up-bash
beforeClean: |
echo -e "\n Before clean up disk usage: \n"
df -h
cleaning: |
cleaning{
if [ $? -eq 0 ]
then
echo "Checking if there are logs older than ${DAYS_OLD} days...."
for i in $(find . -mtime +${DAYS_OLD} -type d)
do
echo -e "DIRs older than $DAYS_OLD are: "
echo $i
rm -rf $i
done
fi
afterClean: |
echo -e "\n After clean up disk usage:\n"
df -h
builders:
- shell: '{cleanFileName}'
# 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: check if getting the directory works.
- 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:
- clean-up-bash:
cleanFileName: '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:
- clean-up-bash:
cleanFileName: '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:
- clean-up-bash:
cleanFileName: 'cho-clean-up.sh'
# haven't done this yet.
- job-template:
name: QA-check-style
<<: *test-free-job-boiler-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'
- 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
# Todo : add graph and confluence ( use pipeline for post build ..? )
#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'
- 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'