X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=docs%2Fjenkins.rst;h=40057f03b9e2b3d31dc6dc648b157731515628ef;hb=b77ff82ba886206add03c0144ce9705ecd7e2557;hp=ae2dbc0c91c0ab8c0e18fa12ce4388bacf1fbe4f;hpb=c834b9b47899de1e299a39b26389670ac34199b1;p=releng%2Fbuilder.git diff --git a/docs/jenkins.rst b/docs/jenkins.rst index ae2dbc0c9..40057f03b 100644 --- a/docs/jenkins.rst +++ b/docs/jenkins.rst @@ -27,24 +27,31 @@ in the jenkins-master_ silo and this can be achieved by simply creating a .. code-block:: bash - git clone https://git.opendaylight.org/gerrit/releng/builder + git clone --recursive https://git.opendaylight.org/gerrit/releng/builder cd builder mkdir jjb/ +.. note: + + releng/global-jjb is a submodule of releng/builder repository which + requires a git submodule update --init or using --recursive with git clone. + `releng-global-jjb`_ + Where should be the same name as your project's git repo in -Gerrit. So if your project is called "aaa" then create a new jjb/aaa directory. +Gerrit. If your project is called "aaa" then create a new jjb/aaa directory. Next we will create .yaml as follows: .. code-block:: yaml + --- - project: name: -carbon jobs: - - '{project-name}-clm-{stream}' - - '{project-name}-integration-{stream}' - - '{project-name}-merge-{stream}' - - '{project-name}-verify-{stream}-{maven}-{jdks}' + - '{project-name}-clm-{stream}' + - '{project-name}-integration-{stream}' + - '{project-name}-merge-{stream}' + - '{project-name}-verify-{stream}-{maven}-{jdks}' project: '' project-name: '' @@ -52,10 +59,10 @@ Next we will create .yaml as follows: branch: 'master' jdk: openjdk8 jdks: - - openjdk8 + - openjdk8 maven: - - mvn33: - mvn-version: 'mvn33' + - mvn33: + mvn-version: 'mvn33' mvn-settings: '-settings' mvn-goals: 'clean install -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r' mvn-opts: '-Xmx1024m -XX:MaxPermSize=256m' @@ -66,7 +73,7 @@ Next we will create .yaml as follows: - project: name: -sonar jobs: - - '{project-name}-sonar' + - '{project-name}-sonar' project: '' project-name: '' @@ -188,12 +195,13 @@ Pool: ODLRPC - + + centos7-java-builder-2c-4g, centos7-java-builder-2c-8g, + centos7-java-builder-4c-8g, centos7-java-builder-8c-8g, + centos7-java-builder-4c-16g - + @@ -218,7 +226,7 @@ Pool: ODLRPC - - + + - - + + - - - - - - - - - - - + - + - - + + + + + + + + + + + + +
Jenkins Labels
dynamic_controller, dynamic_verify, - dynamic_merge, centos7-java-builder-2c-4g, centos7-java-builder-2c-8g, - centos7-java-builder-4c-8g
Jenkins Labels
centos7-java-builder-2c-4g, + centos7-java-builder-2c-8g, centos7-java-builder-4c-8g, + centos7-java-builder-8c-8g, centos7-java-builder-4c-16g
Minion Template names
centos7-java-builder-2c-4g, - centos7-java-builder-2c-8g, centos7-java-builder-2c-8g, - centos7-java-builder-4c-8g, centos7-java-builder-8c-8g
Packer Template
releng/builder/packer/templates/java-builder.json
Spinup Script
@@ -201,16 +209,16 @@ Pool: ODLRPC
- A CentOS 7 huild minion. This system has OpenJDK 1.7 (Java7) and OpenJDK - 1.8 (Java8) installed on it along with all the other components and - libraries needed for building any current OpenDaylight project. This is - the label that is used for all basic verify, merge and daily builds for + CentOS 7 build minion configured with OpenJDK 1.7 (Java7) and OpenJDK + 1.8 (Java8) along with all the other components and libraries needed + for building any current OpenDaylight project. This is the label that + is used for all basic verify, merge and daily builds for projects.
Jenkins Labels
dynamic_robot, centos7-robot-2c-2g
Jenkins Labels
centos7-robot-2c-2g
Minion Template names
centos7-robot-2c-2g
Packer Template
releng/builder/packer/templates/robot.json
- A CentOS 7 minion that is configured with OpenJDK 1.7 (Java7), OpenJDK + CentOS 7 minion configured with OpenJDK 1.7 (Java7), OpenJDK 1.8 (Java8) and all the current packages used by the integration project for doing robot driven jobs. If you are executing robot framework jobs then your job should be using this as the minion that @@ -228,53 +236,39 @@ Pool: ODLRPC
Jenkins Labels
ubuntu_mininet, ubuntu-trusty-mininet-2c-2g
Minion Template names
ubuntu-trusty-mininet-2c-2g
Jenkins Labels
ubuntu1404-mininet-2c-2g
Minion Template names
ubuntu1404-mininet-2c-2g
Packer Template
releng/builder/packer/teamplates/mininet.json
Spinup Script
releng/builder/jenkins-scripts/mininet-ubuntu.sh
- Basic Ubuntu system with ovs 2.0.2 and mininet 2.1.0 + Basic Ubuntu 14.04 (Trusty) system with ovs 2.0.2 and mininet 2.1.0
Jenkins Labels
ubuntu_mininet_ovs_23, - ubuntu-trusty-mininet-ovs-23-2c-2g
Minion Template names
ubuntu-trusty-mininet-ovs-23-2c-2g
Jenkins Labels
ubuntu1404-mininet-ovs-23-2c-2g
Minion Template names
ubuntu1404-mininet-ovs-23-2c-2g
Packer Template
releng/builder/packer/templates/mininet-ovs-2.3.json
Spinup Script
releng/builder/jenkins-scripts/mininet-ubuntu.sh
- Basic Ubuntu system with ovs 2.3 and mininet 2.2.1 -
Jenkins Labels
ubuntu_mininet_ovs_25, - ubuntu-trusty-mininet-ovs-25-2c-2g
Minion Template names
ubuntu-trusty-mininet-ovs-25-2c-2g
Packer Template
releng/builder/packer/templates/mininet-ovs-2.5.json
Spinup Script
releng/builder/jenkins-scripts/mininet-ubuntu.sh
- Basic Ubuntu system with ovs 2.5 and mininet 2.2.2 + Ubuntu 16.04 (Xenial) system with ovs 2.5 and mininet 2.2.1
Jenkins Labels
dynamic_devstack, centos7-devstack-2c-4g
Jenkins Labels
centos7-devstack-2c-4g
Minion Template names
centos7-devstack-2c-4g
Packer Template
releng/builder/packer/templates/devstack.json
Spinup Script
releng/builder/jenkins-scripts/devstack.sh
- A CentOS 7 system purpose built for doing OpenStack testing using + CentOS 7 system purpose built for doing OpenStack testing using DevStack. This minion is primarily targeted at the needs of the OVSDB project. It has OpenJDK 1.7 (aka Java7) and OpenJDK 1.8 (Java8) and other basic DevStack related bits installed. @@ -282,14 +276,14 @@ Pool: ODLRPC
Jenkins Labels
dynamic_docker, centos7-docker-2c-4g
Jenkins Labels
centos7-docker-2c-4g
Minion Template names
centos7-docker-2c-4g
Packer Template
releng/builder/packer/templates/docker.json
Spinup Script
releng/builder/jenkins-scripts/docker.sh
- A CentOS 7 system that is configured with OpenJDK 1.7 (aka Java7), + CentOS 7 system configured with OpenJDK 1.7 (aka Java7), OpenJDK 1.8 (Java8) and Docker. This system was originally custom built for the test needs of the OVSDB project but other projects have expressed interest in using it. @@ -297,16 +291,29 @@ Pool: ODLRPC
Jenkins Labels
gbp_trusty, ubuntu-trusty-gbp-2c-2g
Minion Template names
ubuntu-trusty-gbp-2c-2g
Jenkins Labels
ubuntu1404-gbp-2c-2g
Minion Template names
ubuntu1404-gbp-2c-2g
Packer Template
releng/builder/packer/templates/gbp.json
Spinup Script
releng/builder/jenkins-scripts/ubuntu-docker-ovs.sh
- A basic Ubuntu node with latest OVS and docker installed. Used by Group Based Policy. + Ubuntu 14.04 (Trusty) node with latest OVS and docker installed. Used by Group Based Policy.
Jenkins Labels
ubuntu1604-gbp-2c-4g
Minion Template names
ubuntu1604-gbp-2c-4g
Packer Template
releng/builder/packer/templates/gbp.json
Spinup Script
releng/builder/jenkins-scripts/ubuntu-docker-ovs.sh
+ Ubuntu 16.04 (Xenial) node with latest OVS and docker installed. Used by Group Based Policy. +
Pool: ODLPUB - HOT (Heat Orchestration Templates) @@ -344,16 +351,11 @@ need to use the `jenkins-jobs` executable to translate a set of jobs into their XML descriptions and upload them to the sandbox Jenkins server. We document `installing `_ `jenkins-jobs` -below. We also provide -a `pre-built Docker image `_ with `jenkins-jobs` already installed. +below. Installing Jenkins Job Builder ------------------------------ -For users who aren't already experienced with Docker or otherwise don't want -to use our `pre-built JJB Docker image `_, installing JJB into a -virtual environment is an equally good option. - We recommend using `pip `_ to assist with JJB installs, but we also document `installing from a git repository manually @@ -376,8 +378,8 @@ installs, we recommend using `Python Virtual Environments `_ to manage JJB and its Python dependencies. The `python-virtualenvwrapper`_ tool can help you do so. -There are good docs for installing `python-virtualenvwrapper`_. On Linux systems -with pip (typical), they amount to: +Documentation is available for installing `python-virtualenvwrapper`_. On Linux +systems with pip (typical), they amount to: .. code-block:: bash @@ -431,7 +433,7 @@ First, clone the latest version of the `releng-builder-repo`_. .. code-block:: bash - $ git clone https://git.opendaylight.org/gerrit/p/releng/builder.git + $ git clone --recursive https://git.opendaylight.org/gerrit/p/releng/builder.git Before actually installing JJB and its dependencies, make sure you've `created and activated `_ a virtual environment for JJB. @@ -525,30 +527,6 @@ To validate that JJB was successfully installed you can run this command: (jjb)$ jenkins-jobs --version -JJB Docker Image ----------------- - -`Docker `_ is an open platform used to create virtualized Linux containers -for shipping self-contained applications. Docker leverages LinuX Containers -\(LXC\) running on the same operating system as the host machine, whereas a -traditional VM runs an operating system over the host. - -.. code-block:: bash - - docker pull zxiiro/jjb-docker - docker run --rm -v ${PWD}:/jjb jjb-docker - -This `Dockerfile `_ created the -`zxiiro/jjb-docker image `_. -By default it will run: - -.. code-block:: bash - - jenkins-jobs test . - -You'll need to use the `-v/--volume=[]` parameter to mount a directory -containing your YAML files, as well as a configured `jenkins.ini` file if you -wish to upload your jobs to the `Jenkins Sandbox`_. Jenkins Job Templates --------------------- @@ -801,7 +779,7 @@ example is provided by releng/builder at `example-jenkins.ini`_. .. code-block:: bash # If you don't have RelEng/Builder's repo, clone it - $ git clone https://git.opendaylight.org/gerrit/p/releng/builder.git + $ git clone --recursive https://git.opendaylight.org/gerrit/p/releng/builder.git # Make a copy of the example JJB config file (in the builder/ directory) $ cp jenkins.ini.example jenkins.ini # Edit jenkins.ini with your username, API token and ODL's sandbox URL @@ -904,38 +882,7 @@ details, including console output. Make changes to your JJB configuration, re-test, re-push and re-run until your job is ready. -Docker Method -^^^^^^^^^^^^^ - -If `using Docker `_: - -.. code-block:: bash - - # To test - docker run --rm -v ${PWD}:/jjb zxiiro/jjb-docker - -.. important:: - - When pushing with `jenkins-jobs`, a log message with - the number of jobs you're pushing will be issued, typically to stdout. - **If the number is greater than 1** (or the number of jobs you passed to - the command to push) then you are pushing too many jobs and should **`ctrl+c` - to cancel the upload**. Else you will flood the system with jobs. - - .. code-block:: bash - - INFO:jenkins_jobs.builder:Number of jobs generated: 1 - - **Failing to provide the final `` param will push all jobs!** - - .. code-block:: bash - - # To upload jobs to the sandbox - # Please ensure that you include a configured jenkins.ini in your volume mount - # Making sure not to push more jobs than expected, ctrl+c to abort - docker run --rm -v ${PWD}:/jjb zxiiro/jjb-docker jenkins-jobs --conf jenkins.ini update . openflowplugin-csit-periodic-1node-cds-longevity-only-master -.. _docker-docs: https://www.docker.com/whatisdocker/ .. _example-jenkins.ini: https://git.opendaylight.org/gerrit/gitweb?p=releng/builder.git;a=blob;f=jenkins.ini.example .. _integration-test-wiki: https://wiki.opendaylight.org/view/Integration/Test .. _jenkins-master: https://jenkins.opendaylight.org/releng @@ -943,8 +890,6 @@ If `using Docker `_: .. _jenkins-sandbox-login: https://jenkins.opendaylight.org/sandbox/login .. _jenkins.ini: http://docs.openstack.org/infra/jenkins-job-builder/execution.html#configuration-file .. _jjb-autoupdate-project.py: https://git.opendaylight.org/gerrit/gitweb?p=releng/builder.git;a=blob;f=scripts/jjb-autoupdate-project.py -.. _jjb-docker: https://hub.docker.com/r/zxiiro/jjb-docker/ -.. _jjb-dockerfile: https://github.com/zxiiro/jjb-docker/blob/master/Dockerfile .. _jjb-docs: http://ci.openstack.org/jenkins-job-builder/ .. _jjb-init-project.py: https://git.opendaylight.org/gerrit/gitweb?p=releng/builder.git;a=blob;f=scripts/jjb-init-project.py .. _jjb-repo: https://github.com/openstack-infra/jenkins-job-builder @@ -958,6 +903,7 @@ If `using Docker `_: .. _releng-wiki: https://wiki.opendaylight.org/view/RelEng:Main .. _releng-builder-gerrit: https://git.opendaylight.org/gerrit/#/admin/projects/releng/builder .. _releng-builder-repo: https://git.opendaylight.org/gerrit/gitweb?p=releng%2Fbuilder.git;a=summary +.. _releng-global-jjb: https://gerrit.linuxfoundation.org/infra/#/q/project:releng/global-jjb .. _releng-builder-wiki: https://wiki.opendaylight.org/view/RelEng/Builder .. _streams-design-background: https://lists.opendaylight.org/pipermail/release/2015-July/003139.html .. _spinup-scripts: https://git.opendaylight.org/gerrit/gitweb?p=releng/builder.git;a=tree;f=jenkins-scripts