.. 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/<new-project>
+.. 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 <new-project> 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.
.. 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 <Virtual Environments_>`_ a virtual environment for JJB.
.. 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
.. _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
+++ /dev/null
----
-- project:
- name: armoury-csit-basic
- jobs:
- - '{project}-csit-1node-{functionality}-{install}-{stream}'
- - '{project}-csit-verify-1node-{functionality}'
-
- # The project name
- project: 'armoury'
-
- # The functionality under test
- functionality: 'basic'
-
- # Project branches
- stream:
- - nitrogen:
- branch: 'master'
- jre: 'openjdk8'
- - carbon:
- branch: 'stable/carbon'
- jre: 'openjdk8'
- karaf-version: karaf3
- - boron:
- branch: 'stable/boron'
- jre: 'openjdk8'
- karaf-version: karaf3
- - beryllium:
- branch: 'stable/beryllium'
- jre: 'openjdk7'
- karaf-version: karaf3
-
- install:
- - only:
- scope: 'only'
- - all:
- scope: 'all'
-
- # Features to install
- install-features: >
- odl-restconf,
- odl-armoury-workloadmanager
-
- # Robot custom options
- robot-options: ''
- builder:
name: autorelease-generate-release-patches
builders:
- - shell: !include-raw: include-raw-autorelease-release-versions.sh
+ - shell: !include-raw:
+ - ../global-jjb/shell/lftools-install.sh
+ - include-raw-autorelease-release-versions.sh
- builder:
name: autorelease-get-integration-test-variables
name: autorelease-projects
jobs:
- 'autorelease-release-{stream}'
+ - autorelease-version-bump-{stream}
stream:
- nitrogen:
branch: 'master'
jdk: 'openjdk8'
integration-test: nitrogen
+ karaf-version: karaf3
- carbon:
next-release-tag: Carbon
branch: 'stable/carbon'
- opendaylight-infra-shiplogs:
maven-version: 'mvn33'
+- job-template:
+ name: autorelease-version-bump-{stream}
+ project-type: freestyle
+ node: centos7-autorelease-4c-16g
+
+ properties:
+ - opendaylight-infra-properties:
+ build-days-to-keep: 7
+
+ parameters:
+ - lf-infra-parameters:
+ project: releng/autorelease
+ branch: '{branch}'
+ refspec: 'refs/heads/{branch}'
+ - string:
+ name: RELEASE_TAG
+ default: '{next-release-tag}'
+ description: |
+ Release that is being version bumped.
+ Eg. Lithium, Beryllium, Boron, Carbon, Carbon-SR1, Carbon-SR2...
+ - bool:
+ name: DRY_RUN
+ default: true
+ description: |
+ If DRY_RUN is enabled modifications are not published to Gerrit.
+ - maven-exec:
+ maven-version: mvn33
+
+ scm:
+ - lf-infra-gerrit-scm:
+ branch: '{branch}'
+ refspec: 'refs/heads/{branch}'
+ jenkins-ssh-credential: opendaylight-jenkins-ssh
+ submodule-recursive: true
+ choosing-strategy: default
+
+ wrappers:
+ - lf-infra-wrappers:
+ build-timeout: 240
+ jenkins-ssh-credential: opendaylight-jenkins-ssh
+
+ builders:
+ # force jenkins install of maven version before any shell scripts use it
+ - maven-target:
+ maven-version: mvn33
+ goals: '-version'
+ settings: autorelease-settings
+ settings-type: cfp
+ global-settings: odl-global-settings
+ global-settings-type: cfp
+ - autorelease-cfp
+ - shell: !include-raw-escape:
+ - ../global-jjb/shell/lftools-install.sh
+ - version-bump.sh
+
+ publishers:
+ - lf-infra-publish
- job-template:
name: 'autorelease-generate-release-notes-{stream}'
BUNDLE_URL="${NEXUSURL}/${STAGING_REPO_ID}/org/opendaylight/integration/${KARAF_ARTIFACT}/${VERSION}/${KARAF_ARTIFACT}-${VERSION}.zip"
echo STAGING_REPO_ID="$STAGING_REPO_ID" >> "$WORKSPACE/variables.prop"
echo BUNDLE_URL="$BUNDLE_URL" >> "$WORKSPACE/variables.prop"
+echo KARAF_VERSION="$KARAF_VERSION" >> "$WORKSPACE/variables.prop"
echo "BUNDLE_URL: ${BUNDLE_URL}"
# Copy variables.prop to variables.jenkins-trigger so that the end of build
# RELEASE_TAG=Beryllium-SR1 # Example
# RELEASE_BRANCH=stable/beryllium # Example
-LFTOOLS_DIR="$WORKSPACE/.venv-lftools"
-if [ ! -d "$LFTOOLS_DIR" ]
-then
- virtualenv "$LFTOOLS_DIR"
- # shellcheck disable=SC1090
- source "$LFTOOLS_DIR/bin/activate"
- pip install --upgrade pip
- pip freeze
- pip install lftools
-fi
-# shellcheck disable=SC1090
-source "$LFTOOLS_DIR/bin/activate"
-
# Directory to put git format-patches
PATCH_DIR="$WORKSPACE/patches"
--- /dev/null
+#!/bin/bash
+# @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0>
+##############################################################################
+# Copyright (c) 2017 The Linux Foundation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+##############################################################################
+
+# This script performs version bumping activities for an ODL release.
+echo "---> version-bump.sh"
+
+mkdir -p "$WORKSPACE/archives"
+LOG_FILE="$WORKSPACE/archives/version-bump.log"
+BRANCH="$GERRIT_BRANCH"
+
+# Ensure we fail the job if any steps fail.
+set -eu -o pipefail
+
+git checkout -b "${BRANCH,,}" "origin/${BRANCH,,}"
+git submodule foreach git checkout -b "${BRANCH,,}" "origin/${BRANCH,,}"
+
+# Check if git state is clean
+git status
+
+lftools version release "$RELEASE_TAG"
+lftools version bump "$RELEASE_TAG"
+
+git submodule foreach "git commit -asm 'Bump versions by x.y.(z+1)'"
+# Only submodules need to be bumped, we can ignore autorelease's bump information
+git checkout -f
+
+# Generate git patches
+patch_dir="$WORKSPACE/archives/patches/version-bump"
+mkdir -p "$patch_dir"
+for module in $(git submodule | awk '{ print $2 }')
+do
+ pushd "$module"
+ git format-patch --stdout "origin/${BRANCH,,}" > "$patch_dir/${module//\//-}.patch"
+ git bundle create "$patch_dir/${module//\//-}.bundle" "origin/${BRANCH,,}..HEAD"
+ popd
+done
+
+# Verify
+{
+ echo "----> Verify version bump"
+ git submodule foreach git show HEAD
+ git show HEAD
+ find . -name pom.xml -print0 | xargs -0 grep "$RELEASE_TAG" || true
+ git status
+ ls "$patch_dir"
+} | tee -a "$LOG_FILE"
+
+# Push
+if [ "$DRY_RUN" = "false" ]
+then
+ # Run a build here! Should be safe to run mvn clean deploy as nothing should be
+ # using the version bumped versions just yet.
+ ./scripts/fix-relativepaths.sh
+ "$MVN" clean deploy -Pq \
+ -s "$SETTINGS_FILE" \
+ -gs "$GLOBAL_SETTINGS_FILE" \
+ -DaltDeploymentRepository="opendaylight-snapshot::default::https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot" \
+ --show-version \
+ --batch-mode \
+ -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
+ -Djenkins \
+ -Dmaven.repo.local=/tmp/r \
+ -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r
+
+ # Push up patches last, as long as nothing failed.
+ git submodule foreach "git remote add gerrit '$GIT_URL/$PROJECT'"
+ git submodule foreach "git review --yes -t '${RELEASE_TAG}' || true"
+fi
+
+echo "Version bumping complete."
# TODO: Delete the following if suites are compatible with Boron again.
verify-stream: 'carbon'
# TODO: Remove the lines above and below when carbon becomes the default scit-verify stream.
- verify-branch: 'carbon'
+ verify-branch: 'stable/carbon'
# TODO: Update the line above when stable/carbon is created.
install:
# The functionality under test
functionality: 'basic'
+ # Set trigger
+ trigger-jobs: '{project}-merge-{stream}'
+
# Project branches
stream:
- - nitrogen:
- branch: 'master'
- jre: 'openjdk8'
- carbon:
- branch: 'stable/carbon'
+ branch: 'master'
jre: 'openjdk8'
karaf-version: karaf3
# yamllint disable-line rule:line-length
---
-- project:
- name: daexim-nitrogen
- jobs:
- - '{project-name}-clm-{stream}'
- - '{project-name}-integration-{stream}'
- - '{project-name}-merge-{stream}'
- - '{project-name}-verify-{stream}-{maven}-{jdks}'
-
- project: 'daexim'
- project-name: 'daexim'
- stream: nitrogen
- branch: 'master'
- jdk: openjdk8
- jdks:
- - openjdk8
- maven:
- - mvn33:
- mvn-version: 'mvn33'
- mvn-settings: 'daexim-settings'
- mvn-goals: 'clean install -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r'
- mvn-opts: '-Xmx1024m -XX:MaxPermSize=256m'
- dependencies: 'odlparent-merge-{stream},yangtools-merge-{stream},controller-merge-{stream}'
- email-upstream: '[daexim] [odlparent] [yangtools] [controller]'
- archive-artifacts: ''
-
- project:
name: daexim-carbon
jobs:
project: 'daexim'
project-name: 'daexim'
stream: carbon
- branch: 'stable/carbon'
+ branch: 'master'
karaf-version: karaf3
jdk: openjdk8
jdks:
- compare-type: ANT
pattern: '{files}'
+# Macro: integration-csit-only
+# Operation: this macro sets a trigger on reverse job list
+# Used by: csit -only- job templates
+
+- trigger:
+ name: integration-csit-trigger
+ triggers:
+ - reverse:
+ jobs: '{jobs}'
+ result: 'success'
+
# Macro: integration-openstack-controller-mininet
# Operation: this macro will spin the controller and mininet vms
# Used by: {project}-csit-* job templates
refspec: '$PATCHREFSPEC'
branch: 'master'
+ triggers:
+ # we need this for not SR projects
+ - integration-csit-trigger:
+ jobs: '{trigger-jobs}'
+
wrappers:
- opendaylight-infra-wrappers:
build-timeout: '{build-timeout}'
- trigger-builds:
- project: '{csit-list}'
block: true
- predefined-parameters:
+ predefined-parameters: |
BUNDLE_URL=$BUNDLE_URL
+ KARAF_VERSION=$KARAF_VERSION
publishers:
- email-notification:
#!/bin/bash
-LFTOOLS_DIR="$WORKSPACE/.venv-lftools"
-if [ ! -d "$LFTOOLS_DIR" ]
-then
- virtualenv "$LFTOOLS_DIR"
- # shellcheck disable=SC1090
- source "$LFTOOLS_DIR/bin/activate"
- pip install --upgrade pip
- pip install "lftools>=0.0.10"
- pip freeze
-fi
-# shellcheck disable=SC1090
-source "$LFTOOLS_DIR/bin/activate"
lftools openstack --os-cloud odlpriv-sandbox \
image cleanup --hide-public=True \
# Features to install
install-features: >
odl-openflowplugin-flow-services-ui,
- odl-openflowplugin-app-table-miss-enforcer,
decanter-collector-jmx,
decanter-appender-elasticsearch
# shellcheck disable=SC2154
pkg_basename="${{PACKAGE##*/}}"
# NB: Apt can't install directly from URL, so need this intermediary file
- curl -o "$pkg_basename" "$PACKAGE"
+ curl -L --silent -o "$pkg_basename" "$PACKAGE"
sudo dpkg --install ./"$pkg_basename"
elif [[ $PACKAGE == ppa:* ]]
then
- archive-artifacts:
artifacts: '**/*.rpm'
+ triggers:
+ - timed: '@daily'
+
- job-template:
name: 'packaging-test-rpm-{stream}'
- string:
name: PACKAGE
# yamllint disable-line rule:line-length
- default: 'http://ftp.gwdg.de/pub/opensuse/repositories/home:/akshitajha/xUbuntu_16.04/all/opendaylight_5.0.0-1_all.deb'
- description: 'Link to .deb file or name of custom PPA repo (ppa:odl-team/boron)'
+ default: 'https://launchpad.net/~odl-team/+archive/ubuntu/carbon/+files/opendaylight_6.0.0-1_all.deb'
+ description: 'Link to .deb file or name of custom PPA repo (ppa:odl-team/carbon)'
scm:
- integration-gerrit-scm:
# Default Robot framework options
robot-options: ''
+ trigger-jobs: ''
# Data for csit-verify jobs
# Branch for "last" version detection
# CSIT Test List Variables
# Space seperated strings to exclude from
# auto generated CSIT job lists
- csit-list-blacklist: 'longevity gate sanity'
+ csit-list-blacklist: 'longevity gate sanity daexim'
# Auto Generated CSIT job lists used
# in regular distribution test jobs
aaa-csit-1node-tls-only-nitrogen,
alto-csit-1node-setup-all-nitrogen,
alto-csit-1node-setup-only-nitrogen,
- armoury-csit-1node-basic-all-nitrogen,
- armoury-csit-1node-basic-only-nitrogen,
bgpcep-csit-1node-periodic-bgp-ingest-all-nitrogen,
bgpcep-csit-1node-periodic-bgp-ingest-mixed-all-nitrogen,
bgpcep-csit-1node-periodic-bgp-ingest-mixed-only-nitrogen,
controller-csit-3node-periodic-benchmark-all-nitrogen,
controller-csit-3node-periodic-benchmark-only-nitrogen,
controller-csit-3node-rest-clust-cars-perf-only-nitrogen,
- daexim-csit-1node-basic-only-nitrogen,
didm-csit-1node-discovery-only-nitrogen,
distribution-csit-1node-userfeatures-all-nitrogen,
distribution-csit-1node-userfeatures-only-nitrogen,
aaa-csit-1node-tls-only-carbon,
alto-csit-1node-setup-all-carbon,
alto-csit-1node-setup-only-carbon,
- armoury-csit-1node-basic-all-carbon,
- armoury-csit-1node-basic-only-carbon,
bgpcep-csit-1node-periodic-bgp-ingest-all-carbon,
bgpcep-csit-1node-periodic-bgp-ingest-mixed-all-carbon,
bgpcep-csit-1node-periodic-bgp-ingest-mixed-only-carbon,
controller-csit-3node-periodic-benchmark-all-carbon,
controller-csit-3node-periodic-benchmark-only-carbon,
controller-csit-3node-rest-clust-cars-perf-only-carbon,
- daexim-csit-1node-basic-only-carbon,
didm-csit-1node-discovery-only-carbon,
distribution-csit-1node-userfeatures-all-carbon,
distribution-csit-1node-userfeatures-only-carbon,
aaa-csit-1node-idmlite-only-boron,
alto-csit-1node-setup-all-boron,
alto-csit-1node-setup-only-boron,
- armoury-csit-1node-basic-all-boron,
- armoury-csit-1node-basic-only-boron,
bgpcep-csit-1node-periodic-bgp-ingest-all-boron,
bgpcep-csit-1node-periodic-bgp-ingest-mixed-all-boron,
bgpcep-csit-1node-periodic-bgp-ingest-mixed-only-boron,
aaa-csit-1node-idmlite-only-beryllium,
alto-csit-1node-setup-all-beryllium,
alto-csit-1node-setup-only-beryllium,
- armoury-csit-1node-basic-all-beryllium,
- armoury-csit-1node-basic-only-beryllium,
bgpcep-csit-1node-periodic-bgp-ingest-all-beryllium,
bgpcep-csit-1node-periodic-bgp-ingest-mixed-all-beryllium,
bgpcep-csit-1node-periodic-bgp-ingest-mixed-only-beryllium,
- timed: '@weekly'
builders:
- - shell: !include-raw-escape: opendaylight-infra-cleanup-old-images.sh
+ - shell: !include-raw-escape:
+ - global-jjb/shell/lftools-install.sh
+ - opendaylight-infra-cleanup-old-images.sh
publishers:
- email-notification:
- '{project-name}-distribution3-check-nitrogen'
- '{project-name}-integration-{stream}'
- '{project-name}-merge-{stream}'
- - '{project-name}-validate-autorelease-{stream}'
+ # - '{project-name}-validate-autorelease-{stream}'
- '{project-name}-verify-{stream}-{maven}-{jdks}'
stream: nitrogen
[testenv:coala]
basepython = python3
deps =
- coala
- coala-bears
+ coala==0.11
+ coala-bears==0.11
commands =
python3 -m nltk.downloader punkt maxent_treebank_pos_tagger averaged_perceptron_tagger
coala --non-interactive