Move from .md to .markdown for JJB docs
[releng/builder.git] / src / site / markdown / jenkins.markdown
1 The [Release Engineering project](https://wiki.opendaylight.org/view/RelEng:Main "Releng:Main")
2 consolidates the Jenkins jobs from project-specific VMs to a single Jenkins
3 server. Each OpenDaylight project will have a tab on the RelEng Jenkins
4 server. The system utilizes
5 [Jenkins Job Builder](http://ci.openstack.org/jenkins-job-builder/ "JJB")
6 \(JJB\) for the creation and management of the Jenkins jobs.
7
8 Sections:
9
10 * [Jenkins Master](#jenkins_master)
11 * [Build Slaves](#build_slaves)
12 * [Creating Jenkins Jobs](#creating_jenkins_jobs)
13     * [Jenkins Job Builder Installation](#jjb_install)
14     * [Jenkins Job Templates](#jjb_templates)
15     * [Jenkins Job Basic Configuration](#jjb_basic_configuration)
16     * [Jenkins Job Maven Properties](#jjb_maven_properties)
17 * [Jenkins Sandbox](#jenkins_sandbox)
18
19 # <a name="jenkins_master">Jenkins Master</a>
20
21 https://jenkins.opendaylight.org/releng/
22
23 The Jenkins Master server is the new home for all project Jenkins jobs.  All
24 maintenance and configuration of these jobs must be done via JJB through the
25 RelEng repo ([https://git.opendaylight.org/gerrit/gitweb?p=releng%2Fbuilder.git;a=summary RelEng/Builder gitweb]).
26 Project contributors can no longer edit the Jenkins jobs directly on the
27 server.
28
29 # <a name="build_slaves">Build Slaves</a>
30
31 The Jenkins jobs are run on build slaves (executors) which are created on an
32 as-needed basis.  If no idle build slaves are available a new VM is brought
33 up. This process can take up to 2 minutes. Once the build slave has finished a
34 job, it will remain online for 45 minutes before shutting down.  Subsequent
35 jobs will use an idle build slave if available.
36
37 Our Jenkins master supports many types of dynamic build slaves. If you are
38 creating custom jobs then you will need to have an idea of what type of slaves
39 are available. The following are the current slave types and descriptions.
40 Slave Template Names are needed for jobs that take advantage of multiple
41 slaves as they must be specifically called out by template name instead of
42 label.
43
44 ## Adding new components to the slaves
45
46 If your project needs something added to one of the slaves used during build
47 and test you can help us get things added in faster by doing one of the
48 following:
49
50 * Submit a patch to releng/builder for the
51   [Jenkins Spinup script](https://git.opendaylight.org/gerrit/gitweb?p=releng/builder.git;a=tree;f=jenkins-scripts;h=69252dd61ece511bd2018039b40e7836a8d49d21;hb=HEAD)
52   that configures your new piece of software.
53
54 * Submit a patch to releng/builder for the
55   [Vagrant template's bootstrap.sh](https://git.opendaylight.org/gerrit/gitweb?p=releng/builder.git;a=tree;f=vagrant;h=409a2915d48bbdeea9edc811e1661ae17ca28280;hb=HEAD)
56   that configures your new piece of software.
57
58 Going the first route will be faster in the short term as we can inspect the
59 changes and make test modifications in the sandbox to verify that it works.
60
61 The second route, however, is better for the community as a whole as it will
62 allow others that utilize our vagrant startups to replicate our systems more
63 closely. It is, however, more time consuming as an image snapshot needs to be
64 created based on the updated vagrant definition before it can be attached to
65 the sandbox for validation testing.
66
67 In either case, the changes must be validated in the sandbox with tests to
68 make sure that we don't break current jobs but also that the new software
69 features are operating as intended. Once this is done the changes will be
70 merged and the updates applied to the releng Jenkins production silo.
71
72 Please note that the combination of the Vagrant slave snapshot and the Jenkins
73 Spinup script is what defines a given slave. That means for instance that a
74 slave that is defined using the releng/builder/vagrant/basic-java-node Vagrant
75 and a Jenkins Spinup script of releng/builder/jenkins-script/controller.sh
76 (as the dynamic_controller slave is) is the full definition of the realized
77 slave. Jenkins starts a slave using the snapshot created that has been saved
78 from when the vagrant was last run and once the instance is online it then
79 checks out the releng/builder repo and executes two scripts. The first is the
80 basic_settings.sh which is a baseline for all of the slaves and the second is
81 the specialization script that does any syste updates, new software installs
82 or extra environment tweaks that don't make sense in a snapshot. After all of
83 these scripts have executed Jenkins will finally attach the slave as an actual
84 slave and start handling jobs on it.
85
86 ### Pool: Rackspace - Docker
87
88 <table class="table table-bordered">
89   <tr>
90     <td><b>Jenkins Label</b><br/> dynamic_docker</td>
91     <td><b>Slave Template name</b><br/> rk-f20-docker</td>
92     <td><b>Vagrant Definition</b><br/> releng/builder/vagrant/ovsdb-docker</td>
93     <td><b>Spinup Script</b><br/> releng/builder/jenkins-scripts/docker.sh</td>
94   </tr>
95   <tr>
96     <td colspan="4">
97       A Fedora 20 system that is configured with OpenJDK 1.7 (aka Java7) and
98       docker. This system was originally custom built for the test needs of
99       the OVSDB project but other projects have expressed interest in using
100       it.
101     </td>
102   </tr>
103 </table>
104
105 ### Pool: Rackspace DFW
106
107 <table class="table table-bordered">
108   <tr>
109     <td><b>Jenkins Label</b><br/> dynamic_verify</td>
110     <td><b>Slave Template name</b><br/> rk-c-el65-build</td>
111     <td><b>Vagrant Definition</b><br/> releng/builder/vagrant/basic-builder</td>
112     <td><b>Spinup Script</b><br/> releng/builder/jenkins-scripts/builder.sh</td>
113   </tr>
114   <tr>
115     <td colspan="4">
116       A CentOS 6 build slave. This system has OpenJDK 1.7 (Java7) and OpenJDK
117       1.8 (Java8) installed on it along with all the other components and
118       libraries needed for building any current OpenDaylight project. This is
119       the label that is used for all basic -verify and -daily- builds for
120       projects.
121     </td>
122   </tr>
123 </table>
124
125 <table class="table table-bordered">
126   <tr>
127     <td><b>Jenkins Label</b><br/> dynamic_merge</td>
128     <td><b>Slave Template name</b><br/> rk-c-el65-build</td>
129     <td><b>Vagrant Definition</b><br/> releng/builder/vagrant/basic-builder</td>
130     <td><b>Spinup Script</b><br/> releng/builder/jenkins-scripts/builder.sh</td>
131   </tr>
132   <tr>
133     <td colspan="4">
134       See dynamic_verify (same image on the back side). This is the label that
135       is used for all basic -merge and -integration- builds for projects.
136     </td>
137   </tr>
138 </table>
139
140 ### Pool: Rackspace DFW - Devstack
141
142 <table class="table table-bordered">
143   <tr>
144     <td><b>Jenkins Label</b><br/> dynamic_devstack</td>
145     <td><b>Slave Template name</b><br/> rk-c7-devstack</td>
146     <td><b>Vagrant Definition</b><br/> releng/builder/vagrant/ovsdb-devstack</td>
147     <td><b>Spinup Script</b><br/> releng/builder/jenkins-scripts/devstack.sh</td>
148   </tr>
149   <tr>
150     <td colspan="4">
151       A CentOS 7 system purpose built for doing OpenStack testing using
152       DevStack. This slave is primarily targeted at the needs of the OVSDB
153       project. It has OpenJDK 1.7 (aka Java7) and other basic DevStack related
154       bits installed.
155     </td>
156   </tr>
157 </table>
158
159 ### Pool: Rackspace DFW - Integration
160
161 <table class="table table-bordered">
162   <tr>
163     <td><b>Jenkins Label</b><br/> dynamic_robot</td>
164     <td><b>Slave Template name</b><br/> rk-c-el6-robot</td>
165     <td><b>Vagrant Definition</b><br/> releng/builder/vagrant/integration-robotframework</td>
166     <td><b>Spinup Script</b><br/> releng/builder/jenkins-scripts/robot.sh</td>
167   </tr>
168   <tr>
169     <td colspan="4">
170       A CentOS 6 slave that is configured with OpenJDK 1.7 (Java7) and all the
171       current packages used by the integration project for doing robot driven
172       jobs. If you are executing robot framework jobs then your job should be
173       using this as the slave that you are tied to. This image does not
174       contain the needed libraries for building components of OpenDaylight,
175       only for executing robot tests.
176     </td>
177   </tr>
178 </table>
179
180 ### Pool: Rackspace DFW - Integration Dynamic Lab
181
182 <table class="table table-bordered">
183   <tr>
184     <td><b>Jenkins Label</b><br/> dynamic_controller</td>
185     <td><b>Slave Template name</b><br/> rk-c-el6-java</td>
186     <td><b>Vagrant Definition</b><br/> releng/builder/vagrant/basic-java-node</td>
187     <td><b>Spinup Script</b><br/> releng/builder/jenkins-scripts/controller.sh</td>
188   </tr>
189   <tr>
190     <td colspan="4">
191       A CentOS 6 slave that has the basic OpenJDK 1.7 (Java7) installed and is
192       capable of running the controller, not building.
193     </td>
194   </tr>
195 </table>
196
197 <table class="table table-bordered">
198   <tr>
199     <td><b>Jenkins Label</b><br/> dynamic_java</td>
200     <td><b>Slave Template name</b><br/> rk-c-el6-java</td>
201     <td><b>Vagrant Definition</b><br/> releng/builder/vagrant/basic-java-node</td>
202     <td><b>Spinup Script</b><br/> releng/builder/jenkins-scripts/controller.sh</td>
203   </tr>
204   <tr>
205     <td colspan="4">
206       See dynamic_controller as it is currently the same image.
207     </td>
208   </tr>
209 </table>
210
211 <table class="table table-bordered">
212   <tr>
213     <td><b>Jenkins Label</b><br/> dynamic_mininet</td>
214     <td><b>Slave Template name</b><br/> rk-c-el6-mininet</td>
215     <td><b>Vagrant Definition</b><br/> releng/builder/vagrant/basic-mininet-node</td>
216     <td><b>Spinup Script</b><br/> releng/builder/jenkins-scripts/mininet.sh</td>
217   </tr>
218   <tr>
219     <td colspan="4">
220       A CentOS 6 image that has mininet, openvswitch v2.0.x, netopeer and
221       PostgreSQL 9.3 installed. This system is targeted at playing the role of
222       a mininet system for integration tests. Netopeer is installed as it is
223       needed for various tests by Integration. PostgreSQL 9.3 is installed as
224       the system is also capable of being used as a VTN project controller and
225       VTN requires PostgreSQL 9.3.
226     </td>
227   </tr>
228 </table>
229
230 <table class="table table-bordered">
231   <tr>
232     <td><b>Jenkins Label</b><br/> dynamic_mininet_fedora</td>
233     <td><b>Slave Template name</b><br/> rk-f21-mininet</td>
234     <td><b>Vagrant Definition</b><br/> releng/builder/vagrant/basic-mininet-fedora-node</td>
235     <td><b>Spinup Script</b><br/> releng/builder/jenkins-scripts/mininet-fedora.sh</td>
236   </tr>
237   <tr>
238     <td colspan="4">
239       Basic Fedora 21 system with ovs v2.3.x and mininet 2.2.1
240     </td>
241   </tr>
242 </table>
243
244 ### Pool: Rackspace DFW - Matrix
245
246 <table class="table table-bordered">
247   <tr>
248     <td><b>Jenkins Label</b><br/> matrix_master</td>
249     <td><b>Slave Template name</b><br/> rk-c-el6-matrix</td>
250     <td><b>Vagrant Definition</b><br/> releng/builder/vagrant/basic-java-node</td>
251     <td><b>Spinup Script</b><br/> releng/builder/jenkins-scripts/matrix.sh</td>
252   </tr>
253   <tr>
254     <td colspan="4">
255       This is a very minimal system that is designed to spin up with 2 build
256       instances on it. The purpose is to have a location that is not the
257       Jenkins master itself for jobs that are executing matrix operations
258       since they need a director location. This image should not be used for
259       anything but tying matrix jobs before the matrx defined label ties.
260     </td>
261   </tr>
262 </table>
263
264 # <a name="creating_jenkins_jobs">Creating Jenkins Jobs</a>
265
266 Jenkins Job Builder takes simple descriptions of Jenkins jobs in YAML format, and uses them to configure Jenkins.
267
268 * [Jenkins Job Builder](http://ci.openstack.org/jenkins-job-builder/) \(JJB\)
269   documentation
270
271 OpenDaylight releng/builder gerrit project
272
273 * [releng/builder](https://git.opendaylight.org/gerrit/#/admin/projects/releng/builder)
274   Git repo
275
276 ## <a name="jjb_install">Jenkins Job Builder Installation</a>
277
278 ### Using Docker
279 [Docker](https://www.docker.com/whatisdocker/) is an open platform used to
280 create virtualized Linux containers for shipping self-contained applications.
281 Docker leverages LinuX Containers \(LXC\) running on the same operating system
282 as the host machine, whereas a traditional VM runs an operating system over
283 the host.
284
285     docker pull zxiiro/jjb-docker
286     docker run --rm -v ${PWD}:/jjb jjb-docker
287
288 The Dockerfile that created that image is
289 [here](https://github.com/zxiiro/jjb-docker/blob/master/Dockerfile).
290 By default it will run:
291
292     jenkins-jobs test .
293
294 Using the volume mount "-v" parameter you need to mount a directory containing
295 your YAML files as well as a configured jenkins.ini file if you wish to upload
296 your jobs to the Sandbox.
297
298 ### Manual install
299
300 Jenkins Jobs in the releng silo use Jenkins Job Builder so if you need to test
301 your Jenkins job against the Sandbox you will need to install JJB.
302
303 The templates below depend on a modified JJB version to add support for some
304 missing features needed by our Jenkins instance. You can download JJB from
305 OpenStack:
306
307     git clone https://git.openstack.org/openstack-infra/jenkins-job-builder
308
309 Before installing JJB make sure following python modules are installed (see
310 requirements.txt):
311
312 * argparse
313 * ordereddict
314 * six>=1.5.2
315 * PyYAML
316 * python-jenkins>=0.4.1
317 * pbr>=0.8.2,<1.0
318
319 Follow steps in README.rst to install JJB:
320
321    sudo python setup.py install
322
323 Notes for Mac: [instructions here](https://github.com/openstack-infra/jenkins-job-builder).
324 The <tt>sudo python setup.py install</tt> seems to work better than the
325 version using brew and pip.
326
327 Note: Some Linux distributions already contain a JJB package, usually with
328 version too low to work correctly with Releng templates. You may need to
329 uninstall the corresponding Linux package (or find another workaround) before
330 proceeding with steps from *README.rst*.
331
332 Update: Here is a link to e-mail with suggestions on how to install and
333 upgrade JJB properly:
334 https://lists.opendaylight.org/pipermail/integration-dev/2015-April/003016.html
335
336 Update: There was an issue with certain JJB versions. Workaround:
337 https://lists.opendaylight.org/pipermail/integration-dev/2015-October/005000.html
338
339 ## <a name="jjb_templates">Jenkins Job Templates</a>
340
341 The ODL Releng project provides 4 job templates which can be used to
342 define basic jobs.
343
344 ### Verify Job Template
345
346 Trigger: **recheck**
347
348 The Verify job template creates a Gerrit Trigger job that will trigger when a
349 new patch is submitted to Gerrit.
350
351 Verify jobs can be retriggered in Gerrit by leaving a comment that says
352 **recheck**.
353
354 ### Merge Job Template
355
356 Trigger: **remerge**
357
358 The Merge job template is similar to the Verify Job Template except it will
359 trigger once a Gerrit patch is merged into the repo. It also automatically
360 runs the Maven goals **source:jar** and **javadoc:jar**.
361
362 This job will upload artifacts to https://nexus.opendaylight.org on
363 completion.
364
365 Merge jobs can be retriggered in Gerrit by leaving a comment that says
366 **remerge**.
367
368 ### Daily Job Template
369
370 The Daily (or Nightly) Job Template creates a job which will run on a build on
371 a Daily basis as a sanity check to ensure the build is still working day to
372 day.
373
374 ### Sonar Job Template
375
376 Trigger: **run-sonar**
377
378 This job runs Sonar analysis and reports the results to
379 [OpenDaylight's Sonar dashboard(https://sonar.opendaylight.org).
380
381 **Note:** Running the "run-sonar" trigger will cause Jenkins to remove it's
382 existing vote if it's already -1 or +1'd a comment. You will need to re-run
383 your verify job (recheck) after running this to get Jenkins to put back the
384 correct vote.
385
386 The Sonar Job Template creates a job which will run against the master branch,
387 or if BRANCHES are specified in the CFG file it will create a job for the
388 **First** branch listed.
389
390 ### Integration Job Template
391
392 The Integration Job Template create a job which runs when a project that your
393 project depends on is successfully built. This job type is basically the same
394 as a verify job except that it triggers from other jenkins jobs instead of via
395 Gerrit review update. The dependencies are listed in your project.cfg file
396 under the **DEPENDENCIES** variable.
397
398 If no dependencies are listed then this job type is disabled by default.
399
400 ### Patch Test Job
401
402 Trigger: **test-integration**
403
404 This job runs a full integration test suite against your patch and reports
405 back the results to Gerrit. This job is maintained by the integration project
406 and you just need to leave a comment with trigger keyword above to activate it
407 for a particular patch.
408
409 **Note:** Running the "test-integration" trigger will cause Jenkins to remove
410 it's existing vote if it's already -1 or +1'd a comment. You will need to
411 re-run your verify job (recheck) after running this to get Jenkins to put back
412 the correct vote.
413
414 Some considerations when using this job:
415
416 * The patch test verification takes some time (~ 2 hours) + consumes a lot of
417   resources so it is not meant to be used for every patch
418 * The system test for master patches will fail most of the times because both
419   code and test are unstable during the release cycle (should be good by the
420   end of the cycle)
421 * Because of the above, patch test results has to be interpreted most of the
422   times by a system test knowable person, the integration group can help with
423   that
424
425 ## <a name="jjb_basic_configuration">Basic Job Configuration</a>
426
427 To create jobs based on the above templates you can use the example
428 template which will create 6 jobs (verify, merge, and daily jobs for both
429 master and stable/helium branch).
430
431 Run the following steps from the repo (i.e. releng/builder) root to create
432 initial job config. This script will produce a file in
433 jjb/\<project\>/\<project\>.yaml containing your project's base template.
434
435     python scripts/jjb-init-project.py <project-name>
436
437     # Example
438     python scripts/jjb-init-project.py aaa
439
440     # Note: The optional options below require you to remove the 1st line
441     #       comment in the produced template file otherwise the auto
442     #       update script will overwrite the customization next time it
443     #       is run. See Auto Update Job Templates section below for more
444     #       details.
445     #
446     # Optionally pass the following options:
447     #
448     # -s / --streams        : List of release streams you want to create jobs for. The
449     #                         first in the list will be used for the Sonar job.
450     #                         (defaults to "beryllium")
451     # -p / --pom            : Path to pom.xml to use in Maven build (defaults to pom.xml)
452     # -g / --mvn-goals      : With your job's Maven Goals necessary to build
453     #                         (defaults to "clean install")
454     #          Example      : -g "clean install"
455     #
456     # -o / --mvn-opts       : With your job's Maven Options necessary to build
457     #                         (defaults to empty)
458     #          Example      : -o "-Xmx1024m"
459     #
460     # -d / --dependencies   : A comma-seperated (no spaces) list of projects
461     #                         your project depends on.
462     #                         This is used to create an integration job that
463     #                         will trigger when a dependent project-merge job
464     #                         is built successfully.
465     #          Example      : aaa,controller,yangtools
466     #
467     # -t / --templates      : Job templates to use
468     #                         (defaults: verify,merge,daily,integration,sonar)
469     #
470     #          Example      : verify,merge,daily,integration
471
472 If all your project requires is the basic verify, merge, and
473 daily jobs then using the job template should be all you need to
474 configure for your jobs.
475
476 ### Auto Update Job Templates
477
478 The first line of the job YAML file produced by the script will contain
479 the words # REMOVE THIS LINE IF... leaving this line will allow the
480 releng/builder autoupdate script to maintain this file for your project
481 should the base template ever change. It is a good idea to leave this
482 line if you do not plan to create any complex jobs outside of the
483 provided template.
484
485 However if your project needs more control over your jobs or if you have
486 any additional configuration outside of the standard configuration
487 provided by the template then this line should be removed.
488
489 #### Tuning templates
490
491 Additionally the auto-updater does allow some small tweaks to the template
492 so that you can take advantage of the template while at the same time
493 tuning small aspects of your jobs. To take advantage of this simply create
494 a file in your project's jjb directory called **project.cfg** with the
495 following contents and tune as necessary. If there is a parameter you do
496 NOT want to tune simply remove the parameter or comment out the line with a
497 "#"" sign.
498
499     JOB_TEMPLATES: verify,merge,sonar
500     STREAMS:
501     - beryllium:
502         jdks: openjdk7,openjdk8
503     - stable/lithium:
504         jdks: openjdk7
505     POM: dfapp/pom.xml
506     MVN_GOALS: clean install javadoc:aggregate -DrepoBuild -Dmaven.repo.local=$WORKSPACE/.m2repo -Dorg.ops4j.pax.url.mvn.localRepository=$WORKSPACE/.m2repo
507     MVN_OPTS: -Xmx1024m -XX:MaxPermSize=256m
508     DEPENDENCIES: aaa,controller,yangtools
509     ARCHIVE_ARTIFACTS: *.logs, *.patches
510
511 Note: BRANCHES is a list of branches you want JJB to generate jobs for, the
512 first branch will be the branch that reports Sonar analysis. Each branch must
513 additionally define a "jdks:" section listing the jdks the verify jobs should
514 run tests against for the branch; additionally the first jdk listed will be
515 used as the default jdk for non-verify type jobs.
516
517 #### Advanced
518
519 It is also possible to take advantage of both the auto updater and creating
520 your own jobs. To do this, create a YAML file in your project's sub-directory
521 with any name other than \<project\>.yaml. The auto-update script will only
522 search for files with the name \<project\>.yaml. The normal \<project\>.yaml
523 file can then be left in tact with the "# REMOVE THIS LINE IF..." comment so
524 it will be automatically updated.
525
526 ## <a name="jjb_maven_properties">Maven Properties</a>
527
528 We provide a properties which your job can take advantage of if you want to do
529 something different depending on the job type that is run. If you create a
530 profile that activates on a property listed blow. The JJB templated jobs will
531 be able to activate the profile during the build to run any custom code you
532 wish to run in your project.
533
534     -Dmerge   : This flag is passed in our Merge job and is equivalent to the
535                 Maven property
536                 <merge>true</merge>.
537     -Dsonar   : This flag is passed in our Sonar job and is equivalent to the
538                 Maven property
539                 <sonar>true</sonar>.
540
541 # <a name="jenkins_sandbox">Jenkins Sandbox</a>
542
543 [https://jenkins.opendaylight.org/sandbox](https://jenkins.opendaylight.org/sandbox/)
544
545 The Sandbox instance's purpose is to allow projects to test their JJB setups
546 before merging their code over to the Releng Master silo. It is configured
547 similarly to the Master instance above however it cannot publish or vote in
548 Gerrit.
549
550 If your project requires access to the Sandbox please open a Help Desk ticket
551 and provide us with your ODL ID.
552
553 ## Notes regarding the Sandbox
554
555 * Jobs automatically deleted Saturday @ 08:00 UTC (12:00 AM PST / 01:00 AM PDT)
556 * Committers can login and configure Jenkins jobs directly here (unlike on the
557 master silo)
558 * Configuration mirrors the master silo when possible
559 * Can NOT upload artifacts to Nexus
560 * Can NOT vote on Gerrit
561
562 ## Using the Sandbox
563
564 Before starting using the sandbox make sure you have Jenkins Job Builder
565 properly installed in your setup. Refer Jenkins Job Builder Installation
566 section of this guide.
567
568 If you do not already have access, open a helpdesk ticket to request access to
569 the sandbox instance (Integration committers will have access by default).
570
571 1. Clone a copy of the releng/builder repo from https://git.opendaylight.org/gerrit/#/admin/projects/releng/builder
572 2. cp jenkins.ini.example jenkins.ini
573 3. Edit the jenkins.ini file at the root of the repo
574     * Set your ODL username and password (make sure to uncomment the lines)
575     * Set the URL to https://jenkins.opendaylight.org/sandbox
576
577 It is good practice to test that your JJB files are valid before pushing using
578 the test command. If you see no Exceptions or Failures after running the
579 following command your templates should be good for pushing.
580
581 The last parameter is the name of the job you want to push to Jenkins so if
582 your job template name is **{project}-csit-3node-periodic-{functionality}-{install}-{stream}**
583 you will need to expand manually the variables {project}, {functionality},
584 {install}, and {stream} to the exact job you want created in the Sandbox for
585 example **openflowplugin-csit-1node-periodic-longevity-only-beryllium**. Please
586 do not push ALL jobs to the Sandbox and only jobs you actually intend to test.
587
588 **Note:** the below command examples are being executed from the root of the
589 builder repo, and assume the "jenkins.ini" file is located there.
590
591     jenkins-jobs --conf jenkins.ini test jjb/ <job-name>
592     jenkins-jobs --conf jenkins.ini test jjb/ openflowplugin-csit-periodic-1node-cds-longevity-only-master
593
594 Expect to see an XML file describing the build job in \</maven2-moduleset\> tags
595 on STOUT. If you dont see any XML check that you have assigned values to the
596 parameters between {} in the YAML files. For example {project}
597
598 Once this is complete you can push your JJB jobs to the sandbox with the
599 command:
600
601     jenkins-jobs --conf jenkins.ini update jjb/ <job-name>
602     jenkins-jobs --conf jenkins.ini update jjb/ openflowplugin-csit-periodic-1node-cds-longevity-only-beryllium
603
604 **Important Note:** When pushing with jenkins-jobs command it will print out a
605 message similar to the one below to inform you how many jobs JJB is pushing
606 online. If the number is greater than 1 (or the number of jobs you passed to
607 the command to push) then you are pushing too many jobs and should **ctrl+c**
608 to cancel the upload.
609
610     INFO:jenkins_jobs.builder:Number of jobs generated:  1
611
612 If using Docker:
613
614     # To test
615     docker run --rm -v ${PWD}:/jjb zxiiro/jjb-docker
616
617     # To upload jobs to the sandbox
618     # Please ensure that you include a configured jenkins.ini in your volume mount
619     docker run --rm -v ${PWD}:/jjb zxiiro/jjb-docker jenkins-jobs --conf jenkins.ini update . openflowplugin-csit-periodic-1node-cds-longevity-only-master