Merge "Create Jenkins jobs for NeXt project"
[releng/builder.git] / src / site / markdown / jenkins.md
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 ## <a name="jjb_templates">Jenkins Job Templates</a>
337
338 The ODL Releng project provides 4 job templates which can be used to
339 define basic jobs.
340
341 ### Verify Job Template
342
343 Trigger: **recheck**
344
345 The Verify job template creates a Gerrit Trigger job that will trigger when a
346 new patch is submitted to Gerrit.
347
348 Verify jobs can be retriggered in Gerrit by leaving a comment that says
349 **recheck**.
350
351 ### Merge Job Template
352
353 Trigger: **remerge**
354
355 The Merge job template is similar to the Verify Job Template except it will
356 trigger once a Gerrit patch is merged into the repo. It also automatically
357 runs the Maven goals **source:jar** and **javadoc:jar**.
358
359 This job will upload artifacts to https://nexus.opendaylight.org on
360 completion.
361
362 Merge jobs can be retriggered in Gerrit by leaving a comment that says
363 **remerge**.
364
365 ### Daily Job Template
366
367 The Daily (or Nightly) Job Template creates a job which will run on a build on
368 a Daily basis as a sanity check to ensure the build is still working day to
369 day.
370
371 ### Sonar Job Template
372
373 Trigger: **run-sonar**
374
375 This job runs Sonar analysis and reports the results to
376 [OpenDaylight's Sonar dashboard(https://sonar.opendaylight.org).
377
378 **Note:** Running the "run-sonar" trigger will cause Jenkins to remove it's
379 existing vote if it's already -1 or +1'd a comment. You will need to re-run
380 your verify job (recheck) after running this to get Jenkins to put back the
381 correct vote.
382
383 The Sonar Job Template creates a job which will run against the master branch,
384 or if BRANCHES are specified in the CFG file it will create a job for the
385 **First** branch listed.
386
387 ### Integration Job Template
388
389 The Integration Job Template create a job which runs when a project that your
390 project depends on is successfully built. This job type is basically the same
391 as a verify job except that it triggers from other jenkins jobs instead of via
392 Gerrit review update. The dependencies are listed in your project.cfg file
393 under the **DEPENDENCIES** variable.
394
395 If no dependencies are listed then this job type is disabled by default.
396
397 ### Patch Test Job
398
399 Trigger: **test-integration**
400
401 This job runs a full integration test suite against your patch and reports
402 back the results to Gerrit. This job is maintained by the integration project
403 and you just need to leave a comment with trigger keyword above to activate it
404 for a particular patch.
405
406 **Note:** Running the "test-integration" trigger will cause Jenkins to remove
407 it's existing vote if it's already -1 or +1'd a comment. You will need to
408 re-run your verify job (recheck) after running this to get Jenkins to put back
409 the correct vote.
410
411 Some considerations when using this job:
412
413 * The patch test verification takes some time (~ 2 hours) + consumes a lot of
414   resources so it is not meant to be used for every patch
415 * The system test for master patches will fail most of the times because both
416   code and test are unstable during the release cycle (should be good by the
417   end of the cycle)
418 * Because of the above, patch test results has to be interpreted most of the
419   times by a system test knowable person, the integration group can help with
420   that
421
422 ## <a name="jjb_basic_configuration">Basic Job Configuration</a>
423
424 To create jobs based on the above templates you can use the example
425 template which will create 6 jobs (verify, merge, and daily jobs for both
426 master and stable/helium branch).
427
428 Run the following steps from the repo (i.e. releng/builder) root to create
429 initial job config. This script will produce a file in
430 jjb/\<project\>/\<project\>.yaml containing your project's base template.
431
432     python scripts/jjb-init-project.py <project-name>
433
434     # Example
435     python scripts/jjb-init-project.py aaa
436
437     # Note: The optional options below require you to remove the 1st line
438     #       comment in the produced template file otherwise the auto
439     #       update script will overwrite the customization next time it
440     #       is run. See Auto Update Job Templates section below for more
441     #       details.
442     #
443     # Optionally pass the following options:
444     #
445     # -s / --streams        : List of release streams you want to create jobs for. The
446     #                         first in the list will be used for the Sonar job.
447     #                         (defaults to "beryllium")
448     # -p / --pom            : Path to pom.xml to use in Maven build (defaults to pom.xml)
449     # -g / --mvn-goals      : With your job's Maven Goals necessary to build
450     #                         (defaults to "clean install")
451     #          Example      : -g "clean install"
452     #
453     # -o / --mvn-opts       : With your job's Maven Options necessary to build
454     #                         (defaults to empty)
455     #          Example      : -o "-Xmx1024m"
456     #
457     # -d / --dependencies   : A comma-seperated (no spaces) list of projects
458     #                         your project depends on.
459     #                         This is used to create an integration job that
460     #                         will trigger when a dependent project-merge job
461     #                         is built successfully.
462     #          Example      : aaa,controller,yangtools
463     #
464     # -t / --templates      : Job templates to use
465     #                         (defaults: verify,merge,daily,integration,sonar)
466     #
467     #          Example      : verify,merge,daily,integration
468
469 If all your project requires is the basic verify, merge, and
470 daily jobs then using the job template should be all you need to
471 configure for your jobs.
472
473 ### Auto Update Job Templates
474
475 The first line of the job YAML file produced by the script will contain
476 the words # REMOVE THIS LINE IF... leaving this line will allow the
477 releng/builder autoupdate script to maintain this file for your project
478 should the base template ever change. It is a good idea to leave this
479 line if you do not plan to create any complex jobs outside of the
480 provided template.
481
482 However if your project needs more control over your jobs or if you have
483 any additional configuration outside of the standard configuration
484 provided by the template then this line should be removed.
485
486 #### Tuning templates
487
488 Additionally the auto-updater does allow some small tweaks to the template
489 so that you can take advantage of the template while at the same time
490 tuning small aspects of your jobs. To take advantage of this simply create
491 a file in your project's jjb directory called **project.cfg** with the
492 following contents and tune as necessary. If there is a parameter you do
493 NOT want to tune simply remove the parameter or comment out the line with a
494 "#"" sign.
495
496     JOB_TEMPLATES: verify,merge,sonar
497     STREAMS:
498     - beryllium:
499         jdks: openjdk7,openjdk8
500     - stable/lithium:
501         jdks: openjdk7
502     POM: dfapp/pom.xml
503     MVN_GOALS: clean install javadoc:aggregate -DrepoBuild -Dmaven.repo.local=$WORKSPACE/.m2repo -Dorg.ops4j.pax.url.mvn.localRepository=$WORKSPACE/.m2repo
504     MVN_OPTS: -Xmx1024m -XX:MaxPermSize=256m
505     DEPENDENCIES: aaa,controller,yangtools
506     ARCHIVE_ARTIFACTS: *.logs, *.patches
507
508 Note: BRANCHES is a list of branches you want JJB to generate jobs for, the
509 first branch will be the branch that reports Sonar analysis. Each branch must
510 additionally define a "jdks:" section listing the jdks the verify jobs should
511 run tests against for the branch; additionally the first jdk listed will be
512 used as the default jdk for non-verify type jobs.
513
514 #### Advanced
515
516 It is also possible to take advantage of both the auto updater and creating
517 your own jobs. To do this, create a YAML file in your project's sub-directory
518 with any name other than \<project\>.yaml. The auto-update script will only
519 search for files with the name \<project\>.yaml. The normal \<project\>.yaml
520 file can then be left in tact with the "# REMOVE THIS LINE IF..." comment so
521 it will be automatically updated.
522
523 ## <a name="jjb_maven_properties">Maven Properties</a>
524
525 We provide a properties which your job can take advantage of if you want to do
526 something different depending on the job type that is run. If you create a
527 profile that activates on a property listed blow. The JJB templated jobs will
528 be able to activate the profile during the build to run any custom code you
529 wish to run in your project.
530
531     -Dmerge   : This flag is passed in our Merge job and is equivalent to the
532                 Maven property
533                 <merge>true</merge>.
534     -Dsonar   : This flag is passed in our Sonar job and is equivalent to the
535                 Maven property
536                 <sonar>true</sonar>.
537
538 # <a name="jenkins_sandbox">Jenkins Sandbox</a>
539
540 [https://jenkins.opendaylight.org/sandbox](https://jenkins.opendaylight.org/sandbox/)
541
542 The Sandbox instance's purpose is to allow projects to test their JJB setups
543 before merging their code over to the Releng Master silo. It is configured
544 similarly to the Master instance above however it cannot publish or vote in
545 Gerrit.
546
547 If your project requires access to the Sandbox please open a Help Desk ticket
548 and provide us with your ODL ID.
549
550 ## Notes regarding the Sandbox
551
552 * Jobs automatically deleted Saturday @ 08:00 UTC (12:00 AM PST / 01:00 AM PDT)
553 * Committers can login and configure Jenkins jobs directly here (unlike on the
554 master silo)
555 * Configuration mirrors the master silo when possible
556 * Can NOT upload artifacts to Nexus
557 * Can NOT vote on Gerrit
558
559 ## Using the Sandbox
560
561 Before starting using the sandbox make sure you have Jenkins Job Builder
562 properly installed in your setup. Refer Jenkins Job Builder Installation
563 section of this guide.
564
565 If you do not already have access, open a helpdesk ticket to request access to
566 the sandbox instance (Integration committers will have access by default).
567
568 1. Clone a copy of the releng/builder repo from https://git.opendaylight.org/gerrit/#/admin/projects/releng/builder
569 2. cp jenkins.ini.example jenkins.ini
570 3. Edit the jenkins.ini file at the root of the repo
571     * Set your ODL username and password (make sure to uncomment the lines)
572     * Set the URL to https://jenkins.opendaylight.org/sandbox
573
574 It is good practice to test that your JJB files are valid before pushing using
575 the test command. If you see no Exceptions or Failures after running the
576 following command your templates should be good for pushing.
577
578 The last parameter is the name of the job you want to push to Jenkins so if
579 your job template name is **{project}-csit-3node-periodic-{functionality}-{install}-{stream}**
580 you will need to expand manually the variables {project}, {functionality},
581 {install}, and {stream} to the exact job you want created in the Sandbox for
582 example **openflowplugin-csit-1node-periodic-longevity-only-beryllium**. Please
583 do not push ALL jobs to the Sandbox and only jobs you actually intend to test.
584
585 **Note:** the below command examples are being executed from the root of the
586 builder repo, and assume the "jenkins.ini" file is located there.
587
588     jenkins-jobs --conf jenkins.ini test jjb/ <job-name>
589     jenkins-jobs --conf jenkins.ini test jjb/ openflowplugin-csit-periodic-1node-cds-longevity-only-master
590
591 Expect to see an XML file describing the build job in \</maven2-moduleset\> tags
592 on STOUT. If you dont see any XML check that you have assigned values to the
593 parameters between {} in the YAML files. For example {project}
594
595 Once this is complete you can push your JJB jobs to the sandbox with the
596 command:
597
598     jenkins-jobs --conf jenkins.ini update jjb/ <job-name>
599     jenkins-jobs --conf jenkins.ini update jjb/ openflowplugin-csit-periodic-1node-cds-longevity-only-beryllium
600
601 **Important Note:** When pushing with jenkins-jobs command it will print out a
602 message similar to the one below to inform you how many jobs JJB is pushing
603 online. If the number is greater than 1 (or the number of jobs you passed to
604 the command to push) then you are pushing too many jobs and should **ctrl+c**
605 to cancel the upload.
606
607     INFO:jenkins_jobs.builder:Number of jobs generated:  1
608
609 If using Docker:
610
611     # To test
612     docker run --rm -v ${PWD}:/jjb zxiiro/jjb-docker
613
614     # To upload jobs to the sandbox
615     # Please ensure that you include a configured jenkins.ini in your volume mount
616     docker run --rm -v ${PWD}:/jjb zxiiro/jjb-docker jenkins-jobs --conf jenkins.ini update . openflowplugin-csit-periodic-1node-cds-longevity-only-master