Skip to content

Commit

Permalink
JBIDE-20843 merge fixes from master branch into 0.4.1 / 4.3.x branch
Browse files Browse the repository at this point in the history
  • Loading branch information
nickboldt committed Sep 30, 2015
1 parent 2331850 commit c82d4ac
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 26 deletions.
9 changes: 5 additions & 4 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
Version Watch
* tool for monitoring eclipse product bundles designed for JBoss Developer Studio
* JBIDE-19058 replace filter with includeIUs and excludeIUs so we can more intelligently filter out IUs to ignore
* JBIDE-19059 refactor output.html and report.html to report_detailed.html and report_summary.html
Version Watch: a tool for auditing changes to versions of eclipse features & bundles between releases of JBoss Developer Studio

CHANGELOG

Version 0.4.1
* Version bumped indicator added
* JBIDE-19058 replace filter with includeIUs and excludeIUs so we can more intelligently filter out IUs to ignore
* JBIDE-19059 refactor output.html and report.html to report_detailed.html and report_summary.html

Version 0.4
* Deep MD5 check for jar archives added
Expand Down
48 changes: 26 additions & 22 deletions run.jenkins.job.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# where is maven?
if [[ ! ${NATIVE_TOOLS} ]]; then NATIVE_TOOLS=/qa/tools/opt; fi
JAVA_HOME=${NATIVE_TOOLS}/jdk1.8.0_last
M2_HOME=/qa/tools/opt/apache-maven-3.1.1 # don't use NATIVE_TOOLS because it might be /qa/tools/opt/amd64 and there's no /qa/tools/opt/amd64/apache-maven-3.1.1
M2_HOME=/qa/tools/opt/apache-maven-3.2.5 # don't use NATIVE_TOOLS because it might be /qa/tools/opt/amd64 and there's no /qa/tools/opt/amd64/apache-maven-3.1.1
PATH=$PATH:$M2_HOME/bin:$JAVA_HOME/bin
MVN=${M2_HOME}/bin/mvn

Expand All @@ -30,7 +30,7 @@ INCLUDE_IUS=".*(hibernate|jboss|xulrunner).*"
DESCRIPTION=""

# file from which to pull a list of JBDS installers to install
JBDS_INSTALLERS_LISTFILE=${FROM}/install.jbds.list.txt
JBDS_INSTALLERS_LISTFILE=${SRC_PATH}/install.jbds.list.txt

# include and exclude patterns for which JBDS installs to use when producing the version diff report
INCLUDE_VERSIONS="\d+\.\d+\.\d+"
Expand Down Expand Up @@ -60,10 +60,9 @@ while [[ "$#" -gt 0 ]]; do
shift 1
done

FROM=${WORKSPACE}/sources
SNAPSHOTS=tools@filemgmt.jboss.org:/downloads_htdocs/tools/${STREAM_NAME}/snapshots/builds/
DEST=${SNAPSHOTS}/${JOB_NAME}
URL=http://download.jboss.org/jbosstools/${STREAM_NAME}/snapshots/builds/${JOB_NAME}
SRC_PATH=${WORKSPACE}/sources
TRG_PATH=${STREAM_NAME}/snapshots/builds/${JOB_NAME}/${BUILD_ID}-B${BUILD_NUMBER}
URL=http://download.jboss.org/jbosstools/${STREAM_NAME}/snapshots/builds/${JOB_NAME}/${BUILD_ID}-B${BUILD_NUMBER}

# if not set commandline, use default upstream job based on this job's name -> devstudio.product_master, devstudio.product_8.0.luna, etc.
if [[ ! ${UPSTREAM_JOB} ]]; then
Expand Down Expand Up @@ -97,12 +96,12 @@ check_results ()
{
label=$1 # Title Case
name=${label,,} # lowercase
calltoaction=":: See ${label} Reports: ${URL}/${BUILD_ID}_B${BUILD_NUMBER}_report_detailed_${name}.html and ${URL}/${BUILD_ID}_B${BUILD_NUMBER}_report_summary_${name}.html"
if [[ ! `egrep -l "<td>|<tr>" ${FROM}/report_detailed_${name}.html` ]]; then
calltoaction=":: See ${label} Reports: ${URL}/report_detailed_${name}.html and ${URL}/report_summary_${name}.html"
if [[ ! `egrep -l "<td>|<tr>" ${SRC_PATH}/../results/report_detailed_${name}.html` ]]; then
echo "FAILURE IN OUTPUT: Empty results in report_detailed_${name}.html"
echo $calltoaction
fi
if [[ `egrep -l "ERROR:" ${FROM}/report_detailed_${name}.html` ]]; then
if [[ `egrep -l "ERROR:" ${SRC_PATH}/../results/report_detailed_${name}.html` ]]; then
echo "FAILURE IN OUTPUT: Errors found in report_detailed_${name}.html"
echo $calltoaction
fi
Expand All @@ -113,32 +112,37 @@ publish ()
label=$1 # Title Case
name=${label,,} # lowercase
# rename in workspace
mv ${FROM}/report_detailed.html ${FROM}/report_detailed_${name}.html
mv ${FROM}/report_summary.html ${FROM}/report_summary_${name}.html
mkdir -p ${SRC_PATH}/../results/target/
mv ${SRC_PATH}/report_detailed.html ${SRC_PATH}/../results/report_detailed_${name}.html
mv ${SRC_PATH}/report_summary.html ${SRC_PATH}/../results/report_summary_${name}.html
rsync -aq ${SRC_PATH}/target/*.png ${SRC_PATH}/../results/target/

# publish now depends on having publish/rsync.sh fetched to workspace already -- see https://repository.jboss.org/nexus/content/groups/public/org/jboss/tools/releng/jbosstools-releng-publish/
. ${WORKSPACE}/sources/publish/rsync.sh -s ${FROM} -t ${DEST}/${BUILD_ID}-B${BUILD_NUMBER}/all/
. ${WORKSPACE}/sources/publish/rsync.sh -s ${SRC_PATH}/../results -t ${TRG_PATH}/

# create links to html files (must be all on one line)
DESCRIPTION="${DESCRIPTION}"'<li>'${label}' <a href="'${URL}'/'${BUILD_ID}'_B'${BUILD_NUMBER}'_report_detailed_'${name}'.html">Details</a>,\
<a href="'${URL}'/'${BUILD_ID}'_B'${BUILD_NUMBER}'_report_summary_'${name}'.html">Summary</a></li>'
DESCRIPTION="${DESCRIPTION}"'<li>'${label}' <a href="'${URL}'/report_detailed_'${name}'.html">Details</a>,\
<a href="'${URL}'/report_summary_'${name}'.html">Summary</a></li>'
}

#################################################################

# do JBDS installs so we can compare them
pushd ${FROM}
. ${FROM}/install.jbds.sh -JBDS_INSTALLERS_LISTFILE ${JBDS_INSTALLERS_LISTFILE} -JAVA ${JAVA_HOME}/bin/java ${others}
popd

# clean up leftovers from previous builds
pushd ${FROM}; rm -f output.html product.html *report*.html; popd
pushd ${SRC_PATH}
# clean up leftovers from previous builds
rm -f output.html product.html *report*.html
rm -fr ${SRC_PATH}/../results

# do JBDS installs so we can compare them
. ${SRC_PATH}/install.jbds.sh -JBDS_INSTALLERS_LISTFILE ${JBDS_INSTALLERS_LISTFILE} -JAVA ${JAVA_HOME}/bin/java ${others}
popd

# generate reports and publish them
pushd ${WORKSPACE}
${MVN} -f ${FROM}/pom.xml clean test -fn -Dmaven.repo.local=${WORKSPACE}/.repository -DexcludeVersions="${EXCLUDE_VERSIONS}" -DincludeVersions="${INCLUDE_VERSIONS}" \
${MVN} -f ${SRC_PATH}/pom.xml clean test -fn -Dmaven.repo.local=${WORKSPACE}/.repository -DexcludeVersions="${EXCLUDE_VERSIONS}" -DincludeVersions="${INCLUDE_VERSIONS}" \
-DexcludeIUs="${EXCLUDE_IUS}" -DincludeIUs="${INCLUDE_IUS}" \
-DinstallationsDir="${INSTALL_FOLDER}" && publish Filtered && check_results Filtered
${MVN} -f ${FROM}/pom.xml clean test -fn -Dmaven.repo.local=${WORKSPACE}/.repository -DexcludeVersions="${EXCLUDE_VERSIONS}" -DincludeVersions="${INCLUDE_VERSIONS}" \
${MVN} -f ${SRC_PATH}/pom.xml clean test -fn -Dmaven.repo.local=${WORKSPACE}/.repository -DexcludeVersions="${EXCLUDE_VERSIONS}" -DincludeVersions="${INCLUDE_VERSIONS}" \
-DexcludeIUs="${EXCLUDE_IUS}" -DincludeIUs=".*" \
-DinstallationsDir="${INSTALL_FOLDER}" && publish All && check_results All
popd
Expand Down

0 comments on commit c82d4ac

Please sign in to comment.