# 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)
+ if [[ "$KARAF_VERSION" == "odl" ]]; then
+ ALLOW_PROJECTS+=(`grep '<groupId>org.opendaylight.' -Rh distribution \
+ | sed -e 's%^[ \t]*<groupId>org.opendaylight.%%' \
+ | sed -e 's%</groupId>%%' | sort -u`)
+ else
+ # For Managed distro we only look at the features folder
+ ALLOW_PROJECTS+=(`grep '<groupId>org.opendaylight.' -Rh distribution/features \
+ | sed -e 's%^[ \t]*<groupId>org.opendaylight.%%' \
+ | sed -e 's%</groupId>%%' | sort -u`)
+ fi
+ echo "Allowed projects are ${ALLOW_PROJECTS[@]}"
+ echo "ALLOW_PROJECTS=${ALLOW_PROJECTS[@]}" > allowed_projects.txt
- builder:
name: distribution-check-build-project
-DaltDeploymentRepository=fake-nexus::default::file:///tmp/n/
{mvn-opts}
java-opts:
- - '-Xmx4096m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
+ - '-Xmx4096m -Dmaven.compile.fork=true'
settings: 'integration-settings'
settings-type: cfp
global-settings: 'global-settings'
# 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 )
-Pq
{mvn-opts}
java-opts:
- - '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
+ - '-Xmx1024m -Dmaven.compile.fork=true'
settings: 'integration-settings'
settings-type: cfp
global-settings: 'global-settings'
-Pq
{mvn-opts}
java-opts:
- - '-Xmx4096m -XX:MaxPermSize=1024m -Dmaven.compile.fork=true'
+ - '-Xmx4096m -Dmaven.compile.fork=true'
- shell: |
rm -rf /tmp/r
mv /tmp/t /tmp/r
-DskipTests=false
{mvn-opts}
java-opts:
- - '-Xmx1024m -XX:MaxPermSize=256m -Dmaven.compile.fork=true'
+ - '-Xmx1024m -Dmaven.compile.fork=true'
- builder:
name: distribution-check-warn-9191