function get_features() {
if [ "${CONTROLLERSCOPE}" == 'all' ]; then
- ACTUALFEATURES="odl-integration-compatible-with-all,${CONTROLLERFEATURES}"
+ if [ "$KARAF_PROJECT" == "integration" ]; then
+ ACTUALFEATURES="odl-integration-compatible-with-all,${CONTROLLERFEATURES}"
+ else
+ ACTUALFEATURES="odl-infrautils-ready,${CONTROLLERFEATURES}"
+ fi
# if CONTROLLERMEM still is the default 2G and was not overridden by a
# custom job, then we need to make sure to increase it because "all"
# features can be heavy
FEATURE_TEST_STRING="features-test"
fi
-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.2.0/xml/features,%g" ${FEATURESCONF}
-if [[ ! -z "${REPO_URL}" ]]; then
- sed -ie "s%featuresRepositories =%featuresRepositories = ${REPO_URL},%g" ${FEATURESCONF}
+# only manipulate feature repo in integration distro
+if [[ "$KARAF_PROJECT" == "integration" ]]; then
+ 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.2.0/xml/features,%g" ${FEATURESCONF}
+ if [[ ! -z "${REPO_URL}" ]]; then
+ sed -ie "s%featuresRepositories =%featuresRepositories = ${REPO_URL},%g" ${FEATURESCONF}
+ fi
fi
cat ${FEATURESCONF}
#!/bin/bash
-if [[ -n "${CONTROLLERFEATURES}" ]]; then
- ACTUALFEATURES="odl-integration-all,${CONTROLLERFEATURES}"
+# do not add integration features in MRI projects
+if [[ "$KARAF_PROJECT" == integration ]]; then
+ if [[ -n "${CONTROLLERFEATURES}" ]]; then
+ ACTUALFEATURES="odl-integration-all,${CONTROLLERFEATURES}"
+ else
+ ACTUALFEATURES="odl-integration-all"
+ fi
else
- ACTUALFEATURES="odl-integration-all"
+ ACTUALFEATURES="${CONTROLLERFEATURES}"
fi
if [[ "${JOB_NAME}" == *"distribution-sanity"* ]]; then
FEATURE_TEST_STRING="features-integration-test"
fi
-sed -ie "s%\(featuresRepositories= \|featuresRepositories = \)%featuresRepositories = mvn:org.opendaylight.integration/${FEATURE_TEST_STRING}//xml/features,%g" "${FEATURESCONF}"
+# only replace feature repo in integration/distro, MRI projects need to pull in
+# the features they need by themselves
+if [[ "$KARAF_PROJECT" == integration ]]; then
+ sed -ie "s%\(featuresRepositories= \|featuresRepositories = \)%featuresRepositories = mvn:org.opendaylight.integration/${FEATURE_TEST_STRING}//xml/features,%g" "${FEATURESCONF}"
-if [[ -n "${REPO_URL}" ]]; then
- # sed below will fail if it finds space between feature repos.
- REPO_URL_NO_SPACE="$(echo -e "${REPO_URL}" | tr -d '[:space:]')"
- sed -ie "s%featuresRepositories = %featuresRepositories = ${REPO_URL_NO_SPACE},%g" "${FEATURESCONF}"
-fi
+ if [[ -n "${REPO_URL}" ]]; then
+ # sed below will fail if it finds space between feature repos.
+ REPO_URL_NO_SPACE="$(echo -e "${REPO_URL}" | tr -d '[:space:]')"
+ sed -ie "s%featuresRepositories = %featuresRepositories = ${REPO_URL_NO_SPACE},%g" "${FEATURESCONF}"
+ fi
-# Add actual boot features.
-# sed below will fail if it finds space between feature repos.
-FEATURES_NO_SPACE="$(echo -e "${ACTUALFEATURES}" | tr -d '[:space:]')"
-sed -ie "s/\(featuresBoot= \|featuresBoot = \)/featuresBoot = ${FEATURES_NO_SPACE},/g" "${FEATURESCONF}"
-cat "${FEATURESCONF}"
+ # Add actual boot features.
+ # sed below will fail if it finds space between feature repos.
+ FEATURES_NO_SPACE="$(echo -e "${ACTUALFEATURES}" | tr -d '[:space:]')"
+ sed -ie "s/\(featuresBoot= \|featuresBoot = \)/featuresBoot = ${FEATURES_NO_SPACE},/g" "${FEATURESCONF}"
+ cat "${FEATURESCONF}"
+fi
echo "Configuring the log..."
LOGCONF="${WORKSPACE}/${BUNDLEFOLDER}/etc/org.ops4j.pax.logging.cfg"
# Obtain current pom.xml of integration/distribution, correct branch.
if [[ "$KARAF_ARTIFACT" == "opendaylight" ]]; then
wget "http://${GERRIT_PATH}/gitweb?p=integration/distribution.git;a=blob_plain;f=opendaylight/pom.xml;hb=refs/heads/$DISTROBRANCH" -O "pom.xml"
+elif [[ "$KARAF_ARTIFACT" == "karaf" ]]; then
+ wget "http://${GERRIT_PATH}/gitweb?p=integration/distribution.git;a=blob_plain;f=pom.xml;hb=refs/heads/$DISTROBRANCH" -O "pom.xml"
+elif [[ "$KARAF_ARTIFACT" == "netconf-karaf" ]]; then
+ wget "http://${GERRIT_PATH}/gitweb?p=${KARAF_PROJECT}.git;a=blob_plain;f=karaf/pom.xml;hb=refs/heads/$DISTROBRANCH" -O "pom.xml"
+elif [[ "$KARAF_ARTIFACT" == "controller-test-karaf" ]]; then
+ wget "http://${GERRIT_PATH}/gitweb?p=${KARAF_PROJECT}.git;a=blob_plain;f=karaf/pom.xml;hb=refs/heads/$DISTROBRANCH" -O "pom.xml"
else
wget "http://${GERRIT_PATH}/gitweb?p=integration/distribution.git;a=blob_plain;f=pom.xml;hb=refs/heads/$DISTROBRANCH" -O "pom.xml"
fi
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}"
+NEXUSPATH="${NEXUSURL_PREFIX}/${ODL_NEXUS_REPO}/org/opendaylight/${KARAF_PROJECT}/${KARAF_ARTIFACT}"
wget "${NEXUSPATH}/${BUNDLE_VERSION}/maven-metadata.xml"
# shellcheck disable=SC2181
# Obtain current pom.xml of integration/distribution, correct branch.
if [[ "$KARAF_ARTIFACT" == "opendaylight" ]]; then
wget "http://${GERRIT_PATH}/gitweb?p=integration/distribution.git;a=blob_plain;f=opendaylight/pom.xml;hb=refs/heads/$DISTROBRANCH" -O "pom.xml"
+ elif [[ "$KARAF_ARTIFACT" == "karaf" ]]; then
+ wget "http://${GERRIT_PATH}/gitweb?p=integration/distribution.git;a=blob_plain;f=pom.xml;hb=refs/heads/$DISTROBRANCH" -O "pom.xml"
+ elif [[ "$KARAF_ARTIFACT" == "netconf-karaf" ]]; then
+ wget "http://${GERRIT_PATH}/gitweb?p=${KARAF_PROJECT}.git;a=blob_plain;f=karaf/pom.xml;hb=refs/heads/$DISTROBRANCH" -O "pom.xml"
+ elif [[ "$KARAF_ARTIFACT" == "controller-test-karaf" ]]; then
+ wget "http://${GERRIT_PATH}/gitweb?p=${KARAF_PROJECT}.git;a=blob_plain;f=karaf/pom.xml;hb=refs/heads/$DISTROBRANCH" -O "pom.xml"
else
wget "http://${GERRIT_PATH}/gitweb?p=integration/distribution.git;a=blob_plain;f=pom.xml;hb=refs/heads/$DISTROBRANCH" -O "pom.xml"
fi
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}"
+ NEXUSPATH="${NEXUSURL_PREFIX}/${ODL_NEXUS_REPO}/org/opendaylight/${KARAF_PROJECT}/${KARAF_ARTIFACT}"
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)"
- string:
name: KARAF_VERSION
default: "{karaf-version}"
- description: "karaf3, karaf4, odl, affects ODL deploy scripts"
+ description: "karaf3, karaf4, odl, controller, netconf affects ODL deploy scripts"
- parameter:
name: integration-bundle-url
if [[ "$KARAF_VERSION" == "odl" ]]; then
KARAF_ARTIFACT="opendaylight"
+ KARAF_PROJECT="integration"
elif [[ "$KARAF_VERSION" == "karaf3" ]]; then
KARAF_ARTIFACT="distribution-karaf"
+ KARAF_PROJECT="integration"
+elif [[ "$KARAF_VERSION" == "controller" ]]; then
+ KARAF_ARTIFACT="controller-test-karaf"
+ KARAF_PROJECT="controller"
+elif [[ "$KARAF_VERSION" == "netconf" ]]; then
+ KARAF_ARTIFACT="netconf-karaf"
+ KARAF_PROJECT="netconf"
else
KARAF_ARTIFACT="karaf"
+ KARAF_PROJECT="integration"
fi
if [ "$JDKVERSION" == 'openjdk11' ]; then
fi
echo "Karaf artifact is ${KARAF_ARTIFACT}"
+echo "Karaf project is ${KARAF_PROJECT}"
echo "Java home is ${JAVA_HOME}"
# The following is not a shell file, double quotes would be literal.
cat > "${WORKSPACE}/set_variables.env" <<EOF
JAVA_HOME=${JAVA_HOME}
KARAF_ARTIFACT=${KARAF_ARTIFACT}
+KARAF_PROJECT=${KARAF_PROJECT}
EOF
# vim: ts=4 sw=4 sts=4 et ft=sh :
Install a custom OVS. It can be an OVS version to build (like
v2.9.2 or v2.6.1-nsh) or a yum repo url to pull from.
+# Template: {project}-mri-patch-test-{stream}
+# Goal: Build a patch and run project specific system test on a mri projects distribution containing the change
+# Operation: This job template builds a patch, uses the projects distribution and triggers the project system
+# test defined in {csit-list} when gerrit receives test-{project} keyword
+
+- job-template:
+ name: "{prefix}{project}-mri-patch-test-{feature}-{stream}"
+ id: inttest-mri-patch-test
+ <<: *inttest_csit_common
+
+ build-timeout: 720
+
+ parameters:
+ - opendaylight-infra-parameters:
+ os-cloud: "{os-cloud}"
+ project: "{project}"
+ branch: "{branch}"
+ refspec: "refs/heads/{branch}"
+ artifacts: "{archive-artifacts}"
+ - integration-distribution-branch:
+ branch: "{branch}"
+ - distribution-karaf-version:
+ karaf-version: "{karaf-version}"
+ - integration-distribution-git-url:
+ git-url: "{git-url}"
+ - string:
+ name: feature
+ default: "all"
+ description: "Specific feature test for patch"
+ - maven-exec:
+ maven-version: mvn35
+
+ scm:
+ - integration-gerrit-scm:
+ basedir: "{project}"
+ refspec: "$GERRIT_REFSPEC"
+ branch: "{branch}"
+ - integration-distribution-scm:
+ branch: "{branch}"
+
+ triggers:
+ - gerrit:
+ server-name: "{gerrit-server-name}"
+ trigger-on:
+ - comment-added-contains-event:
+ comment-contains-value: "test-{project}-all"
+ - comment-added-contains-event:
+ comment-contains-value: "test-{project}-{feature}"
+ projects:
+ - project-compare-type: "ANT"
+ project-pattern: "{project}"
+ branches:
+ - branch-compare-type: "ANT"
+ branch-pattern: "**/{branch}"
+ skip-vote:
+ successful: true
+ failed: true
+ unstable: true
+ notbuilt: true
+
+ builders:
+ - integration-rebase-gerrit-patch
+ - wipe-org-opendaylight-repo
+ - lf-update-java-alternatives:
+ java-version: "{java-version}"
+ - maven-target:
+ maven-version: mvn35
+ pom: "{project}/pom.xml"
+ goals: |
+ clean install dependency:tree
+ -Pq
+ -Dgitid.skip=false
+ -Dmaven.gitcommitid.skip=false
+ -DgenerateReports=false
+ -Dstream={stream}
+ {opendaylight-infra-mvn-opts}
+ # {opendaylight-infra-parallel-mvn-opts} is bad when there are multiple big features in SFT.
+ java-opts:
+ - "-Xmx4096m -Dmaven.compile.fork=true"
+ settings: integration-settings
+ settings-type: cfp
+ global-settings: global-settings
+ global-settings-type: cfp
+ - integration-upload-distribution:
+ dist-pom: "{project}/pom.xml"
+ - trigger-builds:
+ - project: "{csit-list}"
+ block: true
+ predefined-parameters: |
+ BUNDLE_URL=$BUNDLE_URL
+ GERRIT_BRANCH=$GERRIT_BRANCH
+ GERRIT_PROJECT=$GERRIT_PROJECT
+ GERRIT_REFSPEC=$GERRIT_REFSPEC
+ KARAF_VERSION=$KARAF_VERSION
+
+ publishers:
+ - email-notification:
+ email-recipients: "{email-recipients}"
+ email-prefix: "[{project}]"
+
# Template: {project}-patch-test-{stream}
# Goal: Build a patch and run project specific system test on a distribution containing the change
# Operation: This job template builds a patch, creates a distribution containing the patch, and
BUNDLE_VERSION=$(xpath "${BUNDLE_POM}" '/project/version/text()' 2> /dev/null)
BUNDLEFOLDER="${KARAF_ARTIFACT}-${BUNDLE_VERSION}"
BUNDLE="${BUNDLEFOLDER}.zip"
-BUNDLE_PATH="/tmp/r/org/opendaylight/integration/${KARAF_ARTIFACT}/${BUNDLE_VERSION}/${BUNDLE}"
+BUNDLE_PATH="/tmp/r/org/opendaylight/${KARAF_PROJECT}/${KARAF_ARTIFACT}/${BUNDLE_VERSION}/${BUNDLE}"
+if [[ "$KARAF_PROJECT" == "integration" ]]; then
+ GROUP_ID="org.opendaylight.${KARAF_PROJECT}.${GERRIT_PROJECT//\//.}"
+else
+ GROUP_ID="org.opendaylight.${KARAF_PROJECT}"
+fi
+
+echo "Bundle folder is ${BUNDLEFOLDER}"
+echo "Bundle is ${BUNDLE}"
+echo "Bundle path is ${BUNDLE_PATH}"
+echo "Group ID is ${GROUP_ID}"
+
ls -l "${BUNDLE_PATH}"
LOG_FILE='integration-upload-distribution.log'
echo "Uploading distribution to Nexus..."
-Dfile="${BUNDLE_PATH}" \
-DrepositoryId=opendaylight-snapshot \
-Durl="$ODLNEXUSPROXY/content/repositories/opendaylight.snapshot/" \
- -DgroupId="org.opendaylight.integration.${GERRIT_PROJECT//\//.}" \
+ -DgroupId="${GROUP_ID}" \
-DartifactId="${KARAF_ARTIFACT}" \
-Dversion="${BUNDLE_VERSION}" \
-Dpackaging=zip \
branch: "stable/aluminium"
jre: "openjdk11"
+ karaf-version: netconf
+
install:
- only:
scope: "only"
branch: "stable/aluminium"
jre: "openjdk11"
+ karaf-version: netconf
+
install:
- only:
scope: "only"
branch: "stable/aluminium"
jre: "openjdk11"
+ karaf-version: netconf
+
install:
- only:
scope: "only"
- project:
name: netconf-patch-test
jobs:
- - inttest-patch-test
+ - inttest-mri-patch-test
project: "netconf"
os-branch: "queens"
+ karaf-version: netconf
+
feature:
- core:
csit-list: >
branch: "stable/aluminium"
jre: "openjdk11"
+ karaf-version: netconf
+
install:
- only:
scope: "only"
\ INIT_DEVICE_COUNT:1000 -v MAX_DEVICE_COUNT:3000 -v DEVICE_INCREMENT:500\
\ -v TESTTOOL_BOOT_TIMEOUT:600s -v MAX_HEAP:4G --flattenkeywords name:*repeat*keyword*"
+ karaf-version: netconf
+
install:
- only:
scope: "only"
branch: "stable/aluminium"
jre: "openjdk11"
+ karaf-version: netconf
+
install:
- all:
scope: "all"
odl-restconf,
odl-netconf-mdsal,
odl-mdsal-apidocs,
- odl-mdsal-model-inventory,
odl-clustering-test-app,
odl-netconf-topology