Project: Ligato (Runtime / Cloud Native Network)
File: README.md

Here are templates for jenkins-job-builder. Template is a template for jenkins job which basically runs pybot command to run one file with robot tests e.g. ``` pybot --loglevel ${LOGLEVEL} -v AGENTVPPIMAGENAME:${IMAGENAME} -v AGENTIMAGENAME:${IMAGENAME} -v DOCKERHOSTIP:${DOCKERHOSTIP} -v VARIABLES:${VARIABLESFILE} /root/vpp-agent/tests/robot/suites/crud/tap_crud.robot ``` Note: the variables enclosed in curly braces will be replaced in time of execution of jenkins job Note: This procedure suppose that some preliminary steps are done - preparation of repository to the folder /root. This is done by other jenkins job (. This is done to prevent recurrent downloading of repository for each single robot file. Template is a template which amasses the jobs to the groups to run them together. Project ligato/vpp-agent contains Script will collect all these robot test to the file `listofallrobottests2` sort them will run python script which will prepare the data for templates (outputed to `p.yaml`) Example of p.yaml ``` project: name: ligato/vpp-agent all tests on arm64 jobs: '05{inodeoffolder}{nameoftest}job': HOWTOBUILD_INCLTAGPRESENT: ' ' HOWTOBUILD_EXCLTAGPRESENT: ' ' inodeoffolder: API dateofjjb_generation: 2019-02-22 05:45:55 nameoftest: bfd_api pathtotest: /root/vpp-agent/tests/robot/suites/api/BFD/bfd_api.robot localvariablesfile: arm64_local arm64_node: 147.75.72.194 ... ... '05{inodeoffolder}{nameoftest}job': HOWTOBUILD_INCLTAGPRESENT: ' ' HOWTOBUILD_EXCLTAGPRESENT: ' ' inodeoffolder: CRUDIPV6_ dateofjjb_generation: 2019-02-22 05:45:55 nameoftest: loopback_crudIPv6 pathtotest: /root/vpp-agent/tests/robot/suites/crudIPv6/loopback_crudIPv6.robot localvariablesfile: arm64_local arm64_node: 147.75.72.194 ... ... '04{nameofpipeline}_pipeline': nameofpipeline: IPv4arm64node_I dateofjjb_generation: 2019-02-22 05:45:55 localvariablesfile: 'arm64_local' arm64_node: '147.75.72.194' listofjenkins_jobs: |- stage 'test' build job: '05CRUDaclcrudjob', parameters: [string(name: 'HOWTOBUILD', value: "${{HOWTOBUILD}}"), string(name: 'LOGLEVEL', value: "${{LOGLEVEL}}"), string(name: 'VARIABLES_FIL E', value: "${{VARIABLESFILE}}"), string(name: 'DOCKERHOSTIP', value: "${{DOCKERHOSTIP}}"), string(name: 'IMAGENAME', value: "${{IMAGE_NAME}}")], propagate: false build job: '05CRUDafpacketcrudjob', parameters: [string(name: 'HOWTOBUILD', value: "${{HOWTOBUILD}}"), string(name: 'LOGLEVEL', value: "${{LOGLEVEL}}"), string(name: 'VARIABLE SFILE', value: "${{VARIABLESFILE}}"), string(name: 'DOCKERHOSTIP', value: "${{DOCKERHOSTIP}}"), string(name: 'IMAGENAME', value: "${{IMAGENAME}}")], propagate: false build job: '05CRUDappnamespacescrud_job', parameters: [string(name: 'HOWTOBUILD', value: "${{HOWTOBUILD}}"), string(name: 'LOGLEVEL', value: "${{LOGLEVEL}}"), string(name: 'VA RIABLESFILE', value: "${{VARIABLESFILE}}"), string(name: 'DOCKERHOSTIP', value: "${{DOCKERHOSTIP}}"), string(name: 'IMAGENAME', value: "${{IMAGENAME}}")], propagate: false build job: '05CRUDarpcrudjob', parameters: [string(name: 'HOWTOBUILD', value: "${{HOWTOBUILD}}"), string(name: 'LOGLEVEL', value: "${{LOGLEVEL}}"), string(name: 'VARIABLES_FIL E', value: "${{VARIABLESFILE}}"), string(name: 'DOCKERHOSTIP', value: "${{DOCKERHOSTIP}}"), string(name: 'IMAGENAME', value: "${{IMAGE_NAME}}")], propagate: false build job: '05CRUDbdcrudjob', parameters: [string(name: 'HOWTOBUILD', value: "${{HOWTOBUILD}}"), string(name: 'LOGLEVEL', value: "${{LOGLEVEL}}"), string(name: 'VARIABLES_FILE ', value: "${{VARIABLESFILE}}"), string(name: 'DOCKERHOSTIP', value: "${{DOCKERHOSTIP}}"), string(name: 'IMAGENAME', value: "${{IMAGE_NAME}}")], propagate: false ... ... ``` Prepared templates and data will be merged by jenkins-job-builder to deploy jenkins jobs defaults.yaml is a file with setting for all jobs