- project: 'integration-distribution-test-{integration-test}'
condition: FAILED
trigger-with-no-params: true
- - project: 'integration-sanity-test-{integration-test}'
- condition: UNSTABLE_OR_BETTER
- property-file: variables.jenkins-trigger
- fail-on-missing: true
- - project: 'integration-sanity-test-{integration-test}'
- condition: FAILED
- trigger-with-no-params: true
- project: 'packaging-build-rpm-{stream}'
condition: UNSTABLE_OR_BETTER
predefined-parameters: DOWNLOAD_URL=$BUNDLE_URL
-
CONTROLLERMEM="3072m"
ACTUALFEATURES="odl-integration-all"
-BUNDLEVERSION="$(xpath distribution/pom.xml '/project/version/text()' 2> /dev/null)"
-BUNDLEFOLDER="${KARAF_ARTIFACT}-${BUNDLEVERSION}"
-BUNDLE="${BUNDLEFOLDER}.zip"
-BUNDLE_PATH="/tmp/r/org/opendaylight/integration/${KARAF_ARTIFACT}/${BUNDLEVERSION}/${BUNDLE}"
+
+if [[ ! -z "${CONTROLLERFEATURES}" ]]; then
+ ACTUALFEATURES="odl-integration-all,${CONTROLLERFEATURES}"
+fi
echo "Kill any controller running"
ps axf | grep karaf | grep -v grep | awk '{print "kill -9 " $1}' | sh
echo "Clean Existing distribution"
rm -rf ${BUNDLEFOLDER}
-echo "Copying the distribution..."
-cp "${BUNDLE_PATH}" .
+echo "Fetch the distribution..."
+if [[ -z "${BUNDLE_PATH}" ]]; then
+ wget --progress=dot:mega "${ACTUAL_BUNDLE_URL}"
+else
+ cp "${BUNDLE_PATH}" .
+fi
echo "Extracting the new controller..."
unzip -q "${BUNDLE}"
echo "Configuring the startup features..."
FEATURESCONF="${WORKSPACE}/${BUNDLEFOLDER}/etc/org.apache.karaf.features.cfg"
-FEATURE_TEST_STRING="features-integration-test"
-if [[ "$KARAF_VERSION" == "karaf4" ]]; then
- FEATURE_TEST_STRING="features-test"
+FEATURE_TEST_STRING="features-test"
+if [[ "$KARAF_VERSION" == "karaf3" ]]; then
+ FEATURE_TEST_STRING="features-integration-test"
fi
-sed -ie "s%\(featuresRepositories=\|featuresRepositories =\)%featuresRepositories = mvn:org.opendaylight.integration/${FEATURE_TEST_STRING}/${BUNDLEVERSION}/xml/features,%g" ${FEATURESCONF}
+sed -ie "s%\(featuresRepositories=\|featuresRepositories =\)%featuresRepositories = mvn:org.opendaylight.integration/${FEATURE_TEST_STRING}/${BUNDLE_VERSION}/xml/features,%g" ${FEATURESCONF}
+
+if [[ ! -z "${REPO_URL}" ]]; then
+ sed -ie "s%featuresRepositories =%featuresRepositories = ${REPO_URL},%g" ${FEATURESCONF}
+fi
# Add actual boot features.
sed -ie "s/\(featuresBoot=\|featuresBoot =\)/featuresBoot = ${ACTUALFEATURES},/g" "${FEATURESCONF}"
echo "Listing all open ports on controller system"
netstat -pnatu
-echo "redirected karaf console output to karaf_console.log"
-export KARAF_REDIRECT="${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf_console.log"
-mkdir -p ${WORKSPACE}/${BUNDLEFOLDER}/data/log
-
if [ "${JDKVERSION}" == 'openjdk8' ]; then
echo "Setting the JRE Version to 8"
# dynamic_verify does not allow sudo, JAVA_HOME should be enough for karaf start.
echo "Starting controller..."
${WORKSPACE}/${BUNDLEFOLDER}/bin/start
-# No need for verbose printing during repeating operations.
-set +x
-
function dump_log_and_exit {
echo "Dumping first 500K bytes of karaf log..."
head --bytes=500K "${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf.log"
done
fi
-set -x
-
# echo "Checking OSGi bundles..."
# sshpass seems to fail with new karaf version
# sshpass -p karaf ${WORKSPACE}/${BUNDLEFOLDER}/bin/client -u karaf 'bundle:list'
fi
}
+exit_on_log_file_message 'Error installing boot feature repository'
exit_on_log_file_message 'BindException: Address already in use'
exit_on_log_file_message 'server is unhealthy'
+++ /dev/null
-CONTROLLERMEM="3072m"
-ACTUALFEATURES="odl-integration-all"
-
-echo "Kill any controller running"
-ps axf | grep karaf | grep -v grep | awk '{print "kill -9 " $1}' | sh
-
-echo "Clean workspace"
-rm -rf *
-
-echo "Downloading the distribution..."
-wget --progress=dot:mega "${ACTUAL_BUNDLE_URL}"
-
-echo "Extracting the new controller..."
-unzip -q "${BUNDLE}"
-
-echo "Configuring the startup features..."
-FEATURESCONF="${WORKSPACE}/${BUNDLEFOLDER}/etc/org.apache.karaf.features.cfg"
-FEATURE_TEST_STRING="features-integration-test"
-if [[ "$KARAF_VERSION" == "karaf4" ]]; then
- FEATURE_TEST_STRING="features-test"
-fi
-
-sed -ie "s%\(featuresRepositories=\|featuresRepositories =\)%featuresRepositories = mvn:org.opendaylight.integration/${FEATURE_TEST_STRING}/${BUNDLEVERSION}/xml/features,%g" ${FEATURESCONF}
-
-# Feature is instaled later.
-cat "${FEATURESCONF}"
-
-echo "Configuring the log..."
-LOGCONF="${WORKSPACE}/${BUNDLEFOLDER}/etc/org.ops4j.pax.logging.cfg"
-sed -ie 's/log4j.appender.out.maxBackupIndex=10/log4j.appender.out.maxBackupIndex=1/g' "${LOGCONF}"
-# FIXME: Make log size limit configurable from build parameter.
-sed -ie 's/log4j.appender.out.maxFileSize=1MB/log4j.appender.out.maxFileSize=30GB/g' "${LOGCONF}"
-cat "${LOGCONF}"
-
-echo "Configure the repos..."
-REPOCONF="${WORKSPACE}/${BUNDLEFOLDER}/etc/org.ops4j.pax.url.mvn.cfg"
-sed -ie '/http/d' "${REPOCONF}"
-sed -ie '$s/...$//' "${REPOCONF}"
-cat "${REPOCONF}"
-
-echo "Configure max memory..."
-MEMCONF="${WORKSPACE}/${BUNDLEFOLDER}/bin/setenv"
-sed -ie "s/2048m/${CONTROLLERMEM}/g" "${MEMCONF}"
-cat "${MEMCONF}"
-
-if [ "${JDKVERSION}" == 'openjdk8' ]; then
- echo "Setting the JRE Version to 8"
- # dynamic_verify does not allow sudo, JAVA_HOME should be enough for karaf start.
- # sudo /usr/sbin/alternatives --set java /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.60-2.b27.el7_1.x86_64/jre/bin/java
- export JAVA_HOME='/usr/lib/jvm/java-1.8.0'
-elif [ "${JDKVERSION}" == 'openjdk7' ]; then
- echo "Setting the JRE Version to 7"
- # dynamic_verify does not allow sudo, JAVA_HOME should be enough for karaf start.
- # sudo /usr/sbin/alternatives --set java /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.85-2.6.1.2.el7_1.x86_64/jre/bin/java
- export JAVA_HOME='/usr/lib/jvm/java-1.7.0'
-fi
-readlink -e "${JAVA_HOME}/bin/java"
-echo "Default JDK Version, JAVA_HOME should override"
-java -version
-
-echo "Redirecting karaf console output to karaf_console.log"
-export KARAF_REDIRECT="${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf_console.log"
-mkdir -p ${WORKSPACE}/${BUNDLEFOLDER}/data/log
-
-echo "Starting controller..."
-${WORKSPACE}/${BUNDLEFOLDER}/bin/start
-
-echo "Waiting for controller to come up..."
-# Silence the chatty output during the loop.
-set +x
-COUNT=0
-# Bug 9044 workaround: use bin/client instead of Linux ssh command.
-CLIENT="${WORKSPACE}/${BUNDLEFOLDER}/bin/client"
-while true; do
- # Is there a way to both print output and store RC without manipulating the e flag?
- set +e
- ${CLIENT} "feature:list -i"
- RC="$?"
- set -e
- if [[ "${RC}" == "0" ]]; then
- echo Karaf is UP
- break
- elif (( "${COUNT}" > 600 )); then
- echo Timeout Karaf DOWN
- echo "Dumping Karaf log..."
- cat "${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf.log"
- echo "Listing all open ports on controller system"
- netstat -pnatu
- exit 1
- else
- echo "${RC}"
- COUNT=$(( ${COUNT} + 1 ))
- sleep 1
- if [[ $(($COUNT % 5)) == 0 ]]; then
- echo already waited ${COUNT} seconds...
- fi
- fi
-done
-# Un-silence the chatty output.
-set -x
-
-echo "Installing all features..."
-$CLIENT feature:install ${ACTUALFEATURES} || echo $? > "${WORKSPACE}/error.txt"
-
-echo "killing karaf process..."
-ps axf | grep karaf | grep -v grep | awk '{print "kill -9 " $1}' | sh
-sleep 5
-
-echo "Fetching Karaf logs"
-# TODO: Move instead of copy? Gzip?
-cp "${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf.log" .
-cp "${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf_console.log" .
-
-echo "Exit if error"
-if [ -f "${WORKSPACE}/error.txt" ]; then
- echo "Failed to deploy offline"
- exit 1
-else
- echo "Offline test: PASS"
-fi
-
-# vim: ts=4 sw=4 sts=4 et ft=sh :
+++ /dev/null
-CONTROLLERMEM="3072m"
-ACTUALFEATURES="odl-integration-all"
-
-echo "Kill any controller running"
-ps axf | grep karaf | grep -v grep | awk '{print "kill -9 " $1}' | sh
-
-echo "Clean workspace"
-rm -rf *
-
-echo "Downloading the distribution..."
-wget --progress=dot:mega "${ACTUAL_BUNDLE_URL}"
-
-echo "Extracting the new controller..."
-unzip -q "${BUNDLE}"
-
-echo "Configuring the startup features..."
-FEATURESCONF="${WORKSPACE}/${BUNDLEFOLDER}/etc/org.apache.karaf.features.cfg"
-FEATURE_TEST_STRING="features-integration-test"
-if [[ "$KARAF_VERSION" == "karaf4" ]]; then
- FEATURE_TEST_STRING="features-test"
-fi
-
-sed -ie "s%\(featuresRepositories=\|featuresRepositories =\)%featuresRepositories = mvn:org.opendaylight.integration/${FEATURE_TEST_STRING}/${BUNDLEVERSION}/xml/features,%g" ${FEATURESCONF}
-
-# Add actual boot features.
-sed -ie "s/\(featuresBoot=\|featuresBoot =\)/featuresBoot = ${ACTUALFEATURES},/g" "${FEATURESCONF}"
-cat "${FEATURESCONF}"
-
-echo "Configuring the log..."
-LOGCONF="${WORKSPACE}/${BUNDLEFOLDER}/etc/org.ops4j.pax.logging.cfg"
-sed -ie 's/log4j.appender.out.maxFileSize=1MB/log4j.appender.out.maxFileSize=20MB/g' "${LOGCONF}"
-cat "${LOGCONF}"
-
-echo "Configure max memory..."
-MEMCONF="${WORKSPACE}/${BUNDLEFOLDER}/bin/setenv"
-sed -ie "s/2048m/${CONTROLLERMEM}/g" "${MEMCONF}"
-cat "${MEMCONF}"
-
-echo "Listing all open ports on controller system"
-netstat -pnatu
-
-if [ "${JDKVERSION}" == 'openjdk8' ]; then
- echo "Setting the JRE Version to 8"
- # dynamic_verify does not allow sudo, JAVA_HOME should be enough for karaf start.
- # sudo /usr/sbin/alternatives --set java /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.60-2.b27.el7_1.x86_64/jre/bin/java
- export JAVA_HOME='/usr/lib/jvm/java-1.8.0'
-elif [ "${JDKVERSION}" == 'openjdk7' ]; then
- echo "Setting the JRE Version to 7"
- # dynamic_verify does not allow sudo, JAVA_HOME should be enough for karaf start.
- # sudo /usr/sbin/alternatives --set java /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.85-2.6.1.2.el7_1.x86_64/jre/bin/java
- export JAVA_HOME='/usr/lib/jvm/java-1.7.0'
-fi
-readlink -e "${JAVA_HOME}/bin/java"
-echo "Default JDK Version, JAVA_HOME should override"
-java -version
-
-echo "Redirecting karaf console output to karaf_console.log"
-export KARAF_REDIRECT="${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf_console.log"
-mkdir -p ${WORKSPACE}/${BUNDLEFOLDER}/data/log
-
-echo "Starting controller..."
-${WORKSPACE}/${BUNDLEFOLDER}/bin/start
-
-function dump_log_and_exit {
- echo "Dumping first 500K bytes of karaf log..."
- head --bytes=500K "${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf.log"
- echo "Dumping last 500K bytes of karaf log..."
- tail --bytes=500K "${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf.log"
- cp "${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf.log" .
- cp "${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf_console.log" .
- exit 1
-}
-
-echo "Waiting up to 5 minutes for controller to come up, checking every 5 seconds..."
-if [ "${DISTROSTREAM}" == "carbon" ] || [ "${DISTROSTREAM}" == "nitrogen" ]; then
- # Only oxygen and above have the infrautils.ready feature, so using REST API to determine if the controller is ready.
- COUNT="0"
- while true; do
- COUNT=$(( ${COUNT} + 5 ))
- sleep 5
- echo "already waited ${COUNT} seconds..."
- RESP="$(curl --user admin:admin -sL -w "%{http_code} %{url_effective}\\n" http://localhost:8181/restconf/modules -o /dev/null || true)"
- echo ${RESP}
- if [[ ${RESP} == *"200"* ]]; then
- echo "Controller is UP"
- break
- elif (( "${COUNT}" > "300" )); then
- echo "Timeout Controller DOWN"
- dump_log_and_exit
- fi
- done
-else
- COUNT="0"
- while true; do
- COUNT=$(( ${COUNT} + 5 ))
- sleep 5
- echo "already waited ${COUNT} seconds..."
- if grep --quiet 'org.opendaylight.infrautils.ready-impl.*System ready' "${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf.log"; then
- echo "Controller is UP"
- break
- elif (( "${COUNT}" > "300" )); then
- echo "Timeout Controller DOWN"
- dump_log_and_exit
- fi
- done
-fi
-
-# echo "Checking OSGi bundles..."
-# sshpass seems to fail with new karaf version
-# sshpass -p karaf ${WORKSPACE}/${BUNDLEFOLDER}/bin/client -u karaf 'bundle:list'
-
-echo "Listing all open ports on controller system"
-netstat -pnatu
-
-function exit_on_log_file_message {
- echo "looking for \"$1\" in karaf.log file"
- if grep --quiet "$1" "${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf.log"; then
- echo ABORTING: found "$1"
- dump_log_and_exit
- fi
-
- echo "looking for \"$1\" in karaf_console.log file"
- if grep --quiet "$1" "${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf_console.log"; then
- echo ABORTING: found "$1"
- dump_log_and_exit
- fi
-}
-
-exit_on_log_file_message 'BindException: Address already in use'
-exit_on_log_file_message 'server is unhealthy'
-
-echo "Fetching Karaf logs"
-# TODO: Move instead of copy? Gzip?
-cp "${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf.log" .
-cp "${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf_console.log" .
-
-echo "Kill controller"
-ps axf | grep karaf | grep -v grep | awk '{print "kill -9 " $1}' | sh
-
-echo "Bug 4628: Detecting misplaced config files"
-pushd "${WORKSPACE}/${BUNDLEFOLDER}" || exit
-XMLS_FOUND=`echo *.xml`
-popd || exit
-if [ "$XMLS_FOUND" != "*.xml" ]; then
- echo "Bug 4628 confirmed."
- ## TODO: Uncomment the following when ODL is fixed, to guard against regression.
- # exit 1
-else
- echo "Bug 4628 not detected."
-fi
-
-# vim: ts=4 sw=4 sts=4 et ft=sh :
---
+- project:
+ name: distribution
+ jobs:
+ # gerrit- is generic template, distribution- is project specific.
+ - 'distribution-merge-{stream}'
+ - 'distribution-verify-{stream}'
+ - 'distribution-check-{stream}'
+ - 'distribution-sanity-{stream}'
+ - gerrit-maven-clm
+ - gerrit-maven-verify-dependencies
+ - gerrit-tox-verify
+ - '{project-name}-rtd-jobs':
+ project-pattern: integration/distribution
+ rtd-build-url: https://readthedocs.org/api/v2/webhook/opendaylight-distribution/34591/
+ rtd-token: 6247e7a21158a20b207470b8bf7719c676ff8944
+
+ project: integration/distribution
+ project-name: distribution
+ mvn-settings: integration-distribution-settings
+ mvn-goals: 'clean install dependency:tree -DoutputFile=dependency_tree.txt'
+ mvn-opts: '-Xmx1024m -XX:MaxPermSize=256m'
+ dependencies: ''
+ email-upstream: '[int/dist]'
+
+ stream:
+ - fluorine:
+ branch: 'master'
+ karaf-version: odl
+ # Self-Managed projects repos and features:
+ sm-repos: >
+ mvn:org.opendaylight.sxp/features-sxp//xml/features
+ sm-features: >
+ odl-sxp-controller
+ - oxygen:
+ branch: 'stable/oxygen'
+ karaf-version: karaf4
+ - nitrogen:
+ branch: 'stable/nitrogen'
+ karaf-version: karaf4
+
+- project:
+ name: distribution-sonar
+ jobs:
+ - gerrit-maven-sonar
+
+ project: integration/distribution
+ project-name: distribution
+ branch: master
+ mvn-settings: integration-distribution-settings
+ mvn-goals: clean install dependency:tree -DoutputFile=dependency_tree.txt
+ mvn-opts: '-Xmx1024m -XX:MaxPermSize=256m'
+
- job-template:
name: 'distribution-verify-{stream}'
builders:
- distribution-check-wipe
+ - inject:
+ properties-file: 'allowed_projects.txt'
- distribution-check-build-project:
pom: 'distribution/pom.xml'
mvn-opts: '{opendaylight-infra-mvn-opts}'
- lf-infra-publish
- job-template:
- name: 'distribution-deploy-{stream}'
+ name: 'distribution-sanity-{stream}'
# Goal: Verify distribution starts with no issues when all features are loaded.
- # Operation: This job deploys the controller installing odl-integration-all.
- # FIXME: List required variables.
+ # Operation: This job deploys odl-integration-all + list of UM features.
+ # This jobs works for both managed & self-managed distro.
project-type: freestyle
node: centos7-builder-4c-4g
branch: '{branch}'
- integration-bundle-url:
bundle-url: '{bundle-url}'
+ - integration-repo-url:
+ repo-url: '{sm-repos}'
+ - integration-controller-features:
+ controller-features: '{sm-features}'
- integration-jdk-version:
jdkversion: '{jre}'
- distribution-karaf-version:
- opendaylight-infra-wrappers:
build-timeout: '{build-timeout}'
- # TODO: Trigger from sanity (instead of weekly) when this job is stable for {stream}.
-
builders:
- - distribution-deploy-verify
-
- publishers:
- - email-notification:
- email-recipients: '{email-recipients}'
- email-prefix: '[{project-name}]'
- - integration-csit-archive-build
- - lf-infra-publish
-
-- job-template:
- name: 'distribution-offline-{stream}'
- # Goal: Verify distribution can start with no internet connection.
- # Operation: This job deploys the controller removing any external repository definition.
- # FIXME: List required variables.
-
- project-type: freestyle
- node: centos7-builder-4c-4g
- concurrent: false
-
- properties:
- - opendaylight-infra-properties:
- build-days-to-keep: '{build-days-to-keep}'
-
- parameters:
- - opendaylight-infra-parameters:
- os-cloud: '{os-cloud}'
- project: '{project}'
- branch: '{branch}'
- refspec: 'refs/heads/{branch}'
- artifacts: '{archive-artifacts}'
- - integration-distribution-branch:
- branch: '{branch}'
- - integration-bundle-url:
- bundle-url: '{bundle-url}'
- - integration-jdk-version:
- jdkversion: '{jre}'
- - distribution-karaf-version:
- karaf-version: '{karaf-version}'
-
- wrappers:
- - opendaylight-infra-wrappers:
- build-timeout: '{build-timeout}'
-
- # TODO: Trigger from sanity (instead of weekly) when this job is stable for {stream}.
-
- builders:
- - distribution-deploy-offline
+ - integration-detect-variables
+ - distribution-check-bootup
publishers:
- email-notification:
# JJB macros specific to Integration/Distribution ODL project
---
-
-- builder:
- name: distribution-deploy-verify
- # Operation: Deploy ODL with all fetures and check it is not broken.
- # Required bash variables:
- # KARAF_VERSION: 'karaf4' or 'karaf3'.
- # Use distribution-karaf-version macro to customize.
- builders:
- - integration-detect-variables
- - shell: !include-raw: distribution-deploy-verify.sh
-
-- builder:
- name: distribution-deploy-offline
- # Operation: Deploys ODL on the current system, with no external repo configuration, check it works.
- # Required bash variables:
- # KARAF_VERSION: 'karaf4' or 'karaf3'.
- # Use distribution-karaf-version macro to customize.
- builders:
- - integration-detect-variables
- - shell: !include-raw: distribution-deploy-offline.sh
-
- builder:
name: distribution-check-wipe
# Step zero: Wipe file repositories up front.
rm -rfv /tmp/t
echo "create n: multithreaded execution might fail at creating it."
mkdir /tmp/n
+ echo "detecting distribution allowed projects"
+ # Some allowed projects cannot be detected in distribution because they do not produce features.
+ ALLOW_PROJECTS=(yangtools mdsal openflowjava)
+ ALLOW_PROJECTS+=(`grep '<groupId>org.opendaylight.' -Rh distribution \
+ | sed -e 's%^[ \t]*<groupId>org.opendaylight.%%' \
+ | sed -e 's%</groupId>%%' | sort -u`)
+ echo "Allowed projects are ${ALLOW_PROJECTS[@]}"
+ echo "ALLOW_PROJECTS=${ALLOW_PROJECTS[@]}" > allowed_projects.txt
- builder:
name: distribution-check-build-project
goals: |
clean deploy
dependency:tree -DoutputFile=dependency_tree.txt
- -Pq
+ -Pq -Pmanaged -Punmanaged
-DaltDeploymentRepository=fake-nexus::default::file:///tmp/n/
{mvn-opts}
java-opts:
# gerrit-project: Project name as nexus URI part. Typically '$GERRIT_PROJECT'.
builders:
- shell: |
+ echo "These are allowed projects: $ALLOW_PROJECTS"
+ echo "These are distribution pulled projects:"
+ EXIT_CODE="0"
+ for PROJECT in `ls /tmp/r/org/opendaylight`; do
+ echo "checking $PROJECT"
+ if [[ "$ALLOW_PROJECTS" != *"$PROJECT"* ]]; then
+ echo "ERROR: Not allowed project $PROJECT pulled"
+ EXIT_CODE="1"
+ fi
+ done
+ exit $EXIT_CODE
+ echo "verify project groupId"
mkdir -p /tmp/t/org/opendaylight/{gerrit-project}
mv /tmp/n/org/opendaylight/{gerrit-project}/* /tmp/t/org/opendaylight/{gerrit-project}/
test -z "`find /tmp/n/ -type f`" || ( echo "ERROR: Mismatched groupId detected (see above)." && false )
goals: |
clean install
dependency:tree -DoutputFile=dependency_tree.txt
- -Pq
+ -Pq -Pmanaged -Punmanaged
{mvn-opts}
java-opts:
- '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
clean install
dependency:tree -DoutputFile=dependency_tree.txt
-s fake_remotes.xml
- -Pq
+ -Pq -Pmanaged -Punmanaged
{mvn-opts}
java-opts:
- '-Xmx4096m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
clean install
dependency:tree -DoutputFile=dependency_tree.txt
-s fake_remotes.xml
- -Pq
+ -Pq -Pmananaged -Punmanaged
-Dsft.heap.max=4g
-DskipTests=false
{mvn-opts}
builders:
- distribution-check-wipe
+ - inject:
+ properties-file: 'allowed_projects.txt'
- distribution-check-build-project:
pom: '$GERRIT_PROJECT/pom.xml'
mvn-opts: '{opendaylight-infra-mvn-opts}'
+++ /dev/null
----
-- project:
- name: distribution
- jobs:
- # gerrit- is generic template, distribution- is project specific.
- - 'distribution-merge-{stream}'
- - 'distribution-verify-{stream}'
- - 'distribution-deploy-{stream}'
- - 'distribution-offline-{stream}'
- - 'distribution-check-{stream}'
- - gerrit-maven-clm
- - gerrit-maven-verify-dependencies
- - gerrit-tox-verify
- - '{project-name}-rtd-jobs':
- project-pattern: integration/distribution
- rtd-build-url: https://readthedocs.org/api/v2/webhook/opendaylight-distribution/34591/
- rtd-token: 6247e7a21158a20b207470b8bf7719c676ff8944
-
- project: integration/distribution
- project-name: distribution
- mvn-settings: integration-distribution-settings
- mvn-goals: 'clean install dependency:tree -DoutputFile=dependency_tree.txt'
- mvn-opts: '-Xmx1024m -XX:MaxPermSize=256m'
- dependencies: ''
- email-upstream: '[int/dist]'
-
- stream:
- - fluorine:
- branch: 'master'
- - oxygen:
- branch: 'stable/oxygen'
- - nitrogen:
- branch: 'stable/nitrogen'
-
-- project:
- name: distribution-sonar
- jobs:
- - gerrit-maven-sonar
- project: integration/distribution
- project-name: distribution
- branch: master
- mvn-settings: integration-distribution-settings
- mvn-goals: clean install dependency:tree -DoutputFile=dependency_tree.txt
- mvn-opts: '-Xmx1024m -XX:MaxPermSize=256m'
# Obtain current pom.xml of integration/distribution, correct branch.
wget "http://${GERRIT_PATH}/gitweb?p=integration/distribution.git;a=blob_plain;f=pom.xml;hb=refs/heads/$DISTROBRANCH" -O "pom.xml"
-# Extract the BUNDLEVERSION from the pom.xml
-BUNDLEVERSION=$(xpath pom.xml '/project/version/text()' 2> /dev/null)
-echo "Bundle version is ${BUNDLEVERSION}"
+# Extract the BUNDLE_VERSION from the pom.xml
+BUNDLE_VERSION=$(xpath pom.xml '/project/version/text()' 2> /dev/null)
+echo "Bundle version is ${BUNDLE_VERSION}"
# Acquire the timestamp information from maven-metadata.xml
NEXUSPATH="${NEXUSURL_PREFIX}/${ODL_NEXUS_REPO}/org/opendaylight/integration/${KARAF_ARTIFACT}"
-wget ${NEXUSPATH}/${BUNDLEVERSION}/maven-metadata.xml
+wget ${NEXUSPATH}/${BUNDLE_VERSION}/maven-metadata.xml
if [ $? -ne 0 ]; then
echo "unable to find maven-metadata.xml. no need to continue..."
less maven-metadata.xml
TIMESTAMP=$(xpath maven-metadata.xml "//snapshotVersion[extension='zip'][1]/value/text()" 2>/dev/null)
echo "Nexus timestamp is ${TIMESTAMP}"
-BUNDLEFOLDER="${KARAF_ARTIFACT}-${BUNDLEVERSION}"
+BUNDLEFOLDER="${KARAF_ARTIFACT}-${BUNDLE_VERSION}"
BUNDLE="${KARAF_ARTIFACT}-${TIMESTAMP}.zip"
-ACTUAL_BUNDLE_URL="${NEXUSPATH}/${BUNDLEVERSION}/${BUNDLE}"
+ACTUAL_BUNDLE_URL="${NEXUSPATH}/${BUNDLE_VERSION}/${BUNDLE}"
wget --progress=dot:mega $ACTUAL_BUNDLE_URL
echo "Extracting the last distribution found on nexus..."
FEATURE_TEST_STRING="features-test"
fi
-sed -ie "s%\(featuresRepositories=\|featuresRepositories =\)%featuresRepositories = mvn:org.opendaylight.integration/\${FEATURE_TEST_STRING}/${BUNDLEVERSION}/xml/features,mvn:org.apache.karaf.decanter/apache-karaf-decanter/1.0.0/xml/features,%g" ${FEATURESCONF}
+sed -ie "s%\(featuresRepositories=\|featuresRepositories =\)%featuresRepositories = mvn:org.opendaylight.integration/\${FEATURE_TEST_STRING}/${BUNDLE_VERSION}/xml/features,mvn:org.apache.karaf.decanter/apache-karaf-decanter/1.0.0/xml/features,%g" ${FEATURESCONF}
if [[ ! -z "${REPO_URL}" ]]; then
sed -ie "s%featuresRepositories =%featuresRepositories = ${REPO_URL},%g" ${FEATURESCONF}
fi
FEATURE_TEST_STRING="features-test"
fi
-sed -ie "s%\(featuresRepositories=\|featuresRepositories =\)%featuresRepositories = mvn:org.opendaylight.integration/\${FEATURE_TEST_STRING}/${BUNDLEVERSION}/xml/features,mvn:org.apache.karaf.decanter/apache-karaf-decanter/1.0.0/xml/features,%g" ${FEATURESCONF}
+sed -ie "s%\(featuresRepositories=\|featuresRepositories =\)%featuresRepositories = mvn:org.opendaylight.integration/\${FEATURE_TEST_STRING}/${BUNDLE_VERSION}/xml/features,mvn:org.apache.karaf.decanter/apache-karaf-decanter/1.0.0/xml/features,%g" ${FEATURESCONF}
if [[ ! -z "${REPO_URL}" ]]; then
sed -ie "s%featuresRepositories =%featuresRepositories = ${REPO_URL},%g" ${FEATURESCONF}
fi
if [ ${BUNDLE_URL} == 'last' ]; then
# Obtain current pom.xml of integration/distribution, correct branch.
wget "http://${GERRIT_PATH}/gitweb?p=integration/distribution.git;a=blob_plain;f=pom.xml;hb=refs/heads/$DISTROBRANCH" -O "pom.xml"
- # Extract the BUNDLEVERSION from the pom.xml
- BUNDLEVERSION="$(xpath pom.xml '/project/version/text()' 2> /dev/null)"
- echo "Bundle version is ${BUNDLEVERSION}"
+ # Extract the BUNDLE_VERSION from the pom.xml
+ BUNDLE_VERSION="$(xpath pom.xml '/project/version/text()' 2> /dev/null)"
+ echo "Bundle version is ${BUNDLE_VERSION}"
# Acquire the timestamp information from maven-metadata.xml
NEXUSPATH="${NEXUSURL_PREFIX}/${ODL_NEXUS_REPO}/org/opendaylight/integration/${KARAF_ARTIFACT}"
- wget "${NEXUSPATH}/${BUNDLEVERSION}/maven-metadata.xml"
+ wget "${NEXUSPATH}/${BUNDLE_VERSION}/maven-metadata.xml"
less "maven-metadata.xml"
TIMESTAMP="$(xpath maven-metadata.xml "//snapshotVersion[extension='zip'][1]/value/text()" 2>/dev/null)"
echo "Nexus timestamp is ${TIMESTAMP}"
- BUNDLEFOLDER="${KARAF_ARTIFACT}-${BUNDLEVERSION}"
+ BUNDLEFOLDER="${KARAF_ARTIFACT}-${BUNDLE_VERSION}"
BUNDLE="${KARAF_ARTIFACT}-${TIMESTAMP}.zip"
- ACTUAL_BUNDLE_URL="${NEXUSPATH}/${BUNDLEVERSION}/${BUNDLE}"
+ ACTUAL_BUNDLE_URL="${NEXUSPATH}/${BUNDLE_VERSION}/${BUNDLE}"
else
ACTUAL_BUNDLE_URL="${BUNDLE_URL}"
BUNDLE="${BUNDLE_URL##*/}"
ARTIFACT="$(basename "$(dirname "$(dirname "${BUNDLE_URL}")")")"
- BUNDLEVERSION="$(basename "$(dirname "${BUNDLE_URL}")")"
- BUNDLEFOLDER="${ARTIFACT}-${BUNDLEVERSION}"
+ BUNDLE_VERSION="$(basename "$(dirname "${BUNDLE_URL}")")"
+ BUNDLEFOLDER="${ARTIFACT}-${BUNDLE_VERSION}"
fi
echo "Distribution bundle URL is ${ACTUAL_BUNDLE_URL}"
echo "Distribution bundle is ${BUNDLE}"
-echo "Distribution bundle version is ${BUNDLEVERSION}"
+echo "Distribution bundle version is ${BUNDLE_VERSION}"
echo "Distribution folder is ${BUNDLEFOLDER}"
echo "Nexus prefix is ${NEXUSURL_PREFIX}"
cat > "${WORKSPACE}/detect_variables.env" <<EOF
ACTUAL_BUNDLE_URL=${ACTUAL_BUNDLE_URL}
BUNDLE=${BUNDLE}
-BUNDLEVERSION=${BUNDLEVERSION}
+BUNDLE_VERSION=${BUNDLE_VERSION}
BUNDLEFOLDER=${BUNDLEFOLDER}
NEXUSURL_PREFIX=${NEXUSURL_PREFIX}
EOF
- string:
name: KARAF_VERSION
default: '{karaf-version}'
- description: 'karaf3 or karaf4, affects ODL deploy scripts'
+ description: 'karaf3, karaf4, odl, affects ODL deploy scripts'
- parameter:
name: integration-bundle-url
-if [[ "$KARAF_VERSION" == "karaf3" ]]; then
+if [[ "$KARAF_VERSION" == "odl" ]]; then
+ KARAF_ARTIFACT="opendaylight"
+elif [[ "$KARAF_VERSION" == "karaf3" ]]; then
KARAF_ARTIFACT="distribution-karaf"
else
KARAF_ARTIFACT="karaf"
- job-template:
name: '{prefix}{project}-csit-1node-{functionality}-{install}-{stream}'
id: inttest-csit-1node
- # Keep synchronized with *-csit4-*-carbon please.
disabled: false
project-type: freestyle
name: integration-test
project: integration/test
project-name: integration-test
- test-branch: master
jobs:
- - 'integration-distribution-test-{stream}'
- - 'integration-sanity-test-{stream}'
- 'integration-patch-test-{stream}'
- 'integration-multipatch-test-{stream}'
- - 'integration-distribution-weekly-test-trigger-{stream}'
- - 'integration-distribution-high-frequency-test-trigger-{stream}'
- - 'integration-update-csit-tests-{stream}'
- '{project-name}-rtd-jobs':
build-node: centos7-builder-2c-2g
project-pattern: integration/test
branch: master
stream: master
+ # CSIT Lists in releng-defaults.yaml
+ stream:
+ - fluorine:
+ branch: 'master'
+ mvn-version: 'mvn33'
+ csit-list: !include: csit-jobs-fluorine.lst
+
+ - oxygen:
+ branch: 'stable/oxygen'
+ mvn-version: 'mvn33'
+ csit-list: !include: csit-jobs-oxygen.lst
+
+ - nitrogen:
+ branch: 'stable/nitrogen'
+ mvn-version: 'mvn33'
+ csit-list: !include: csit-jobs-nitrogen.lst
+
+- project:
+ name: integration-distribution
+ project: integration/test
+ project-name: integration-test
+ jobs:
+ - 'integration-distribution-test-{stream}'
+ - 'integration-distribution-weekly-test-trigger-{stream}'
+ - 'integration-distribution-high-frequency-test-trigger-{stream}'
+ - 'integration-update-csit-tests-{stream}'
+
# CSIT Lists in releng-defaults.yaml
stream:
- fluorine:
l2switch messaging4transport nemo netide nic ocpplugin of-config p4plugin packetcable
sdninterfaceapp sxp tsdr unimgr usc usecplugin vtn gate longevity sanity tdd wip
csit-list: !include: csit-jobs-fluorine.lst
- csit-sanity-list: '{csit-sanity-list-fluorine}'
csit-weekly-list: '{csit-weekly-list-fluorine}'
csit-high-frequency-list: '{csit-high-frequency-list-fluorine}'
mvn-version: 'mvn35'
capwap centinel coe didm iotdm jsonrpc lacp messaging4transport netide nic
ocpplugin sdninterfaceapp unimgr usecplugin gate longevity sanity tdd wip
csit-list: !include: csit-jobs-oxygen.lst
- csit-sanity-list: '{csit-sanity-list-oxygen}'
csit-weekly-list: '{csit-weekly-list-oxygen}'
csit-high-frequency-list: '{csit-high-frequency-list-oxygen}'
mvn-version: 'mvn35'
branch: 'stable/nitrogen'
csit-blacklist: capwap centinel coe didm iotdm jsonrpc lacp netide tsdr gate longevity sanity tdd wip
csit-list: !include: csit-jobs-nitrogen.lst
- csit-sanity-list: '{csit-sanity-list-nitrogen}'
csit-weekly-list: '{csit-weekly-list-nitrogen}'
csit-high-frequency-list: '{csit-high-frequency-list-nitrogen}'
mvn-version: 'mvn35'
- # tools system image
- tools_system_image: ZZCI - Ubuntu 16.04 - mininet-ovs-25 - 20171208-1847
+- project:
+ name: integration-sanity
+ project: integration/test
+ project-name: integration-test
+ jobs:
+ - 'integration-sanity-test-{stream}'
-# Template: integration-distribution-test-{stream}
-# Goal: Verify a distribution through all system test available
-# Operation: This template takes a distribution and passes all available system test
+ stream:
+ - fluorine:
+ branch: 'master'
+ karaf-version: odl
+ csit-sanity-list: '{csit-sanity-list-fluorine}'
+ - oxygen:
+ branch: 'stable/oxygen'
+ karaf-version: karaf4
+ csit-sanity-list: '{csit-sanity-list-oxygen}'
+ - nitrogen:
+ branch: 'stable/nitrogen'
+ karaf-version: karaf4
+ csit-sanity-list: '{csit-sanity-list-nitrogen}'
- job-template:
name: 'integration-distribution-test-{stream}'
+ # Goal: Verify a distribution through all system test available
+ # Operation: This template takes a distribution and passes all available system test
project-type: freestyle
node: queue-disttest-2c-1g
email-prefix: '[integration]'
- lf-infra-publish
-# Template: integration-sanity-test-{stream}
-# Goal: Verify a distribution through sanity test
-# Operation: This template takes a distribution and passes sanity test
-
- job-template:
name: 'integration-sanity-test-{stream}'
+ # Goal: Verify a distribution through sanity test
+ # Operation: This template takes a distribution and passes sanity test
+ # This jobs works for both managed & unmanaged distro.
project-type: freestyle
node: queue-intque-2c-1g
- distribution-karaf-version:
karaf-version: '{karaf-version}'
+ triggers:
+ - timed: '{schedule-daily}'
+
builders:
- trigger-builds:
- project: '{csit-sanity-list}'
email-recipients: '{email-recipients}'
email-prefix: '[integration]'
-# Template: integration-patch-test-{stream}
-# Goal: Build a patch and run all available system test on a distribution containing the change
-# Operation: This job template builds a patch, creates a distribution containing the patch, and
-# triggers the distribution test when test-integration is used in gerrit comments
-
- job-template:
name: 'integration-patch-test-{stream}'
+ # Template: integration-patch-test-{stream}
+ # Goal: Build a patch and run all available system test on a distribution containing the change
+ # Operation: This job template builds a patch, creates a distribution containing the patch, and
+ # triggers the distribution test when test-integration is used in gerrit comments
project-type: freestyle
node: centos7-builder-2c-8g
set -xeu -o pipefail
BUNDLE_VERSION=$(xpath "${BUNDLE_POM}" '/project/version/text()' 2> /dev/null)
-BUNDLE="${KARAF_ARTIFACT}-${BUNDLE_VERSION}.zip"
-BUNDLE_FILEPATH="/tmp/r/org/opendaylight/integration/${KARAF_ARTIFACT}/${BUNDLE_VERSION}/${BUNDLE}"
-ls -l "${BUNDLE_FILEPATH}"
+BUNDLEFOLDER="${KARAF_ARTIFACT}-${BUNDLE_VERSION}"
+BUNDLE="${BUNDLEFOLDER}.zip"
+BUNDLE_PATH="/tmp/r/org/opendaylight/integration/${KARAF_ARTIFACT}/${BUNDLE_VERSION}/${BUNDLE}"
+ls -l "${BUNDLE_PATH}"
LOG_FILE='integration-upload-distribution.log'
echo "Uploading distribution to Nexus..."
"$MVN" deploy:deploy-file \
--log-file ${LOG_FILE} \
--global-settings "$GLOBAL_SETTINGS_FILE" \
--settings "$SETTINGS_FILE" \
- -Dfile="${BUNDLE_FILEPATH}" \
+ -Dfile="${BUNDLE_PATH}" \
-DrepositoryId=opendaylight-snapshot \
-Durl="$ODLNEXUSPROXY/content/repositories/opendaylight.snapshot/" \
-DgroupId="org.opendaylight.integration.${GERRIT_PROJECT//\//.}" \
# Re-inject the new BUNDLE_URL for downstream jobs to pull from Nexus
cat > "${WORKSPACE}/integration-upload-distribution.env" <<EOF
BUNDLE_URL=${BUNDLE_URL}
+BUNDLE_VERSION=${BUNDLE_VERSION}
+BUNDLEFOLDER=${BUNDLEFOLDER}
+BUNDLE=${BUNDLE}
+BUNDLE_PATH=${BUNDLE_PATH}
EOF
build-timeout: 360
build-node: centos7-builder-4c-4g
schedule: ''
+ schedule-daily: 'H H * * *'
schedule-saturday: 'H H * * 6'
schedule-weekly: 'H 23 * * 6'
schedule-high-frequency: 'H H/4 * * *'
# Distribution bundle URL
bundle-url: 'last'
repo-url: ''
+ install-features: ''
+ sm-repos: ''
+ sm-features: ''
# CSIT images configuration
openstack_system_image_ocata: ZZCI - CentOS 7 - devstack-ocata - 20171208-1649
csit-high-frequency-list-carbon: >
netvirt-csit-1node-openstack-ocata-upstream-stateful-carbon
csit-sanity-list-fluorine: >
- openflowplugin-csit-1node-sanity-only-fluorine
+ openflowplugin-csit-1node-sanity-only-fluorine,
+ distribution-sanity-fluorine
csit-sanity-list-oxygen: >
- openflowplugin-csit-1node-sanity-only-oxygen
+ openflowplugin-csit-1node-sanity-only-oxygen,
+ distribution-sanity-oxygen
csit-sanity-list-nitrogen: >
- openflowplugin-csit-1node-sanity-only-nitrogen
+ openflowplugin-csit-1node-sanity-only-nitrogen,
+ distribution-sanity-nitrogen
csit-sanity-list-carbon: >
- openflowplugin-csit-1node-sanity-only-carbon
+ openflowplugin-csit-1node-sanity-only-carbon,
+ distribution-sanity-carbon
csit-weekly-list-fluorine: >
controller-csit-1node-notifications-longevity-only-fluorine,
controller-csit-3node-drb-partnheal-longevity-only-fluorine,
controller-csit-3node-drb-precedence-longevity-only-fluorine,
controller-csit-3node-ddb-expl-lead-movement-longevity-only-fluorine,
bgpcep-csit-3node-bgpclustering-longevity-only-fluorine,
- distribution-deploy-fluorine,
- distribution-offline-fluorine,
openflowplugin-csit-1node-longevity-only-fluorine
csit-weekly-list-oxygen: >
controller-csit-1node-notifications-longevity-only-oxygen,
controller-csit-3node-drb-precedence-longevity-only-oxygen,
controller-csit-3node-ddb-expl-lead-movement-longevity-only-oxygen,
bgpcep-csit-3node-bgpclustering-longevity-only-oxygen,
- distribution-deploy-oxygen,
- distribution-offline-oxygen,
openflowplugin-csit-1node-longevity-only-oxygen
csit-weekly-list-nitrogen: >
controller-csit-1node-notifications-longevity-only-nitrogen,
controller-csit-3node-drb-precedence-longevity-only-nitrogen,
controller-csit-3node-ddb-expl-lead-movement-longevity-only-nitrogen,
bgpcep-csit-3node-bgpclustering-longevity-only-nitrogen,
- distribution-deploy-nitrogen,
- distribution-offline-nitrogen,
openflowplugin-csit-1node-longevity-only-nitrogen
csit-weekly-list-carbon: >
controller-csit-1node-notifications-longevity-only-carbon,
controller-csit-3node-drb-precedence-longevity-only-carbon,
controller-csit-3node-ddb-expl-lead-movement-longevity-only-carbon,
bgpcep-csit-3node-bgpclustering-longevity-only-carbon,
- distribution-deploy-carbon,
- distribution-offline-carbon,
openflowplugin-csit-1node-longevity-only-carbon