#!/usr/bin/env python3
# -*- coding: utf-8 -*-
+# SPDX-License-Identifier: EPL-1.0
+##############################################################################
+# Copyright (c) 2018 The Linux Foundation and others.
#
-# OpenDaylight RelEng/Builder documentation build configuration file, created by
-# sphinx-quickstart on Thu May 5 10:17:10 2016.
-#
-# This file is execfile()d with the current directory set to its
-# containing dir.
-#
-# Note that not all possible configuration values are present in this
-# autogenerated file.
-#
-# All configuration values have a default; values that are commented out
-# serve to show the default.
-
-import sys
-import os
-
-# If extensions (or modules to document with autodoc) are in another directory,
-# add these directories to sys.path here. If the directory is relative to the
-# documentation root, use os.path.abspath to make it absolute, like shown here.
-#sys.path.insert(0, os.path.abspath('.'))
-
-# -- General configuration ------------------------------------------------
-
-# If your documentation needs a minimal Sphinx version, state it here.
-#needs_sphinx = '1.0'
-
-# Add any Sphinx extension module names here, as strings. They can be
-# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
-# ones.
-extensions = []
-
-# Add any paths that contain templates here, relative to this directory.
-templates_path = ['_templates']
-
-# The suffix(es) of source filenames.
-# You can specify multiple suffix as a list of string:
-# source_suffix = ['.rst', '.md']
-source_suffix = '.rst'
-
-# The encoding of source files.
-#source_encoding = 'utf-8-sig'
-
-# The master toctree document.
-master_doc = 'index'
-
-# General information about the project.
-project = 'OpenDaylight RelEng/Builder'
-copyright = '2016, Andrew Grimberg, Thanh Ha, Daniel Farell'
-author = 'Andrew Grimberg, Thanh Ha, Daniel Farell'
-
-# The version info for the project you're documenting, acts as replacement for
-# |version| and |release|, also used in various other places throughout the
-# built documents.
-#
-# The short X.Y version.
-version = '1.0.0'
-# The full version, including alpha/beta/rc tags.
-release = '1.0.0'
-
-# The language for content autogenerated by Sphinx. Refer to documentation
-# for a list of supported languages.
-#
-# This is also used if you do content translation via gettext catalogs.
-# Usually you set "language" from the command line for these cases.
-language = None
-
-# There are two options for replacing |today|: either, you set today to some
-# non-false value, then it is used:
-#today = ''
-# Else, today_fmt is used as the format for a strftime call.
-#today_fmt = '%B %d, %Y'
-
-# List of patterns, relative to source directory, that match files and
-# directories to ignore when looking for source files.
-# This patterns also effect to html_static_path and html_extra_path
-exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
-
-# The reST default role (used for this markup: `text`) to use for all
-# documents.
-#default_role = None
-
-# If true, '()' will be appended to :func: etc. cross-reference text.
-#add_function_parentheses = True
-
-# If true, the current module name will be prepended to all description
-# unit titles (such as .. function::).
-#add_module_names = True
-
-# If true, sectionauthor and moduleauthor directives will be shown in the
-# output. They are ignored by default.
-#show_authors = False
-
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
-
-# A list of ignored prefixes for module index sorting.
-#modindex_common_prefix = []
-
-# If true, keep warnings as "system message" paragraphs in the built documents.
-#keep_warnings = False
-
-# If true, `todo` and `todoList` produce output, else they produce nothing.
-todo_include_todos = False
-
-
-# -- Options for HTML output ----------------------------------------------
-
-# The theme to use for HTML and HTML Help pages. See the documentation for
-# a list of builtin themes.
-html_theme = 'alabaster'
-
-# Theme options are theme-specific and customize the look and feel of a theme
-# further. For a list of options available for each theme, see the
-# documentation.
-#html_theme_options = {}
-
-# Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = []
-
-# The name for this set of Sphinx documents.
-# "<project> v<release> documentation" by default.
-#html_title = 'OpenDaylight RelEng/Builder v1.0.0'
-
-# A shorter title for the navigation bar. Default is the same as html_title.
-#html_short_title = None
-
-# The name of an image file (relative to this directory) to place at the top
-# of the sidebar.
-#html_logo = None
-
-# The name of an image file (relative to this directory) to use as a favicon of
-# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
-# pixels large.
-#html_favicon = None
-
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['_static']
-
-# Add any extra paths that contain custom files (such as robots.txt or
-# .htaccess) here, relative to this directory. These files are copied
-# directly to the root of the documentation.
-#html_extra_path = []
-
-# If not None, a 'Last updated on:' timestamp is inserted at every page
-# bottom, using the given strftime format.
-# The empty string is equivalent to '%b %d, %Y'.
-#html_last_updated_fmt = None
-
-# If true, SmartyPants will be used to convert quotes and dashes to
-# typographically correct entities.
-#html_use_smartypants = True
-
-# Custom sidebar templates, maps document names to template names.
-#html_sidebars = {}
-
-# Additional templates that should be rendered to pages, maps page names to
-# template names.
-#html_additional_pages = {}
-
-# If false, no module index is generated.
-#html_domain_indices = True
-
-# If false, no index is generated.
-#html_use_index = True
-
-# If true, the index is split into individual pages for each letter.
-#html_split_index = False
-
-# If true, links to the reST sources are added to the pages.
-#html_show_sourcelink = True
-
-# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
-#html_show_sphinx = True
-
-# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
-#html_show_copyright = True
-
-# If true, an OpenSearch description file will be output, and all pages will
-# contain a <link> tag referring to it. The value of this option must be the
-# base URL from which the finished HTML is served.
-#html_use_opensearch = ''
-
-# This is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = None
-
-# Language to be used for generating the HTML full-text search index.
-# Sphinx supports the following languages:
-# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
-# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr', 'zh'
-#html_search_language = 'en'
-
-# A dictionary with options for the search language support, empty by default.
-# 'ja' uses this config value.
-# 'zh' user can custom change `jieba` dictionary path.
-#html_search_options = {'type': 'default'}
-
-# The name of a javascript file (relative to the configuration directory) that
-# implements a search results scorer. If empty, the default will be used.
-#html_search_scorer = 'scorer.js'
-
-# Output file base name for HTML help builder.
-htmlhelp_basename = 'OpenDaylightRelEngBuilderdoc'
-
-# -- Options for LaTeX output ---------------------------------------------
-
-latex_elements = {
-# The paper size ('letterpaper' or 'a4paper').
-#'papersize': 'letterpaper',
-
-# The font size ('10pt', '11pt' or '12pt').
-#'pointsize': '10pt',
-
-# Additional stuff for the LaTeX preamble.
-#'preamble': '',
-
-# Latex figure (float) alignment
-#'figure_align': 'htbp',
-}
-
-# Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title,
-# author, documentclass [howto, manual, or own class]).
-latex_documents = [
- (master_doc, 'OpenDaylightRelEngBuilder.tex', 'OpenDaylight RelEng/Builder Documentation',
- 'Andrew Grimberg, Thanh Ha, Daniel Farell', 'manual'),
-]
-
-# The name of an image file (relative to this directory) to place at the top of
-# the title page.
-#latex_logo = None
-
-# For "manual" documents, if this is true, then toplevel headings are parts,
-# not chapters.
-#latex_use_parts = False
-
-# If true, show page references after internal links.
-#latex_show_pagerefs = False
-
-# If true, show URL addresses after external links.
-#latex_show_urls = False
-
-# Documents to append as an appendix to all manuals.
-#latex_appendices = []
-
-# If false, no module index is generated.
-#latex_domain_indices = True
-
-
-# -- Options for manual page output ---------------------------------------
-
-# One entry per manual page. List of tuples
-# (source start file, name, description, authors, manual section).
-man_pages = [
- (master_doc, 'opendaylightrelengbuilder', 'OpenDaylight RelEng/Builder Documentation',
- [author], 1)
-]
-
-# If true, show URL addresses after external links.
-#man_show_urls = False
-
-
-# -- Options for Texinfo output -------------------------------------------
-
-# Grouping the document tree into Texinfo files. List of tuples
-# (source start file, target name, title, author,
-# dir menu entry, description, category)
-texinfo_documents = [
- (master_doc, 'OpenDaylightRelEngBuilder', 'OpenDaylight RelEng/Builder Documentation',
- author, 'OpenDaylightRelEngBuilder', 'One line description of project.',
- 'Miscellaneous'),
-]
-
-# Documents to append as an appendix to all manuals.
-#texinfo_appendices = []
-
-# If false, no module index is generated.
-#texinfo_domain_indices = True
+# 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
+##############################################################################
-# How to display URL addresses: 'footnote', 'no', or 'inline'.
-#texinfo_show_urls = 'footnote'
+from docs_conf.conf import *
-# If true, do not generate a @detailmenu in the "Top" node's menu.
-#texinfo_no_detailmenu = False
--- /dev/null
+project_cfg: opendaylight
+project: releng/builder
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
+.. _odl-infra:
+
Infrastructure Guide
====================
+.. _odl-jenkins:
+
Jenkins
=======
Maven property
<sonar>true</sonar>.
+.. _odl-jenkins-sandbox:
+
Jenkins Sandbox
---------------
+.. _odl-release-workflow:
+
Release Workflow
================
--- /dev/null
+lfdocs-conf
--- /dev/null
+IMAGE_NAME=ZZCI - CentOS 7 - autorelease - 20180125-2240
+HARDWARE_ID=v2-standard-4
--- /dev/null
+IMAGE_NAME=ZZCI - CentOS 7 - builder - 20180110-1659
+HARDWARE_ID=v1-standard-1
--- /dev/null
+IMAGE_NAME=ZZCI - CentOS 7 - builder - 20180110-1659
+HARDWARE_ID=v2-highcpu-2
--- /dev/null
+IMAGE_NAME=ZZCI - CentOS 7 - builder - 20180110-1659
+HARDWARE_ID=v2-standard-2
--- /dev/null
+IMAGE_NAME=ZZCI - CentOS 7 - builder - 20180110-1659
+HARDWARE_ID=v2-standard-4
--- /dev/null
+IMAGE_NAME=ZZCI - CentOS 7 - builder - 20180110-1659
+HARDWARE_ID=v2-highcpu-4
--- /dev/null
+IMAGE_NAME=ZZCI - CentOS 7 - builder - 20180201-2139
+HARDWARE_ID=v2-highcpu-8
--- /dev/null
+IMAGE_NAME=ZZCI - CentOS 7 - docker - 20180215-2201
+HARDWARE_ID=v2-standard-1
--- /dev/null
+IMAGE_NAME=ZZCI - CentOS 7 - docker - 20180215-2201
+HARDWARE_ID=v2-highcpu-2
--- /dev/null
+IMAGE_NAME=ZZCI - CentOS 7 - docker - 20180215-2201
+HARDWARE_ID=v2-standard-2
--- /dev/null
+IMAGE_NAME=ZZCI - CentOS 7 - robot - 20180109-1917
+HARDWARE_ID=v2-standard-2
+INSTANCE_CAP=25
--- /dev/null
+# Cloud Configuration
+CLOUD_CREDENTIAL_ID=os-cloud
+CLOUD_URL=https://auth.vexxhost.net/v3/
+CLOUD_IGNORE_SSL=false
+CLOUD_ZONE=ca-ymq-1
+
+# Default Template Configuration
+IMAGE_NAME=ZZCI - CentOS 7 - builder - 20180220-0346
+HARDWARE_ID=v1-standard-1
+NETWORK_ID=b5fcd86e-efac-4997-b8bc-dbe0d35bc229
+USER_DATA_ID=jenkins-init-script
+INSTANCE_CAP=75
+SANDBOX_CAP=6
+FLOATING_IP_POOL=
+SECURITY_GROUPS=default
+AVAILABILITY_ZONE=ca-ymq-2
+STARTUP_TIMEOUT=600000
+KEY_PAIR_NAME=jenkins
+NUM_EXECUTORS=1
+JVM_OPTIONS=
+FS_ROOT=/w
+RETENTION_TIME=0
--- /dev/null
+IMAGE_NAME=ZZCI - Ubuntu 16.04 - docker - 20180220-2018
+HARDWARE_ID=v2-highcpu-2
--- /dev/null
+IMAGE_NAME=ZZCI - Ubuntu 16.04 - mininet-ovs-25 - 20171208-1847
+HARDWARE_ID=v2-standard-1
builders:
- shell: !include-raw: update-validate-autorelease-projects.sh
+- builder:
+ name: autorelease-compare-projects
+ builders:
+ - shell: !include-raw: compare-autorelease-projects.sh
+
- publisher:
# Search console log for failures and email status to the release mailing list.
name: opendaylight-infra-notify-status
integration-test: oxygen
extra-mvn-opts: -Dsft.heap.max=4g
- nitrogen:
+ # Run once a week (Sunday) now that Fluorine branch is cut, and Oxygen is pending release
+ cron: 'H 12 * * 0'
next-release-tag: '{stream}'
branch: 'stable/nitrogen'
integration-test: nitrogen
extra-mvn-opts: -Dsft.heap.max=4g
- carbon:
- # Run once a week now that Nitrogen is released and Oxygen is in active development
- cron: 'H 12 * * 0'
+ # Run once a week (Saturday) now that Fluorine branch is cut, and Oxygen is pending release
+ cron: 'H 12 * * 6'
next-release-tag: '{stream}'
branch: 'stable/carbon'
integration-test: carbon
builders:
- autorelease-checkout-gerrit-patch
+ - autorelease-compare-projects
- jacoco-nojava-workaround
- shell: "./scripts/list-project-dependencies.sh"
- autorelease-determine-merge-order
--- /dev/null
+#!/bin/bash
+# SPDX-License-Identifier: EPL-1.0
+##############################################################################
+# Copyright (c) 2018 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 "---> compare-autorelease-projects.sh"
+
+# The purpose of this script is to compare list of projects in autorelease
+# are equal to the list of projects in integration/distribution.
+
+# Note: int/dist pom files uses templates only since Oxygen release.
+# Todo: Remove this check after Carbon and Nitrogen EOL
+if [[ $STREAM =~ carbon ]] || [[ $STREAM =~ nitrogen ]]; then
+ exit 0
+fi
+
+mapfile -t PROJECTS_INT_DIST < <(xmlstarlet sel\
+ -N "x=http://maven.apache.org/POM/4.0.0"\
+ -t -m "/x:project/x:profiles/x:profile[x:activation/x:activeByDefault='true']/x:dependencies/x:dependency/x:groupId"\
+ -v .\
+ -n integration/distribution/features/repos/index/pom.xml 2>/dev/null | sort -u)
+
+# process projects in int/dist read from pom.xml file
+declare -a project_int_dist
+for project in "${PROJECTS_INT_DIST[@]}"; do
+ if [[ $project =~ project.groupId ]] || [[ $project =~ odlparent ]]; then
+ continue
+ elif [[ $project =~ org.opendaylight ]]; then
+ project=$(echo "${project/org.opendaylight./}")
+ project_int_dist+=( "$(echo "${project/.//}" )" )
+ fi
+done
+
+project_int_dist+=("mdsal")
+project_int_dist+=("integration/distribution")
+
+# Get a list of all the projects from releng/autorelease repo
+declare -a project_AR
+mapfile -t project_AR < <(git submodule status | awk -e '{print $2}' | sort | uniq)
+
+# Use associative arrays to get diff in the projects lists
+declare -A map_AR map_intdist
+for project in "${project_AR[@]}"
+do
+ ((map_AR[$project]++))
+done
+
+for project in "${project_int_dist[@]-0}"
+do
+ ((map_intdist[$project]++))
+done
+
+for project in "${!map_AR[@]}"
+do
+ if (( ${map_AR[$project]} >= 1 && ${map_intdist[$project]-0} >= 1 )); then
+ unset "map_AR[$project]" "map_intdist[$project]"
+ fi
+done
+
+result=("${!map_AR[@]}" "${!map_intdist[@]}")
+
+if [ "${#result[@]}" != "0" ]; then
+ if [ "${#map_AR[@]}" != "0" ]; then
+ echo "WARNING: List of projects in releng/autorelease but NOT in integration/distribution: ${!map_AR[*]}"
+ elif [ "${#map_intdist[@]}" != "0" ]; then
+ echo "ERROR: List of projects in integration/distribution but NOT in releng/autorelease: ${!map_intdist[*]}"
+ exit 1
+ fi
+else
+ echo "List of projects releng/autorelease and integration/distribution repositories are equal"
+fi
- all:
scope: 'all'
+ verify-stream: 'oxygen'
+ verify-branch: 'stable/oxygen'
+ verify-karaf-version: 'karaf4'
+
# Mininet configuration
tools_system_count: 3
tools_system_image: ZZCI - Ubuntu 16.04 - mininet-ovs-25 - 20171208-1847
-Subproject commit 8e33e6ab798cd57a383cb8871d973de3fce6340c
+Subproject commit 90e4e825b3d0ac5959122c50e457419ad0cfe137
netvirt-csit-hwvtep-1node-openstack-queens-upstream-stateful-fluorine,
netvirt-csit-hwvtep-3node-openstack-pike-upstream-stateful-fluorine,
netvirt-csit-hwvtep-3node-openstack-queens-upstream-stateful-fluorine,
-nic-csit-1node-basic-all-fluorine,
-ocpplugin-csit-1node-get-all-fluorine,
-ocpplugin-csit-1node-scalability-all-fluorine,
of-config-csit-1node-basic-all-fluorine,
openflowplugin-csit-1node-cbench-only-fluorine,
openflowplugin-csit-1node-flow-services-all-fluorine,
sxp-csit-1node-topology-all-fluorine,
sxp-csit-3node-periodic-clustering-all-fluorine,
sxp-csit-3node-periodic-routing-all-fluorine,
-topoprocessing-csit-1node-topology-operations-all-fluorine,
tsdr-csit-1node-cassandra-datastore-only-fluorine,
tsdr-csit-1node-elasticsearch-datastore-only-fluorine,
tsdr-csit-1node-hbase-datastore-all-fluorine,
tsdr-csit-1node-hsqldb-datastore-all-fluorine,
-unimgr-csit-1node-basic-all-fluorine,
-unimgr-csit-1node-legato-all-fluorine,
usc-csit-1node-channel-all-fluorine,
usc-csit-1node-tcp-all-fluorine,
usecplugin-csit-1node-basic-all-fluorine,
netvirt-csit-hwvtep-1node-openstack-queens-upstream-stateful-oxygen,
netvirt-csit-hwvtep-3node-openstack-pike-upstream-stateful-oxygen,
netvirt-csit-hwvtep-3node-openstack-queens-upstream-stateful-oxygen,
-nic-csit-1node-basic-all-oxygen,
-ocpplugin-csit-1node-get-all-oxygen,
-ocpplugin-csit-1node-scalability-all-oxygen,
of-config-csit-1node-basic-all-oxygen,
openflowplugin-csit-1node-cbench-only-oxygen,
openflowplugin-csit-1node-flow-services-all-oxygen,
sxp-csit-1node-topology-all-oxygen,
sxp-csit-3node-periodic-clustering-all-oxygen,
sxp-csit-3node-periodic-routing-all-oxygen,
-topoprocessing-csit-1node-topology-operations-all-oxygen,
tsdr-csit-1node-cassandra-datastore-only-oxygen,
tsdr-csit-1node-elasticsearch-datastore-only-oxygen,
tsdr-csit-1node-hbase-datastore-all-oxygen,
tsdr-csit-1node-hsqldb-datastore-all-oxygen,
-unimgr-csit-1node-basic-all-oxygen,
-unimgr-csit-1node-legato-all-oxygen,
usc-csit-1node-channel-all-oxygen,
usc-csit-1node-tcp-all-oxygen,
usecplugin-csit-1node-basic-all-oxygen,
OPENSTACK_MASTER_CLIENTS_VERSION="queens"
# TODO: remove this work to run changes.py if/when it's moved higher up to be visible at the Robot level
-echo "showing recent changes that made it in to the distribution used by this job"
+printf "\nshowing recent changes that made it into the distribution used by this job:\n"
$PYTHON -m pip install --upgrade urllib3
python ${WORKSPACE}/test/tools/distchanges/changes.py -d /tmp/distribution_folder \
-u ${ACTUAL_BUNDLE_URL} -b ${DISTROBRANCH} \
-r ssh://jenkins-${SILO}@git.opendaylight.org:29418 || true
+
+printf "\nshowing recent changes that made it into integration/test used by this job:\n"
+cd ${WORKSPACE}/test
+git --no-pager log --pretty=format:'%h %<(13)%ar%<(13)%cr %<(20,trunc)%an%d %s' -n10
+cd -
+
cat << EOF
#################################################
## Deploy Openstack 3-node ##
fi
}
-
-
# convert commas in csv strings to spaces (ssv)
function csv2ssv() {
local csv=$1
"
}
+#Function to install rdo release
+# This will help avoiding installing wrong version of packages which causes
+# functionality failures
+function install_rdo_release() {
+ local ip=$1
+ case ${OPENSTACK_BRANCH} in
+ *pike*)
+ ${SSH} ${ip} "sudo yum install -y https://repos.fedorapeople.org/repos/openstack/openstack-pike/rdo-release-pike-1.noarch.rpm"
+ ;;
+
+ *queens*)
+ ${SSH} ${ip} "sudo yum install -y https://repos.fedorapeople.org/repos/openstack/openstack-queens/rdo-release-queens-1.noarch.rpm"
+ ;;
+
+ *ocata*)
+ ${SSH} ${ip} "sudo yum install -y https://repos.fedorapeople.org/repos/openstack/openstack-ocata/rdo-release-ocata-3.noarch.rpm"
+ ;;
+
+ master)
+ ${SSH} ${ip} "sudo yum install -y https://repos.fedorapeople.org/repos/openstack/openstack-queens/rdo-release-queens-1.noarch.rpm"
+ ;;
+ esac
+}
+
+
# Add enable_services and disable_services to the local.conf
function add_os_services() {
local core_services=$1
} # configure_haproxy_for_neutron_requests()
# Collect the list of files on the hosts
-function collect_files () {
+function collect_files() {
local -r ip=$1
local -r folder=$2
finddir=/tmp/finder
cp /tmp/rsync.tar.xz ${folder}
}
-function collect_logs () {
+# List of extra services to extract from journalctl
+# Add new services on a separate line, in alpha order, add \ at the end
+extra_services_cntl=" \
+ dnsmasq.service \
+ httpd.service \
+ libvirtd.service \
+ openvswitch.service \
+ ovs-vswitchd.service \
+ ovsdb-server.service \
+ rabbitmq-server.service \
+"
+
+extra_services_cmp=" \
+ libvirtd.service \
+ openvswitch.service \
+ ovs-vswitchd.service \
+ ovsdb-server.service \
+"
+
+# Collect the logs for the openstack services
+# First get all the services started by devstack which would have devstack@ as a prefix
+# Next get all the extra services
+function collect_openstack_logs() {
+ local -r ip=${1}
+ local -r folder=${2}
+ local -r node_type=${3}
+ local oslogs="${folder}/oslogs"
+
+ printf "collect_openstack_logs for ${node_type} node: ${ip} into ${oslogs}\n"
+ rm -rf ${oslogs}
+ mkdir -p ${oslogs}
+ # There are always some logs in /opt/stack/logs and this also covers the
+ # pre-queens branches which always use /opt/stack/logs
+ rsync -avhe ssh ${ip}:/opt/stack/logs/* ${oslogs} # rsync to prevent copying of symbolic links
+
+ # Starting with queens break out the logs from journalctl
+ if [ "${OPENSTACK_BRANCH}" = "stable/queens" ]; then
+ cat > ${WORKSPACE}/collect_openstack_logs.sh << EOF
+extra_services_cntl="${extra_services_cntl}"
+extra_services_cmp="${extra_services_cmp}"
+
+function extract_from_journal() {
+ local -r services=\${1}
+ local -r folder=\${2}
+ local -r node_type=\${3}
+ printf "extract_from_journal folder: \${folder}, services: \${services}\n"
+ for service in \${services}; do
+ # strip anything before @ and anything after .
+ # devstack@g-api.service will end as g-api
+ service_="\${service#*@}"
+ service_="\${service_%.*}"
+ sudo journalctl -u "\${service}" > "\${folder}/\${service_}.log"
+ done
+}
+
+rm -rf /tmp/oslogs
+mkdir -p /tmp/oslogs
+systemctl list-unit-files --all > /tmp/oslogs/systemctl.units.log 2>&1
+svcs=\$(grep devstack@ /tmp/oslogs/systemctl.units.log | awk '{print \$1}')
+extract_from_journal "\${svcs}" "/tmp/oslogs"
+if [ "\${node_type}" = "control" ]; then
+ extract_from_journal "\${extra_services_cntl}" "/tmp/oslogs"
+else
+ extract_from_journal "\${extra_services_cmp}" "/tmp/oslogs"
+fi
+ls -al /tmp/oslogs
+EOF
+ printf "collect_openstack_logs for ${node_type} node: ${ip} into ${oslogs}, executing script\n"
+ cat ${WORKSPACE}/collect_openstack_logs.sh
+ scp ${WORKSPACE}/collect_openstack_logs.sh ${ip}:/tmp
+ ${SSH} ${ip} "bash /tmp/collect_openstack_logs.sh > /tmp/collect_openstack_logs.log 2>&1"
+ rsync -avhe ssh ${ip}:/tmp/oslogs/* ${oslogs}
+ scp ${ip}:/tmp/collect_openstack_logs.log ${oslogs}
+ fi
+}
+
+function collect_logs() {
set +e # We do not want to create red dot just because something went wrong while fetching logs.
cat > extra_debug.sh << EOF
echo -e "/usr/sbin/lsmod | /usr/bin/grep openvswitch\n"
/usr/sbin/lsmod | /usr/bin/grep openvswitch
-echo -e "\ngrep ct_ /var/log/openvswitch/ovs-vswitchd.log\n"
-grep "Datapath supports" /var/log/openvswitch/ovs-vswitchd.log
+echo -e "\nsudo grep ct_ /var/log/openvswitch/ovs-vswitchd.log\n"
+sudo grep "Datapath supports" /var/log/openvswitch/ovs-vswitchd.log
echo -e "\nsudo netstat -punta\n"
sudo netstat -punta
echo -e "\nsudo getenforce\n"
mkdir -p ${WORKSPACE}/archives
mv /tmp/changes.txt ${WORKSPACE}/archives
+ mv ${WORKSPACE}/rabbit.txt ${WORKSPACE}/archives
sleep 5
# FIXME: Do not create .tar and gzip before copying.
NODE_FOLDER="control_${i}"
mkdir -p ${NODE_FOLDER}
scp extra_debug.sh ${!OSIP}:/tmp
- ${SSH} ${!OSIP} "bash /tmp/extra_debug.sh > /tmp/extra_debug.log"
+ ${SSH} ${!OSIP} "bash /tmp/extra_debug.sh > /tmp/extra_debug.log 2>&1"
scp ${!OSIP}:/etc/dnsmasq.conf ${NODE_FOLDER}
scp ${!OSIP}:/etc/keystone/keystone.conf ${NODE_FOLDER}
scp ${!OSIP}:/etc/keystone/keystone-uwsgi-admin.ini ${NODE_FOLDER}
scp ${!OSIP}:/tmp/get_devstack.sh.txt ${NODE_FOLDER}
scp ${!OSIP}:/tmp/journalctl.log ${NODE_FOLDER}
scp ${!OSIP}:/tmp/ovsdb-tool.log ${NODE_FOLDER}
- scp ${!OSIP}:/var/log/openvswitch/ovs-vswitchd.log ${NODE_FOLDER}
- scp ${!OSIP}:/var/log/openvswitch/ovsdb-server.log ${NODE_FOLDER}
collect_files "${!OSIP}" "${NODE_FOLDER}"
${SSH} ${!OSIP} "sudo tar -cf - -C /var/log rabbitmq | xz -T 0 > /tmp/rabbitmq.tar.xz "
scp ${!OSIP}:/tmp/rabbitmq.tar.xz ${NODE_FOLDER}
rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/audit/audit.log ${NODE_FOLDER}
rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/httpd/keystone_access.log ${NODE_FOLDER}
rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/httpd/keystone.log ${NODE_FOLDER}
- rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/messages ${NODE_FOLDER}
- rsync -avhe ssh ${!OSIP}:/opt/stack/logs/* ${NODE_FOLDER} # rsync to prevent copying of symbolic links
+ rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/messages* ${NODE_FOLDER}
+ rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/openvswitch/ovs-vswitchd.log ${NODE_FOLDER}
+ rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/openvswitch/ovsdb-server.log ${NODE_FOLDER}
+ collect_openstack_logs "${!OSIP}" "${NODE_FOLDER}" "control"
mv local.conf_control_${!OSIP} ${NODE_FOLDER}/local.conf
# qdhcp files are created by robot tests and copied into /tmp/qdhcp during the test
tar -cf - -C /tmp qdhcp | xz -T 0 > /tmp/qdhcp.tar.xz
NODE_FOLDER="compute_${i}"
mkdir -p ${NODE_FOLDER}
scp extra_debug.sh ${!OSIP}:/tmp
- ${SSH} ${!OSIP} "bash /tmp/extra_debug.sh > /tmp/extra_debug.log"
+ ${SSH} ${!OSIP} "bash /tmp/extra_debug.sh > /tmp/extra_debug.log 2>&1"
scp ${!OSIP}:/etc/nova/nova.conf ${NODE_FOLDER}
scp ${!OSIP}:/etc/nova/nova-cpu.conf ${NODE_FOLDER}
scp ${!OSIP}:/etc/openstack/clouds.yaml ${NODE_FOLDER}
scp ${!OSIP}:/tmp/get_devstack.sh.txt ${NODE_FOLDER}
scp ${!OSIP}:/tmp/journalctl.log ${NODE_FOLDER}
scp ${!OSIP}:/tmp/ovsdb-tool.log ${NODE_FOLDER}
- scp ${!OSIP}:/var/log/openvswitch/ovs-vswitchd.log ${NODE_FOLDER}
- scp ${!OSIP}:/var/log/openvswitch/ovsdb-server.log ${NODE_FOLDER}
collect_files "${!OSIP}" "${NODE_FOLDER}"
${SSH} ${!OSIP} "sudo tar -cf - -C /var/log libvirt | xz -T 0 > /tmp/libvirt.tar.xz "
scp ${!OSIP}:/tmp/libvirt.tar.xz ${NODE_FOLDER}
rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/etc/hosts ${NODE_FOLDER}
rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/audit/audit.log ${NODE_FOLDER}
- rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/messages ${NODE_FOLDER}
+ rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/messages* ${NODE_FOLDER}
rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/nova-agent.log ${NODE_FOLDER}
- rsync -avhe ssh ${!OSIP}:/opt/stack/logs/* ${NODE_FOLDER} # rsync to prevent copying of symbolic links
+ rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/openvswitch/ovs-vswitchd.log ${NODE_FOLDER}
+ rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/openvswitch/ovsdb-server.log ${NODE_FOLDER}
+ collect_openstack_logs "${!OSIP}" "${NODE_FOLDER}" "compute"
mv local.conf_compute_${!OSIP} ${NODE_FOLDER}/local.conf
mv ${NODE_FOLDER} ${WORKSPACE}/archives/
done
# Check if rabbitmq is ready by looking for a pid in it's status.
# The function returns the status of the grep command which callers can check.
function is_rabbitmq_ready() {
- local -r ip=$1
+ local -r ip=${1}
+ local grepfor="nova_cell1"
rm -f rabbit.txt
- ${SSH} ${ip} "sudo rabbitmqctl list_vhosts" > rabbit.txt
- grep nova_cell1 rabbit.txt
+ if [ "${OPENSTACK_BRANCH}" == "stable/ocata" ]; then
+ ${SSH} ${ip} "sudo rabbitmqctl status" > rabbit.txt
+ grepfor="pid"
+ else
+ ${SSH} ${ip} "sudo rabbitmqctl list_vhosts" > rabbit.txt
+ fi
+ grep ${grepfor} rabbit.txt
}
# retry the given command ($3) until success for a number of iterations ($1)
echo "git checkout ${DEVSTACK_HASH}"
git checkout ${DEVSTACK_HASH}
fi
-git --no-pager log --pretty=format:'%h %<(13)%ar%<(13)%cr %<(20,trunc)%an%d %s\n%b' -n20
+echo "workaround: Restore NEUTRON_CREATE_INITIAL_NETWORKS flag"
+if [ "${OPENSTACK_BRANCH}" == "stable/queens" ]; then
+ git config --local user.email jenkins@opendaylight.org
+ git config --local user.name jenkins
+ git fetch https://git.openstack.org/openstack-dev/devstack refs/changes/99/550499/1 && git cherry-pick FETCH_HEAD
+fi
+git --no-pager log --pretty=format:'%h %<(13)%ar%<(13)%cr %<(20,trunc)%an%d %s%b' -n20
+echo
echo "workaround: adjust wait from 60s to 1800s (30m)"
sed -i 's/wait_for_compute 60/wait_for_compute 1800/g' /opt/stack/devstack/lib/nova
# TODO: modify sleep 1 to sleep 60, search wait_for_compute, then first sleep 1
fi
create_control_node_local_conf ${!CONTROLIP} ${ODLMGRIP[$i]} "${ODL_OVS_MGRS[$i]}"
scp ${WORKSPACE}/local.conf_control_${!CONTROLIP} ${!CONTROLIP}:/opt/stack/devstack/local.conf
+ echo "Install rdo release to avoid incompatible Package versions"
+ install_rdo_release ${!CONTROLIP}
echo "Stack the control node ${i} of ${NUM_OPENSTACK_CONTROL_NODES}: ${CONTROLIP}"
ssh ${!CONTROLIP} "cd /opt/stack/devstack; nohup ./stack.sh > /opt/stack/devstack/nohup.out 2>&1 &"
ssh ${!CONTROLIP} "ps -ef | grep stack.sh"
fi
create_compute_node_local_conf ${!COMPUTEIP} ${!CONTROLIP} ${ODLMGRIP[$SITE_INDEX]} "${ODL_OVS_MGRS[$SITE_INDEX]}"
scp ${WORKSPACE}/local.conf_compute_${!COMPUTEIP} ${!COMPUTEIP}:/opt/stack/devstack/local.conf
+ echo "Install rdo release to avoid incompatible Package versions"
+ install_rdo_release ${!COMPUTEIP}
echo "Stack the compute node ${i} of ${NUM_OPENSTACK_COMPUTE_NODES}: ${COMPUTEIP}"
ssh ${!COMPUTEIP} "cd /opt/stack/devstack; nohup ./stack.sh > /opt/stack/devstack/nohup.out 2>&1 &"
ssh ${!COMPUTEIP} "ps -ef | grep stack.sh"
# Set up git committer name and email, needed for commit creation when cherry-picking.
export EMAIL="sandbox@jenkins.opendaylight.org"
-# TODO: Is there a more appropriate e-mail?
export GIT_COMMITTER_NAME="Multipatch Job"
-# TODO: Is "patches" still the correct word?
+# Extract a list of patches per project from an comment trigger. An example is:
+# Patch Set 1:
+#
+# multipatch-build:openflowplugin:45/69445/1,genius:46/69446/1,netvirt:47/69447/1
if [ -n "$GERRIT_EVENT_COMMENT_TEXT" ]; then
- PATCHES_TO_BUILD=$(echo "$GERRIT_EVENT_COMMENT_TEXT" \
- | grep 'multipatch-build:' | awk -F: '{print $2}')
+ # Grep the multipatch-build: line and then strip from the beginning to the :
+ PATCHES_TO_BUILD=$(echo "$GERRIT_EVENT_COMMENT_TEXT" | grep 'multipatch-build:')
+ PATCHES_TO_BUILD=${PATCHES_TO_BUILD#*:}
fi
IFS=',' read -ra PATCHES <<< "${PATCHES_TO_BUILD}"
# * Clone the project.
# * Optionally, checkout a specific (typically unmerged) Gerrit patch. If none,
# default to Integration/Distribution branch via {branch} JJB param.
-# * Also optionally, cherry-pick series of patchs on top of the checkout.
+# * Also optionally, cherry-pick series of patches on top of the checkout.
# * Final option: perform a 'release' by removing "-SNAPSHOT" everywhere within the project.
#
# Each patch is found in the ${PATCHES_TO_BUILD} variable as a comma separated
#
# PATCHES_TO_BUILD='odlparent=45/30045/2'
#
-# Checkout patchs for both odlparent and yangtools.
+# Checkout patches for both odlparent and yangtools:
#
# PATCHES_TO_BUILD='odlparent=45/30045/2,yangtools:53/26853/25'
#
-# Checkout a patch for controller, cherry-pick another patch on top of it.
+# Checkout a patch for controller, cherry-pick another patch on top of it:
#
# PATCHES_TO_BUILD='controller=61/29761/5:45/29645/6'
distribution_status="not_included"
# Project branches
stream:
- - fluorine:
- branch: 'master'
- - oxygen:
- branch: 'stable/oxygen'
- nitrogen:
branch: 'stable/nitrogen'
- carbon:
# Project branches
stream:
- - fluorine:
- branch: 'master'
- - oxygen:
- branch: 'stable/oxygen'
- nitrogen:
branch: 'stable/nitrogen'
- carbon:
# Project branches
stream:
- - fluorine:
- branch: 'master'
- - oxygen:
- branch: 'stable/oxygen'
- nitrogen:
branch: 'stable/nitrogen'
- carbon:
scripts_path=/builder/jjb/packaging
-docker_id=$(sudo docker run --env-file env-file --name build_rpm_epel -di --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro centos /usr/lib/systemd/systemd)
+if [ "$DISTRO" == "epel-7" ]; then
+ docker_id=$(sudo docker run --env-file env-file --name build_rpm_epel -di --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro centos /usr/lib/systemd/systemd)
+ sudo docker exec $docker_id /usr/bin/yum -y install sudo rpmdevtools rpmbuild git python-virtualenv python
+elif [ "$DISTRO" == "opensuse-42" ]; then
+ docker_id=$(sudo docker run --env-file env-file --name build_rpm_suse -di --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro opensuse /usr/lib/systemd/systemd)
+ sudo docker exec $docker_id /usr/bin/zypper -n install sudo rpmdevtools rpmbuild git python-virtualenv python
+fi
sudo docker cp "$(pwd)"/packaging/ $docker_id:/packaging
-sudo docker exec $docker_id /usr/bin/yum -y install sudo rpmdevtools rpmbuild git python-virtualenv python
-
sudo docker exec $docker_id git clone https://git.opendaylight.org/gerrit/releng/builder
sudo docker exec $docker_id /bin/bash $scripts_path/build-rpm-snap.sh
VERSION_MAJOR=7
elif [ "$STREAM" == "oxygen" ]; then
VERSION_MAJOR=8
+elif [ "$STREAM" == "fluorine" ]; then
+ VERSION_MAJOR=9
else
echo "Unable to convert stream to major version"
exit 1
# Move RPMs (SRPM and noarch) to dir of files that will be uploaded to Nexus
UPLOAD_FILES_PATH="$WORKSPACE/upload_files"
mkdir -p "$UPLOAD_FILES_PATH"
- cp "/home/$USER/rpmbuild/RPMS/noarch/"*.rpm "$_"
- cp "/home/$USER/rpmbuild/SRPMS/"*.rpm "$_"
+ cp "$HOME/rpmbuild/RPMS/noarch/"*.rpm "$_"
+ cp "$HOME/rpmbuild/SRPMS/"*.rpm "$_"
else
echo "Unknown Jenkins silo: $SILO"
exit 1
# -o pipefail: Fail on errors in scripts this calls, give stacktrace
set -ex -o pipefail
-# Update mirror list to avoid slow/hung one
-sudo yum update -y yum-plugin-fastestmirror
-
# Use local RPM in build-out dir if URL not passed
URL=${URL:-"$HOME/rpmbuild/RPMS/noarch/*.rpm"}
-# Install ODL from RPM path, RPM URL or .repo file url
-# NB: Paths must be anchored at root
-if [[ $URL == /* ]]; then
- # If path is globbed (/path/to/*.rpm), expand it
- path=$(sudo find / -wholename $URL)
- sudo yum install -y "$path"
-elif [[ $URL == *.rpm ]]; then
- sudo yum install -y "$URL"
-elif [[ $URL == *.repo ]]; then
- # shellcheck disable=SC2154
- repo_file="${URL##*/}"
- sudo curl --silent -o /etc/yum.repos.d/"$repo_file" "$URL"
- sudo yum install -y opendaylight
+if [ -f /usr/bin/yum ]; then
+ # Update mirror list to avoid slow/hung one
+ sudo yum update -y yum-plugin-fastestmirror
+
+ # Install ODL from RPM path, RPM URL or .repo file url
+ # NB: Paths must be anchored at root
+ if [[ $URL == /* ]]; then
+ # If path is globbed (/path/to/*.rpm), expand it
+ path=$(sudo find / -wholename $URL)
+ sudo yum install -y "$path"
+ elif [[ $URL == *.rpm ]]; then
+ sudo yum install -y "$URL"
+ elif [[ $URL == *.repo ]]; then
+ # shellcheck disable=SC2154
+ repo_file="${URL##*/}"
+ sudo curl --silent -o /etc/yum.repos.d/"$repo_file" "$URL"
+ sudo yum install -y opendaylight
+ else
+ echo "URL is not a link to .rpm or .repo"
+ exit 1
+ fi
+elif [ -f /usr/bin/zypper ]; then
+ # Install ODL from RPM path, RPM URL or .repo file url
+ # NB: Paths must be anchored at root
+ if [[ $URL == /* ]]; then
+ # If path is globbed (/path/to/*.rpm), expand it
+ path=$(sudo find /root -wholename $URL)
+ sudo zypper -n --no-gpg-checks install "$path"
+ elif [[ $URL == *.rpm ]]; then
+ sudo zypper -n --no-gpg-checks install "$URL"
+ elif [[ $URL == *.repo ]]; then
+ # shellcheck disable=SC2154
+ repo_file="${URL##*/}"
+ sudo curl --silent -o /etc/zypp/repos.d/"$repo_file" "$URL"
+ sudo zypper -n --no-gpg-checks install opendaylight
+ else
+ echo "URL is not a link to .rpm or .repo"
+ exit 1
+ fi
else
- echo "URL is not a link to .rpm or .repo"
+ echo "The package manager is not supported (not yum or zypper)"
exit 1
fi
- shell: !include-raw: uninstall-rpm.sh
- shell: |
# Remove old host key so future installs don't fail to SSH
- rm /home/jenkins/.ssh/known_hosts
+ rm /home/jenkins/.ssh/known_hosts || echo "No known_hosts file"
jobs:
- 'packaging-build-rpm-{stream}'
- - 'packaging-build-rpm-snap-{stream}'
+ - 'packaging-build-rpm-{distro}-snap-{stream}'
- 'packaging-build-deb-{stream}'
- 'packaging-verify-full-rpm-master'
- 'packaging-verify-rpm-master'
- carbon
- nitrogen
- oxygen
+ distro:
+ - opensuse-42
+ - epel-7
branch: 'master'
# common parameters required for 'lf-infra-deploy-maven-file' builder
- job-template:
- name: 'packaging-build-rpm-snap-{stream}'
+ name: 'packaging-build-rpm-{distro}-snap-{stream}'
node: centos7-docker-2c-8g
builders:
- inject:
- properties-content: 'STREAM={stream}'
+ properties-content: |
+ STREAM={stream}
+ DISTRO={distro}
- shell: !include-raw: build-rpm-snap-docker.sh
- shell: !include-raw: test-rpm-docker.sh
- lf-infra-deploy-maven-file:
global-settings-file: 'global-settings'
settings-file: 'packaging-settings'
mvn-version: '{mvn-version}'
- repo-id: 'opendaylight-{stream}-epel-7-x86_64-devel'
+ repo-id: 'opendaylight-{stream}-{distro}-x86_64-devel'
group-id: '{group-id}'
upload-files-dir: '{upload-files-dir}'
maven-repo-url: '{maven-repo-url}'
- install-test-uninstall-rpm
# Test Oxygen pre-release autorelease tarball
- # FIXME: There aren't any available Oxygen autorelease builds, add one once possible
- # FIXME: Oxygen tests fail due to jira.opendaylight.org/browse/ODLPARENT-139
- # - inject:
- # yamllint disable-line rule:line-length
- # properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/autorelease-2052/org/opendaylight/integration/karaf/0.8.0/karaf-0.8.0.tar.gz'
- # - shell: !include-raw-escape: build-rpm.sh
- # - install-test-uninstall-rpm
+ - inject:
+ # yamllint disable-line rule:line-length
+ properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/autorelease-2106/org/opendaylight/integration/karaf/0.8.0/karaf-0.8.0.tar.gz'
+ - shell: !include-raw-escape: build-rpm.sh
+ - install-test-uninstall-rpm
# Test Oxygen multipatch zip (no parallel tarball available)
- # FIXME: Oxygen tests fail due to jira.opendaylight.org/browse/ODLPARENT-139
- # - inject:
- # yamllint disable-line rule:line-length
- # properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/integration/distribution/karaf/0.8.0-SNAPSHOT/karaf-0.8.0-20180204.191936-134.zip'
- # - shell: !include-raw-escape: build-rpm.sh
- # - install-test-uninstall-rpm
+ - inject:
+ # yamllint disable-line rule:line-length
+ properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/integration/distribution/karaf/0.8.0-SNAPSHOT/karaf-0.8.0-20180305.133042-180.zip'
+ - shell: !include-raw-escape: build-rpm.sh
+ - install-test-uninstall-rpm
# Test latest Oxygen snapshot
- inject:
# NB: This will need to be updated as old builds expire
- inject:
# yamllint disable-line rule:line-length
- properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/integration/distribution/distribution-karaf/0.6.3-SNAPSHOT/distribution-karaf-0.6.3-20180115.181738-1.zip'
+ properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/integration/distribution/distribution-karaf/0.6.4-SNAPSHOT/distribution-karaf-0.6.4-20180305.151247-2.zip'
- shell: !include-raw-escape: build-rpm.sh
- install-test-uninstall-rpm
# NB: This will need to be updated as old builds expire
- inject:
# yamllint disable-line rule:line-length
- properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/integration/distribution/karaf/0.7.2-SNAPSHOT/karaf-0.7.2-20180115.183312-2.zip'
+ properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/integration/distribution/karaf/0.7.3-SNAPSHOT/karaf-0.7.3-20180305.153647-3.zip'
- shell: !include-raw-escape: build-rpm.sh
- install-test-uninstall-rpm
- install-test-uninstall-rpm
# Test Oxygen pre-release autorelease tarball
- # FIXME: There aren't any available Oxygen autorelease builds, add one once possible
- # FIXME: Oxygen tests fail due to jira.opendaylight.org/browse/ODLPARENT-139
# NB: This will need to be updated as old builds expire
- # - inject:
- # yamllint disable-line rule:line-length
- # properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/autorelease-2052/org/opendaylight/integration/karaf/0.8.0/karaf-0.8.0.tar.gz'
- # - shell: !include-raw-escape: build-rpm.sh
- # - install-test-uninstall-rpm
+ - inject:
+ # yamllint disable-line rule:line-length
+ properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/autorelease-2106/org/opendaylight/integration/karaf/0.8.0/karaf-0.8.0.tar.gz'
+ - shell: !include-raw-escape: build-rpm.sh
+ - install-test-uninstall-rpm
# Test Oxygen multipatch zip (no parallel tarball available)
- # FIXME: Oxygen tests fail due to jira.opendaylight.org/browse/ODLPARENT-139
# NB: This will need to be updated as old builds expire
- # - inject:
- # yamllint disable-line rule:line-length
- # properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/integration/distribution/karaf/0.8.0-SNAPSHOT/karaf-0.8.0-20180204.191936-134.zip'
- # - shell: !include-raw: build-rpm.sh
- # - install-test-uninstall-rpm
+ - inject:
+ # yamllint disable-line rule:line-length
+ properties-content: 'DOWNLOAD_URL=https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/integration/distribution/karaf/0.8.0-SNAPSHOT/karaf-0.8.0-20180305.133042-180.zip'
+ - shell: !include-raw-escape: build-rpm.sh
+ - install-test-uninstall-rpm
# Test latest Oxygen snapshot
- inject:
artifacts: '{archive-artifacts}'
- string:
name: PACKAGE
- default: 'ppa:odl-team/carbon'
+ default: 'ppa:odl-team/nitrogen'
description: 'Link to .deb package or name of PPA repo'
scm:
exit 1
fi
-# Requirements for package where SRPM was built into noarch on CentOS CBS
-# rpm -qp opendaylight-8.0.0-0.1.20171125rel2049.el7.noarch.rpm --requires
-# shellcheck disable=SC2034
-declare -a expected_deps=( "/bin/bash"
- "/bin/sh"
- "java >= 1:1.8.0"
- "rpmlib(CompressedFileNames) <= 3.0.4-1"
- "rpmlib(FileDigests) <= 4.6.0-1"
- "rpmlib(PartialHardlinkSets) <= 4.0.4-1"
- "rpmlib(PayloadFilesHavePrefix) <= 4.0-1"
- "shadow-utils"
- "rpmlib(PayloadIsXz) <= 5.2-1" )
+
+if [ -f /usr/bin/yum ]; then
+ # Requirements for package where SRPM was built into noarch on CentOS CBS
+ # rpm -qp opendaylight-8.0.0-0.1.20171125rel2049.el7.noarch.rpm --requires
+ # shellcheck disable=SC2034
+ declare -a expected_deps=( "/bin/bash"
+ "/bin/sh"
+ "java >= 1:1.8.0"
+ "rpmlib(CompressedFileNames) <= 3.0.4-1"
+ "rpmlib(FileDigests) <= 4.6.0-1"
+ "rpmlib(PartialHardlinkSets) <= 4.0.4-1"
+ "rpmlib(PayloadFilesHavePrefix) <= 4.0-1"
+ "shadow-utils"
+ "rpmlib(PayloadIsXz) <= 5.2-1" )
+
+elif [ -f /usr/bin/zypper ]; then
+ declare -a expected_deps=( "/bin/bash"
+ "/bin/sh"
+ "java >= 1.8.0"
+ "rpmlib(CompressedFileNames) <= 3.0.4-1"
+ "rpmlib(PayloadFilesHavePrefix) <= 4.0-1"
+ "shadow"
+ "rpmlib(PayloadIsLzma) <= 4.4.6-1" )
+
+fi
# Karaf 4 distros also have a /usr/bin/env requirement INTPAK-120
if [[ ! $path == *opendaylight-6* ]]; then
# shellcheck disable=SC2154,SC2145,SC2034,SC2207
diff_deps=(`echo "${expected_deps[@]}" "${actual_deps[@]}" | tr ' ' '\n' | sort | uniq -u`)
+
# shellcheck disable=SC2154 disable=SC2145 disable=SC2068 disable=SC2170 disable=SC1083
if [ ${#diff_deps[*]} -eq 0 ]; then
echo "RPM requirements are as expected"
scripts_path=/builder/jjb/packaging
# A docker container must have been created by the build script
-docker_id=$(sudo docker ps -qf name=build_rpm_epel)
-
-sudo docker exec $docker_id /usr/bin/yum -y install curl expect nmap openssh
+if [ "$DISTRO" == "epel-7" ]; then
+ docker_id=$(sudo docker ps -qf name=build_rpm_epel)
+ sudo docker exec $docker_id /usr/bin/yum -y install curl expect nmap openssh
+elif [ "$DISTRO" == "opensuse-42" ]; then
+ docker_id=$(sudo docker ps -qf name=build_rpm_suse)
+ sudo docker exec $docker_id /usr/bin/zypper -n install curl expect nmap openssh
+fi
sudo docker exec $docker_id /bin/bash $scripts_path/test-rpm-deps.sh
# -o pipefail: Fail on errors in scripts this calls, give stacktrace
set -ex -o pipefail
-# Uninstall ODL
-sudo yum remove -y opendaylight
+if [ -f /usr/bin/yum ]; then
+ # Uninstall ODL
+ sudo yum remove -y opendaylight
-# Verify ODL not installed
-if yum list installed opendaylight; then
- # Fail if exit code 0, ie ODL is still installed
- echo "OpenDaylight unexpectedly still installed"
- exit 1
+ # Verify ODL not installed
+ if yum list installed opendaylight; then
+ # Fail if exit code 0, ie ODL is still installed
+ echo "OpenDaylight unexpectedly still installed"
+ exit 1
+ else
+ echo "OpenDaylight not installed, as expected"
+ fi
+elif [ -f /usr/bin/zypper ]; then
+ # Uninstall ODL
+ sudo zypper -n remove opendaylight
+
+ # Verify ODL not installed
+ if zypper search --installed-only opendaylight; then
+ # Fail if exit code 0, ie ODL is still installed
+ echo "OpenDaylight unexpectedly still installed"
+ exit 1
+ else
+ echo "OpenDaylight not installed, as expected"
+ fi
else
- echo "OpenDaylight not installed, as expected"
+ echo "The package manager is not supported (not yum or zypper)"
+ exit 1
fi
- project:
name: builder-jobs
jobs:
+ - '{project-name}-rtd-jobs':
+ project-pattern: releng/builder
+ rtd-project: opendaylight-releng-builder
- gerrit-jenkins-cfg-merge:
jenkins-silos: releng sandbox
- gerrit-jjb-deploy-job
# Project branches
stream:
- - fluorine:
- branch: 'master'
- - oxygen:
- branch: 'stable/oxygen'
- nitrogen:
branch: 'stable/nitrogen'
- carbon:
# Project branches
stream:
- - fluorine:
- branch: 'master'
- - oxygen:
- branch: 'stable/oxygen'
- nitrogen:
branch: 'stable/nitrogen'
- carbon:
# Project branches
stream:
- - fluorine:
- branch: 'master'
- - oxygen:
- branch: 'stable/oxygen'
- nitrogen:
branch: 'stable/nitrogen'
- carbon:
coala --non-interactive
[testenv:docs]
-deps = sphinx
+deps = -rdocs/requirements.txt
commands = sphinx-build -b html -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
[testenv:pep8]