Skip to content

Commit

Permalink
Add scripts to run integs against EAP on CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias committed Aug 4, 2015
1 parent 4586f2c commit 1f45cd6
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 43 deletions.
39 changes: 39 additions & 0 deletions etc/bin/bees-ci-integ-build-eap.sh
@@ -0,0 +1,39 @@
#!/bin/bash

# This is the bees CI integ build. Any changes to the build
# script should be here instead if in the bees config.

set -e

DIR=$( cd "$( dirname "$0" )" && pwd )

. ${DIR}/common-build.sh

EAP_VERSION=6.4.0

function install-eap {
mark "Installing EAP ${EAP_VERSION}"
${DIR}/ci-prep-as.sh ${AS_DIR} EAP ${EAP_VERSION}
}

cleanup
install-lein
setup-lein-profiles
install-eap

mark "Building SNAPSHOT without tests"
lein modules install

cd integration-tests

export JBOSS_HOME="${AS_DIR}/EAP-${EAP_VERSION}"

mark "Starting integs"
lein with-profile +integs,+eap all

mark "Starting cluster tests"
lein with-profile +cluster,+eap all

cd -

mark "Done"
15 changes: 13 additions & 2 deletions etc/bin/bees-ci-integ-build.sh
Expand Up @@ -9,6 +9,17 @@ DIR=$( cd "$( dirname "$0" )" && pwd )

. ${DIR}/common-build.sh

WF8_VERSION="8.2.0.Final"
WF9_VERSION="9.0.0.Final"

function install-wildfly {
mark "Installing WildFly ${WF8_VERSION}"
${DIR}/ci-prep-as.sh ${AS_DIR} wildfly ${WF8_VERSION}

mark "Installing WildFly ${WF9_VERSION}"
${DIR}/ci-prep-as.sh ${AS_DIR} wildfly ${WF9_VERSION}
}

cleanup
install-lein
setup-lein-profiles
Expand All @@ -19,15 +30,15 @@ lein modules install

cd integration-tests

export JBOSS_HOME="${WF_DIR}/wildfly-${WF8_VERSION}"
export JBOSS_HOME="${AS_DIR}/wildfly-${WF8_VERSION}"

mark "Starting integs with ${WF8_VERSION}"
lein with-profile +integs all

mark "Starting cluster tests with ${WF8_VERSION}"
lein with-profile +cluster all

export JBOSS_HOME="${WF_DIR}/wildfly-${WF9_VERSION}"
export JBOSS_HOME="${AS_DIR}/wildfly-${WF9_VERSION}"

mark "Starting integs with ${WF9_VERSION}"
lein with-profile +integs all
Expand Down
46 changes: 46 additions & 0 deletions etc/bin/ci-prep-as.sh
@@ -0,0 +1,46 @@
#! /bin/sh

dest_dir=$1
type=$2
version=$3
jboss_home="${dest_dir}/${type}-${version}"

if [ -z "${version}" ]; then
echo "Usage: ${0} dest-dir (wildfly|EAP) version"
exit 1
fi

if [ ! -d ${jboss_home} ]; then
mkdir -p ${dest_dir}
cd ${dest_dir}
echo "Installing ${type} ${version} to ${dest_dir}"
if [ "$type" = "wildfly" ]; then
wget -nv http://download.jboss.org/wildfly/${version}/wildfly-${version}.tar.gz
tar xf wildfly-${version}.tar.gz
cd -
else
if [ "x${EAP_ARCHIVE_DIR}" = "x" ]; then
echo "Error: EAP_ARCHIVE_DIR not set"
exit 1
fi
tar xf ${EAP_ARCHIVE_DIR}/EAP-${version}.tar.gz
fi
cd -

conf="${jboss_home}/standalone/configuration/standalone-full.xml"
if [ $(grep -c NIO ${conf}) -eq 0 ]; then
echo "Enabling NIO journal to avoid AIO failures"
perl -p -i -e "s:(<hornetq-server>)$:\1<journal-type>NIO</journal-type>:" $(ls ${jboss_home}/*/configuration/*)
fi

#echo "Enabling TRACE logging"
#sed -i.bak '/<root-logger>/{N; s/<root-logger>.*<level name="INFO"/<root-logger><level name="TRACE"/g}' ${conf}
echo "Adding application user testuser:testuser1!"
${jboss_home}/bin/add-user.sh --silent -a -u 'testuser' -p 'testuser1!' -g 'guest'

# see https://github.com/jboss-developer/jboss-eap-quickstarts/tree/6.4.x/websocket-hello#review-the-modified-server-configuration
if [ "$type" = "EAP" ]; then
echo "Setting EAP connector type for websockets"
perl -p -i -e "s:HTTP/1.1:org.apache.coyote.http11.Http11NioProtocol:" $(ls ${jboss_home}/*/configuration/*)
fi
fi
29 changes: 0 additions & 29 deletions etc/bin/ci-prep-wildfly.sh

This file was deleted.

14 changes: 2 additions & 12 deletions etc/bin/common-build.sh
@@ -1,7 +1,5 @@
BIN_DIR="${WORKSPACE}/bin"
WF_DIR="${WORKSPACE}/wildfly-dists"
WF8_VERSION="8.2.0.Final"
WF9_VERSION="9.0.0.Final"
AS_DIR="${WORKSPACE}/as-dists"
LEIN_VERSION=2.5.1
export PATH="${BIN_DIR}:${PATH}"
export WORKSPACE_HOME="${WORKSPACE}/home"
Expand All @@ -22,7 +20,7 @@ function mark {
function cleanup {
rm -rf ${WORKSPACE}/target
rm -rf ${BIN_DIR}
rm -rf ${WF_DIR}
rm -rf ${AS_DIR}
}

function install-lein {
Expand All @@ -39,11 +37,3 @@ function setup-lein-profiles {
mkdir -p ${LEIN_HOME}
cp -f /private/projectodd/auth_profile.clj ${LEIN_HOME}/profiles.clj
}

function install-wildfly {
mark "Installing WildFly ${WF8_VERSION}"
${DIR}/ci-prep-wildfly.sh ${WF_DIR} ${WF8_VERSION}

mark "Installing WildFly ${WF9_VERSION}"
${DIR}/ci-prep-wildfly.sh ${WF_DIR} ${WF9_VERSION}
}

0 comments on commit 1f45cd6

Please sign in to comment.